alarm() on PC/MSoft
tony at magg.net
tony at magg.net
Mon Nov 3 17:18:25 PST 1997
Michael Gesundheit wrote:
> Who ever of you out there who built kaffe on PC, with
> sygnus perhaps, I wonder what did you do about alarm().
Cygwin32 include files for GCC define SIGALRM for
Win32 platform but I haven't downloaded their source code
( will try later, if somebody doesn't come up with answer
shortly) so I can not say how is this signal implemented.
> I plan on replacing alarm() with SetTimer() which does
> exectly what we need. SIGALRM functionality. You
> provide time and a callback function and when the
> time expires the callback func. is called.
>
> Any objections??
I don't understand Kaffe source code enough to offer
good objections but I have one question:
SIGALRM is used only in thread-internal.c and thread.c.
In THREAD.C there is this code:
#if !defined(USE_NATIVE_THREADS)
/* Plug in the alarm handler */
#if defined(SIGALRM)
catchSignal(SIGALRM, alarmException);
#else
#error "No alarm signal support"
#endif
#endif
If my very superficial impression is correct,
perhaps using native Win32 threads would
free you from the need to emulate signal (SIGALRM)?
Furthermore, the only serious problems that I had with testing
Kaffe on Cygwin32 regarded exactly threads. Even the simplest
test samples would crash somewhere in cygwin32.dll.
Hope this helps.
Tony Juricic
tony at magg.net
More information about the kaffe
mailing list