Mail Archives: djgpp/1996/10/02/04:13:05
Hello all:
For no better purpose than reinvent the square wheel, I'm trying to
implement thread support using setitimer() in DJGPP. My scheme is to use
the SIGALRM handler to implement context switches, so it's "kind of"
pre-emptive. AFAIK also signals in DJGPP are not delivered until DOS calls
finish, so the nonreentrancy of DOS is not an issue.
I haven't _tried_ this yet with DJGPP (I'm using Linux) but I have a
couple of questions here:
  a) does signal() emulate the BSD-type signals, or is the signal
     handler reset to default after it is raised?
  b) the reset-to-default is how signal() is implemented in Linux, the
     only way around it is to use sigaction() with the non-POSIX
     SA_RESTART flag. Since this is non-POSIX, can't use with DJGPP.
     are there alternatives?
TIA,
Orly.
.------------------------------------------------------------------------.
| Orlando Andico                        Email:orly AT gibson DOT eee DOT upd DOT edu DOT ph |
| IRC Lab, Dept of Electrical/   URL:http://gibson.eee.upd.edu.ph/~orly/ |
| Electronic Engg, UP Diliman                     POTS: +(0632) 932-2385 |
`------------------------------------------------------------------------'
- Raw text -