VM: Add ASM_MUL for x86.
[bpt/guile.git] / libguile / pthread-threads.h
index bd6d485..4c67b18 100644 (file)
@@ -3,21 +3,22 @@
 #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 as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 3 of
+ * the License, or (at your option) any later version.
  *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA
  */
 
 \f
 #include <pthread.h>
 #include <sched.h>
 
-/* `libgc' intercepts pthread calls by defining wrapping macros.  */
-#include "libguile/boehm-gc.h"
+/* `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
  */