home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / amiga / programm / 15428 < prev    next >
Encoding:
Internet Message Format  |  1992-11-06  |  1.3 KB

  1. Path: sparky!uunet!cbmvax!mks
  2. From: mks@cbmvax.commodore.com (Michael Sinz)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: Semaphores and software interrupts
  5. Message-ID: <36735@cbmvax.commodore.com>
  6. Date: 5 Nov 92 21:16:55 GMT
  7. References: <1992Nov4.214012.8249@jato.jpl.nasa.gov>
  8. Reply-To: mks@cbmvax.commodore.com (Michael Sinz)
  9. Distribution: comp.sys.amiga.programmer
  10. Organization: Commodore, West Chester, PA
  11. Lines: 19
  12.  
  13. jdickson@jato.jpl.nasa.gov (Jeff Dickson) writes:
  14. >
  15. >    Hi all. Is AttemptSemaphore/ReleaseSemaphore safe from within a
  16. >software interrupt?
  17.  
  18. No...
  19.  
  20. Semaphores are task-level semaphores.  As such, they have no protection
  21. from being interrupted during the semaphore routines themselves and would
  22. be very unsafe in an interrupt.  Also, as an interrupt, how would you hold
  23. onto the semaphore (what task would be the owner?)
  24.  
  25. /----------------------------------------------------------------------\
  26. |      /// Michael Sinz  -  Senior Amiga Systems Engineer              |
  27. |     ///                   Operating System Development Group         |
  28. |    ///   BIX:  msinz      UUNET:  mks@cbmvax.commodore.com           |
  29. |\\\///                                                                |
  30. | \XX/     "I think not." said Ren'e Descartes, then he vanished.      |
  31. \----------------------------------------------------------------------/
  32.