home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / sys / amiga / programm / 18042 < prev    next >
Encoding:
Text File  |  1993-01-02  |  1.5 KB  |  36 lines

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