[Gc] Signals / EINTR loop
ncannasse at motion-twin.com
Thu Aug 7 03:06:53 PDT 2008
>> The problem is that after that, each next call to recv() immediatly
>> returns with -1 + EINTR again, so we are entering an infinite loop that
>> takes full CPU (shared between User and System).
> First, during configuration, we check if GC_start_blocking/GC_stop_blocking
> or GC_do_blocking is available. Then, around any call that *must not* be
> interrupted we use a sequence such as:
Thanks a lot, that was very helpful and seems like it fixed it. Is there
somewhere a list of functions that are reentrant but not signal-safe ?
Also, we don't have the problem with pthread_cond_wait, but maybe using
GC_do_blocking for it as well might improve performances when GC needs
to stop the world. Would you recommend it ?
Thanks a lot to to Hans Boehm for the great GC. We upgraded recently
from 6.8 to 7.1 and performances have been noticeably improved.
More information about the Gc