[comp.sys.apollo] SYS-V msgget and msgput services under DOMAIN OS

GDAU100@BGUVM.BITNET (Jonathan B. Owen) (09/17/89)

I am developing a system on an Apollo 4500 using SR10.2.  The code is
written in Verdix Ada.  The body of our IPC package uses SYS-V
msgget and msgput services.  We have a need to wait on a mailbox
with a timeout period.  At first, I created a task to wait on the
mailbox, upon invokation of the IPC.Read service.  If the task
did not receive a message within the timeout period, I would raise
an exception from the main thread of the procedure.  This of course
did not work, since by the definition of Ada, the procedure will
not terminate until all tasks within are completed or able to terminate.

In order to solve this problem, I thought I might send a message to
the mailbox from the main thread, after the timeout period.  This would
enable the task to terminate, instead of being stuck on the msgget service.

It seems that it is not a good idea to call msgget and msgput from
the same process.  As far as i could tell, attempting so hangs the
process!

To solve this problem, it seems I might have to create a simple process,
which will receive a request to send a message to a certain mailbox, in
a ping-pong fasion.  This probably will solve the problem...

I am not the one who implemented the interface from Ada to the above
services so I am not familure with the msgget and msgput services.
Do they support a timeout in some way?  If not, do you know of a better
way to implement a msgget with a timeout period?

                        Any help is welcome...

                                              Jonathan
______________________________________________________________________________
  (--)    /--)     /-(\                 Email: gdau100@bguvm (bitnet)
  \ /    /--K      | \|/\   /\/) /|-\   Snail: 55 Hovevei Zion
  _/_/o /L__)_/o \/\__/  \X/  \_/ | |_/        Tel-Aviv, 63346  ISRAEL
 (/        Jonathan B. Owen             Voice: (03) 281-422

 Point of view:  A chicken is the means by which an egg reproduces an egg.
______________________________________________________________________________