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

Commit9adaf64

Browse files
committed
Mop-up for HAS_TEST_AND_SET refactoring. Un-break two or three platforms
that were broken, try to make layout of s_lock.h entries consistent,use HAVE_SPINLOCKS in preference to HAS_TEST_AND_SET everywhere outsides_lock.h itself.
1 parentcaf6e9d commit9adaf64

File tree

6 files changed

+100
-83
lines changed

6 files changed

+100
-83
lines changed

‎doc/src/sgml/installation.sgml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.189 2003/12/13 23:59:06 neilc Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.190 2003/12/23 18:13:17 tgl Exp $ -->
22

33
<chapter id="installation">
44
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -1762,8 +1762,7 @@ kill `cat /usr/local/pgsql/data/postmaster.pid`
17621762
Peter Eisentraut (<email>peter_e@gmx.net</email>)</entry>
17631763
<entry>
17641764
needs new <filename>config.guess</filename>,
1765-
<option>--disable-spinlocks</option>, <literal>#undef
1766-
HAS_TEST_AND_SET</>, disable <function>tas_dummy()</>
1765+
<option>--disable-spinlocks</option>
17671766
</entry>
17681767
</row>
17691768
<row>

‎src/backend/storage/lmgr/s_lock.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.20 2003/12/2303:31:30 momjian Exp $
12+
* $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.21 2003/12/2318:13:17 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
1616
#include"postgres.h"
1717

1818
#include<sys/time.h>
1919
#include<unistd.h>
20+
2021
#include"storage/s_lock.h"
2122

2223

@@ -118,8 +119,8 @@ s_lock(volatile slock_t *lock, const char *file, int line)
118119
* definition exists (yet).
119120
* In the future, get rid of tas.[cso] and fold it into this file.
120121
*
121-
* If you change something here, youhaveto modify s_lock.hbecause
122-
* the definitions for theseis split between this file and s_lock.h.
122+
* If you change something here, youwill likely needto modify s_lock.htoo,
123+
*becausethe definitions for theseare split between this file and s_lock.h.
123124
*/
124125

125126

‎src/backend/storage/lmgr/spin.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
*
1818
* IDENTIFICATION
19-
* $PostgreSQL: pgsql/src/backend/storage/lmgr/spin.c,v 1.13 2003/12/2303:31:30 momjian Exp $
19+
* $PostgreSQL: pgsql/src/backend/storage/lmgr/spin.c,v 1.14 2003/12/2318:13:17 tgl Exp $
2020
*
2121
*-------------------------------------------------------------------------
2222
*/
@@ -25,10 +25,9 @@
2525
#include"storage/lwlock.h"
2626
#include"storage/pg_sema.h"
2727
#include"storage/spin.h"
28-
#include"storage/s_lock.h"
2928

3029

31-
#ifdefHAS_TEST_AND_SET
30+
#ifdefHAVE_SPINLOCKS
3231

3332
/*
3433
* Report number of semaphores needed to support spinlocks.
@@ -39,7 +38,7 @@ SpinlockSemas(void)
3938
return0;
4039
}
4140

42-
#else/* !HAS_TEST_AND_SET */
41+
#else/* !HAVE_SPINLOCKS */
4342

4443
/*
4544
* No TAS, so spinlocks are implemented as PGSemaphores.
@@ -93,4 +92,4 @@ tas_sema(volatile slock_t *lock)
9392
return !PGSemaphoreTryLock((PGSemaphore)lock);
9493
}
9594

96-
#endif/* !HAS_TEST_AND_SET */
95+
#endif/* !HAVE_SPINLOCKS */

‎src/include/port/univel.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#defineHAS_TEST_AND_SET
2-
31
/***************************************
42
* Define this if you are compiling with
53
* the native UNIXWARE C compiler.
@@ -17,5 +15,4 @@
1715
#endif
1816
#ifndefBYTE_ORDER
1917
#defineBYTE_ORDERLITTLE_ENDIAN
20-
2118
#endif

‎src/include/port/unixware.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#defineHAS_TEST_AND_SET
2-
31
/* see src/backend/libpq/pqcomm.c */
42
#defineSCO_ACCEPT_BUG
53

@@ -20,5 +18,4 @@
2018
#endif
2119
#ifndefBYTE_ORDER
2220
#defineBYTE_ORDERLITTLE_ENDIAN
23-
2421
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp