mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Fix PPC s_lock operations to work correctly on multi-CPU machines.
Need 'isync' during TAS and 'sync' during S_UNLOCK.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/s_lock.c,v 1.8 2002/06/20 20:29:35 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/s_lock.c,v 1.9 2002/09/21 00:14:05 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -115,6 +115,9 @@ _success: \n\
|
||||
/* used in darwin. */
|
||||
/* We key off __APPLE__ here because this function differs from
|
||||
* the LinuxPPC implementation only in compiler syntax.
|
||||
*
|
||||
* NOTE: per the Enhanced PowerPC Architecture manual, v1.0 dated 7-May-2002,
|
||||
* an isync is a sufficient synchronization barrier after a lwarx/stwcx loop.
|
||||
*/
|
||||
static void
|
||||
tas_dummy()
|
||||
@@ -134,6 +137,7 @@ tas: \n\
|
||||
fail: li r3,1 \n\
|
||||
blr \n\
|
||||
success: \n\
|
||||
isync \n\
|
||||
li r3,0 \n\
|
||||
blr \n\
|
||||
");
|
||||
@@ -158,6 +162,7 @@ tas: \n\
|
||||
fail: li 3,1 \n\
|
||||
blr \n\
|
||||
success: \n\
|
||||
isync \n\
|
||||
li 3,0 \n\
|
||||
blr \n\
|
||||
");
|
||||
|
Reference in New Issue
Block a user