1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 20:00:19 +02:00

(FETCH_STORE) [generic C]: Should be

scm_i_scm_pthread_mutex_lock/unlock now.  Reported by Ludovic Courtès.
This commit is contained in:
Kevin Ryde 2005-03-17 23:11:54 +00:00
parent e96f5ee768
commit 8ff3ca467c

View file

@ -1,4 +1,4 @@
/* Copyright (C) 1995,1996, 1997, 2000, 2001, 2004 Free Software Foundation, Inc.
/* Copyright (C) 1995,1996, 1997, 2000, 2001, 2004, 2005 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
@ -64,12 +64,12 @@
atomic. Unfortunately this approach probably makes arbiters no faster
than mutexes (though still using less memory of course), so some
CPU-specifics are highly desirable. */
#define FETCH_STORE(fet,mem,sto) \
do { \
scm_mutex_lock (&scm_i_misc_mutex); \
(fet) = (mem); \
(mem) = (sto); \
scm_mutex_unlock (&scm_i_misc_mutex); \
#define FETCH_STORE(fet,mem,sto) \
do { \
scm_i_scm_pthread_mutex_lock (&scm_i_misc_mutex); \
(fet) = (mem); \
(mem) = (sto); \
scm_i_pthread_mutex_unlock (&scm_i_misc_mutex); \
} while (0)
#endif