home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / amiga / programm / 15492 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.7 KB  |  40 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!ames!elroy.jpl.nasa.gov!jato!jdickson
  3. From: jdickson@jato.jpl.nasa.gov (Jeff Dickson)
  4. Subject: Re: Semaphores and software interrupts
  5. Message-ID: <1992Nov6.230903.24634@jato.jpl.nasa.gov>
  6. Organization: Jet Propulsion Laboratory
  7. References: <1992Nov4.214012.8249@jato.jpl.nasa.gov> <36735@cbmvax.commodore.com> <1992Nov6.165747.24043@oracle.us.oracle.com>
  8. Date: Fri, 6 Nov 1992 23:09:03 GMT
  9. Lines: 29
  10.  
  11. In article <1992Nov6.165747.24043@oracle.us.oracle.com> usenet@oracle.us.oracle.com (Oracle News Poster) writes:
  12. >In article <36735@cbmvax.commodore.com> mks@cbmvax.commodore.com (Michael Sinz) writes:
  13. >>Semaphores are task-level semaphores.  As such, they have no protection
  14. >>from being interrupted during the semaphore routines themselves and would
  15. >>be very unsafe in an interrupt.  Also, as an interrupt, how would you hold
  16. >>onto the semaphore (what task would be the owner?)
  17. >
  18. >Indeed, and what would happen if you -couldn't- get the semaphore?  You
  19.  
  20. AttemptSemaphore would return a zero (false). ObtainSemaphore puts you to
  21. sleep if the semaphore is not readily obtainable. Actually, I thought it
  22. might be a nifty thing to be able to have some way of knowing it was ok to
  23. muck with public data. I planned to have the software interrupt generated
  24. as result of a message arriving at a message port (PA_SOFTINT). 
  25.  
  26. mks@cbmvax.commodore.com (Michael Sinz) writes:
  27.  
  28. >how would you hold onto the semaphore (what task would be the owner?)
  29.  
  30. Okay, Ok....It just an idea (A dumb idea yes)
  31.  
  32. >David C. Navas                        dnavas@oracle.com
  33. >Working for, but not speaking on behalf of, Oracle Corp.
  34.  
  35. Jeff
  36.  
  37.  
  38.  
  39.  
  40.