mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-21 12:03:40 -08:00
fix build failures with --disable-threads
This commit is contained in:
parent
d87c5b2c5a
commit
eca39581a5
2 changed files with 16 additions and 16 deletions
|
|
@ -28,7 +28,7 @@
|
|||
#else
|
||||
# define AO_load(x) (x)
|
||||
# define AO_store(x,y) ((x)=(y))
|
||||
# define AO_nop_full(x,y)
|
||||
# define AO_nop_full()
|
||||
#endif
|
||||
|
||||
#endif /* ECL_ATOMIC_OPS_H */
|
||||
|
|
|
|||
|
|
@ -23,21 +23,21 @@
|
|||
* via mprotect(), so we have to use sigprocmask instead. No
|
||||
* performance problems, since this is only used for stack
|
||||
* resizing. */
|
||||
#ifdef ECL_USE_MPROTECT
|
||||
#ifdef HAVE_SIGPROCMASK
|
||||
#include <signal.h>
|
||||
#define ECL_STACK_RESIZE_DISABLE_INTERRUPTS(the_env) \
|
||||
sigset_t __sigset_new, __sigset_previous; \
|
||||
sigfillset(&__sigset_new); \
|
||||
pthread_sigmask(SIG_BLOCK, &__sigset_new, &__sigset_previous)
|
||||
#define ECL_STACK_RESIZE_ENABLE_INTERRUPTS(the_env) \
|
||||
pthread_sigmask(SIG_SETMASK, &__sigset_previous, NULL)
|
||||
#if defined(ECL_THREADS) && defined(ECL_USE_MPROTECT)
|
||||
# ifdef HAVE_SIGPROCMASK
|
||||
# include <signal.h>
|
||||
# define ECL_STACK_RESIZE_DISABLE_INTERRUPTS(the_env) \
|
||||
sigset_t __sigset_new, __sigset_previous; \
|
||||
sigfillset(&__sigset_new); \
|
||||
pthread_sigmask(SIG_BLOCK, &__sigset_new, &__sigset_previous)
|
||||
# define ECL_STACK_RESIZE_ENABLE_INTERRUPTS(the_env) \
|
||||
pthread_sigmask(SIG_SETMASK, &__sigset_previous, NULL)
|
||||
# else
|
||||
# error "Can't protect stack resizing from interrupts without sigprocmask. Either build ECL without mprotect() or live with possible race conditions."
|
||||
# endif /* HAVE_SIGPROCMASK */
|
||||
#else
|
||||
#error "Can't protect stack resizing from interrupts without sigprocmask. Either build ECL without mprotect() or live with possible race conditions."
|
||||
#endif /* HAVE_SIGPROCMASK */
|
||||
#else
|
||||
#define ECL_STACK_RESIZE_DISABLE_INTERRUPTS(the_env) ecl_disable_interrupts_env(the_env);
|
||||
#define ECL_STACK_RESIZE_ENABLE_INTERRUPTS(the_env) ecl_enable_interrupts_env(env);
|
||||
#endif /* ECL_USE_MPROTECT */
|
||||
# define ECL_STACK_RESIZE_DISABLE_INTERRUPTS(the_env) ecl_disable_interrupts_env(the_env);
|
||||
# define ECL_STACK_RESIZE_ENABLE_INTERRUPTS(the_env) ecl_enable_interrupts_env(env);
|
||||
# endif /* ECL_THREADS && ECL_USE_MPROTECT */
|
||||
|
||||
#endif /* ECL_STACK_RESIZE_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue