From 50dc1840005092b8b311ab2f3b4745df214ae519 Mon Sep 17 00:00:00 2001 From: Kevin Ryde Date: Fri, 23 Jul 2004 23:51:58 +0000 Subject: [PATCH] (scm_i_misc_mutex): New SCM_GLOBAL_MUTEX. --- libguile/threads.c | 6 ++++++ libguile/threads.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/libguile/threads.c b/libguile/threads.c index 11e3fdd39..a94e0698d 100644 --- a/libguile/threads.c +++ b/libguile/threads.c @@ -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 () { diff --git a/libguile/threads.h b/libguile/threads.h index d81f70335..4faf54c3b 100644 --- a/libguile/threads.h +++ b/libguile/threads.h @@ -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 */ /* -- 2.20.1