Date: Sun, 10 Mar 1996 07:47:58 +0200 (IST) From: Eli Zaretskii To: "Orlando A. Andico" Cc: Holger Vogelsang , DJGPP Mailing List Subject: Re: Multi-threads? In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 8 Mar 1996, Orlando A. Andico wrote: > 1) is it possible for an alarm to be delivered in the middle of a library > or kernel call? that is, because MS-DOG is nonreentrant. I'm not sure how > the signal delivery mechanism works in DJGPP. The signal support in DJGPP arranges for your program to generate an exception when it first time touches some of its data in protected mode, then catches that exception and calls an appropriate signal handler. So when a signal happens while the CPU is in real mode, its handling is posponed until that DOS call (or whatever caused a switch to RM) is done and you are back to PM. If more than one signals happen during that time, your program will see only one of them. > 2) what is the resolution of the timer in setitimer ()? the timeval > structure has a tv_usec field, but exactly what is the effective > resolution of this thing? does DJGPP use the 18.2 Hz timer interrupt of > DOS, or is it reprogrammed to interrupt at a faster rate? Currently, itimer works with the standard 54 msec resolution of the PC system clock.