1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +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 * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -64,12 +64,12 @@
atomic. Unfortunately this approach probably makes arbiters no faster atomic. Unfortunately this approach probably makes arbiters no faster
than mutexes (though still using less memory of course), so some than mutexes (though still using less memory of course), so some
CPU-specifics are highly desirable. */ CPU-specifics are highly desirable. */
#define FETCH_STORE(fet,mem,sto) \ #define FETCH_STORE(fet,mem,sto) \
do { \ do { \
scm_mutex_lock (&scm_i_misc_mutex); \ scm_i_scm_pthread_mutex_lock (&scm_i_misc_mutex); \
(fet) = (mem); \ (fet) = (mem); \
(mem) = (sto); \ (mem) = (sto); \
scm_mutex_unlock (&scm_i_misc_mutex); \ scm_i_pthread_mutex_unlock (&scm_i_misc_mutex); \
} while (0) } while (0)
#endif #endif