In message <[EMAIL PROTECTED]> Dan Sugalski <[EMAIL PROTECTED]> wrote:
> At 8:11 AM +0100 7/3/03, Alan Burlison wrote: > >Dan Sugalski wrote: > > > >>I'm pretty sure the POSIX docs say that you can't call mutex > >>routines from within interrupt code, which makes sense--the last > >>thing you want is for an interrupt handler to block on a mutex > >>aquisition. > > > >I haven't got a copy, but I'd be surprised if they explicitly > >forbade it - I think however you *do* need to be very careful if you > >need to mix mutexes and signals, so that you don't self-deadlock. > > I don't have a copy handy anymore either, unfortunately, but > Butenhof's pretty clear--none of the Posix thread functions are async > safe. (Section 6.6.6, p234-235 in my copy) I seem to remember someone > scolding me about this, or something like it, ages ago. The POSIX docs (or rather their successor, the SuS docs) can be found online - the current version is at: http://www.opengroup.org/onlinepubs/007904975/toc.htm Specific documentation the the pthread routines is at: http://www.opengroup.org/onlinepubs/007904975/basedefs/pthread.h.html Tom -- Tom Hughes ([EMAIL PROTECTED]) http://www.compton.nu/