diff options
author | Andy Wingo <wingo@pobox.com> | 2011-04-11 23:30:52 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-04-11 23:30:52 +0200 |
commit | 21c05db45b69f8a62b84c36abc86cb935fa967d7 (patch) | |
tree | 743df01da540e7fd628f54894e7d5fbe94b03996 /libguile/pthread-threads.h | |
parent | 4db853d747ac115f799c93e2de93f5159ad84109 (diff) | |
parent | c89b45299329d034875429804f18768c1ea96713 (diff) | |
download | guile-21c05db45b69f8a62b84c36abc86cb935fa967d7.tar.gz |
Merge remote branch 'origin/stable-2.0'
Conflicts:
GUILE-VERSION
test-suite/tests/srfi-4.test
Diffstat (limited to 'libguile/pthread-threads.h')
-rw-r--r-- | libguile/pthread-threads.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/libguile/pthread-threads.h b/libguile/pthread-threads.h index ca72f1674..4c67b1857 100644 --- a/libguile/pthread-threads.h +++ b/libguile/pthread-threads.h @@ -3,7 +3,7 @@ #ifndef SCM_PTHREADS_THREADS_H #define SCM_PTHREADS_THREADS_H -/* Copyright (C) 2002, 2005, 2006 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2005, 2006, 2011 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -29,24 +29,39 @@ #include <pthread.h> #include <sched.h> -/* `libgc' intercepts pthread calls by defining wrapping macros. */ +/* `libgc' defines wrapper procedures for pthread calls. */ #include "libguile/bdw-gc.h" /* Threads */ #define scm_i_pthread_t pthread_t #define scm_i_pthread_self pthread_self -#define scm_i_pthread_create pthread_create -#define scm_i_pthread_detach pthread_detach +#define scm_i_pthread_create GC_pthread_create +#define scm_i_pthread_detach GC_pthread_detach + +#if SCM_HAVE_GC_PTHREAD_EXIT +#define scm_i_pthread_exit GC_pthread_exit +#else #define scm_i_pthread_exit pthread_exit +#endif + +#if SCM_HAVE_GC_PTHREAD_CANCEL +#define scm_i_pthread_cancel GC_pthread_cancel +#else #define scm_i_pthread_cancel pthread_cancel +#endif + #define scm_i_pthread_cleanup_push pthread_cleanup_push #define scm_i_pthread_cleanup_pop pthread_cleanup_pop #define scm_i_sched_yield sched_yield /* Signals */ +#if SCM_HAVE_GC_PTHREAD_SIGMASK +#define scm_i_pthread_sigmask GC_pthread_sigmask +#else #define scm_i_pthread_sigmask pthread_sigmask +#endif /* Mutexes */ |