home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!jato!jdickson
- From: jdickson@jato.jpl.nasa.gov (Jeff Dickson)
- Subject: Re: RKM description of WaitPort()
- Message-ID: <1993Jan2.083340.21965@jato.jpl.nasa.gov>
- Organization: Jet Propulsion Laboratory
- References: <1993Jan1.221013.26070@urbana.mcd.mot.com>
- Date: Sat, 2 Jan 1993 08:33:40 GMT
- Lines: 25
-
- In article <1993Jan1.221013.26070@urbana.mcd.mot.com> qbarnes@urbana.mcd.mot.com (Quentin Barnes) writes:
- >I was reading the description of the WaitPort() call in the RKM:Libraries
- >and was confused by the description. On page 504, it says:
- >
- > ... It is possible to receive a signal for a port without
- > a message being present yet. The code processing the
- > messages should be able to handle this. ...
- >
- >It seems to me to OS is waking up the task before it has attached the
- >message to the specified port and it would be up the the application
- >to spin on the GetMsg() call until the message generating the signal
- >showed up. This seems terribly wrong and the example code does not
- >do this. What am I missing? What does the documentation actually
- >saying?
- >--
- >Quentin Barnes
- >qbarnes@urbana.mcd.mot.com | ..!uiucuxc!udc!qbarnes
-
- Messages and signals are not inclusive. You can send a message to a port without
- setting a signal or set a signal without sending a message. The way the code
- should handle this condition is to never assume that just because a signal was
- set a message is available at the port. Check the return of GetMsg.
-
- Jeff
-
-