1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-29 08:20:20 +02:00

ASYNC_TICK after catching EINTR in SCM_SYSCALL

* libguile/_scm.h (SCM_SYSCALL): As in scm_syserror, do a SCM_ASYNC_TICK
  before resuming the syscall after an EINTR.
This commit is contained in:
Andy Wingo 2010-12-03 15:17:35 +01:00
parent 6f81b18abe
commit 51c1dba88a

View file

@ -87,12 +87,24 @@
#include "libguile/inline.h"
#include "libguile/strings.h"
/* ASYNC_TICK after finding EINTR in order to handle pending signals, if
any. See comment in scm_syserror. */
#ifndef SCM_SYSCALL
#ifdef vms
# ifndef __GNUC__
# include <ssdef.h>
# define SCM_SYSCALL(line) do{errno = 0;line;} \
while(EVMSERR==errno && (vaxc$errno>>3)==(SS$_CONTROLC>>3))
# define SCM_SYSCALL(line) \
do \
{ \
errno = 0; \
line; \
if (EVMSERR==errno && (vaxc$errno>>3)==(SS$_CONTROLC>>3)) \
{ \
SCM_ASYNC_TICK; \
continue; \
} \
} \
while(0)
# endif /* ndef __GNUC__ */
#endif /* def vms */
#endif /* ndef SCM_SYSCALL */
@ -100,7 +112,18 @@
#ifndef SCM_SYSCALL
# ifdef EINTR
# if (EINTR > 0)
# define SCM_SYSCALL(line) do{errno = 0;line;}while(EINTR==errno)
# define SCM_SYSCALL(line) \
do \
{ \
errno = 0; \
line; \
if (errno == EINTR) \
{ \
SCM_ASYNC_TICK; \
continue; \
} \
} \
while(0)
# endif /* (EINTR > 0) */
# endif /* def EINTR */
#endif /* ndef SCM_SYSCALL */