delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/02/04:13:05

Date: Wed, 2 Oct 1996 14:27:32 +0800 (GMT)
From: Orlando Andico <orly AT gibson DOT eee DOT upd DOT edu DOT ph>
To: djgpp AT delorie DOT com
Subject: thread handling
Message-ID: <Pine.SGI.3.93.961002142050.6115A-100000@gibson.eee.upd.edu.ph>
MIME-Version: 1.0

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 -


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