(scm_i_misc_mutex): New SCM_GLOBAL_MUTEX.
authorKevin Ryde <user42@zip.com.au>
Fri, 23 Jul 2004 23:51:58 +0000 (23:51 +0000)
committerKevin Ryde <user42@zip.com.au>
Fri, 23 Jul 2004 23:51:58 +0000 (23:51 +0000)
libguile/threads.c
libguile/threads.h

index 11e3fdd..a94e069 100644 (file)
@@ -1329,6 +1329,12 @@ scm_init_threads (SCM_STACKITEM *base)
   threads_initialized_p = 1;
 }
 
+/* scm_i_misc_mutex is intended for miscellaneous uses, to protect
+   operations which are non-reentrant or non-thread-safe but which are
+   either not important enough or not used often enough to deserve their own
+   private mutex.  */
+SCM_GLOBAL_MUTEX (scm_i_misc_mutex);
+
 void
 scm_init_thread_procs ()
 {
index d81f703..4faf54c 100644 (file)
@@ -3,7 +3,7 @@
 #ifndef SCM_THREADS_H
 #define SCM_THREADS_H
 
-/* Copyright (C) 1996,1997,1998,2000,2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,2000,2001, 2002, 2003, 2004 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
@@ -242,6 +242,8 @@ extern scm_t_key scm_i_thread_key;
 SCM_API scm_t_key scm_i_root_state_key;
 SCM_API void scm_i_set_thread_data (void *);
 
+SCM_API scm_t_mutex scm_i_misc_mutex;
+
 #endif  /* SCM_THREADS_H */
 
 /*