File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 7
7
*
8
8
*
9
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.46 1998/09/11 16:56:20 momjian Exp $
10
+ * $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.47 1998/09/12 16:07:53 momjian Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -266,10 +266,11 @@ static const slock_t clear_lock =
266
266
* assembly from his NECEWS SVR4 port, but we probably ought to retain this
267
267
* for the R3000 chips out there.
268
268
*/
269
- #define TAS (lock ) (!acquire_lock(lock))
270
- #define S_UNLOCK (lock ) release_lock(lock)
271
- #define S_INIT_LOCK (lock ) init_lock(lock)
272
- #define S_LOCK_FREE (lock ) (stat_lock(lock) == UNLOCKED)
269
+ #include <mutex.h>
270
+ #define TAS (lock ) (test_and_set(lock,1))
271
+ #define S_UNLOCK (lock ) (test_then_and(lock,0))
272
+ #define S_INIT_LOCK (lock ) (test_then_and(lock,0))
273
+ #define S_LOCK_FREE (lock ) (test_then_add(lock,0) == 0)
273
274
#endif /* __sgi */
274
275
275
276
You can’t perform that action at this time.
0 commit comments