www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/03/10/00:56:31

Date: Sun, 10 Mar 1996 07:47:58 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Orlando A. Andico" <orly AT natalie DOT eee DOT upd DOT edu DOT ph>
Cc: Holger Vogelsang <vogelsan AT i50s20 DOT ira DOT uka DOT de>,
DJGPP Mailing List <djgpp AT delorie DOT com>
Subject: Re: Multi-threads?
In-Reply-To: <Pine.LNX.3.91.960308053430.108B-100000@natalie.eee.upd.edu.ph>
Message-Id: <Pine.SUN.3.91.960310074255.2390E-100000@is>
Mime-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019