Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!rpi!ander From: ander@pawl.rpi.edu (Michael R. Primm) Newsgroups: comp.os.os2 Subject: Re: signals, threads, and memory allocation Message-ID: <1989Nov11.170106.1088@rpi.edu> Date: 11 Nov 89 17:01:06 GMT References: <32295@ucbvax.BERKELEY.EDU> <8551@microsoft.UUCP> <2602@auspex.auspex.com> <8714@microsoft.UUCP> <2620@auspex.auspex.com> Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 24 According to "Advanced OS/2 Programming" by Microsoft Press, when a signal handler is invoked, no further signals of that type are processed until DosSetSigHandler() is called again with an action code of 4 (reset current signal). Also, DosHoldSignal() can be used to temporarily postpose signal handling (signals generated while a hold is in effect are not lost, but wait until the hold ends). As far as I can tell, "masking" signals can be done by simply setting them to have a handler which does nothing but reset the current signal ( or possibly nothing, but I'm not sure if some additional burden would be put on the system by accumulating signals (if they do accumulate...I tend to doubt it, since OS/2's signals are meant to emulate hardware interrupts)). If you wanted to, writing up a routine which could enable and disable signals using a mask should be easy....just keep a static array of pointers to each signal handler, define a "null" handler routine, and have the routine remake a DosSetSigHandler call for each signal which changes state (enabled to disabled, or vice versa). Basically, OS/2's kernal support is complete enough to generate pretty much any service you want....since most of the calls are supported as DLLs, anyone can write up additional services which can work just as well. IMHO, its kinda nice having access to lower level calls...you don't have a specific philosophy imposed upon you as much as on other systems (i.e. you can have any semaphores you want, as long as they're FIFO, etc). --Mike Primm