On 12/28/05, Bradley Lucier lucier@math.purdue.edu wrote:
Is there any way to add POLLs to C code? There's a C library I'd like to link to a program, but one C routine could possibly take seconds or minutes to run, and Gambit disables interrupts except through POLLs.
You mean that you want an external library to be able to wait on a file descriptor (e.g. using select/poll)? (Speaking about "disabling interrupts" is confusing. Gambit is a user-land process and cannot disable interrupts)
Actually, no. Gambit masks CNTL-C and allows interrupts only at fixed points in the C code where the state of the Gambit Virtual Machine (GVM) is well known, so if a GC happens things are OK, etc. Gambit checks whether an interrupt is waiting with the POLL macro in gambit.h; this is what I meant by adding POLLs to C code.
Brad