Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6ee06b0

Browse files
committed
Irix lock fix from Robert Bruccoleri
1 parent786b180 commit6ee06b0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

‎src/include/storage/s_lock.h

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* 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 $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -266,10 +266,11 @@ static const slock_t clear_lock =
266266
* assembly from his NECEWS SVR4 port, but we probably ought to retain this
267267
* for the R3000 chips out there.
268268
*/
269-
#defineTAS(lock)(!acquire_lock(lock))
270-
#defineS_UNLOCK(lock)release_lock(lock)
271-
#defineS_INIT_LOCK(lock)init_lock(lock)
272-
#defineS_LOCK_FREE(lock)(stat_lock(lock) == UNLOCKED)
269+
#include<mutex.h>
270+
#defineTAS(lock)(test_and_set(lock,1))
271+
#defineS_UNLOCK(lock)(test_then_and(lock,0))
272+
#defineS_INIT_LOCK(lock)(test_then_and(lock,0))
273+
#defineS_LOCK_FREE(lock)(test_then_add(lock,0) == 0)
273274
#endif/* __sgi */
274275

275276

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp