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

Commit69f2e9b

Browse files
committed
Move slock_t typdefs into s_lock.h from include/port files for
centralization and easier maintanence.
1 parentdcae578 commit69f2e9b

File tree

25 files changed

+158
-382
lines changed

25 files changed

+158
-382
lines changed

‎src/backend/port/dynloader/netbsd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*-
1+
/*
22
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
33
* Portions Copyright (c) 1990 The Regents of the University of California.
44
* All rights reserved.

‎src/backend/port/dynloader/openbsd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*-
1+
/*
22
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
33
* Portions Copyright (c) 1990 The Regents of the University of California.
44
* All rights reserved.

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

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

1818
#include<sys/time.h>
1919
#include<unistd.h>
20-
2120
#include"storage/s_lock.h"
2221

2322

@@ -118,6 +117,9 @@ s_lock(volatile slock_t *lock, const char *file, int line)
118117
* Various TAS implementations that cannot live in s_lock.h as no inline
119118
* definition exists (yet).
120119
* In the future, get rid of tas.[cso] and fold it into this file.
120+
*
121+
* If you change something here, you have to modify s_lock.h because
122+
* the definitions for these is split between this file and s_lock.h.
121123
*/
122124

123125

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

Lines changed: 2 additions & 1 deletion
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.12 2003/11/29 19:51:57 pgsql Exp $
19+
* $PostgreSQL: pgsql/src/backend/storage/lmgr/spin.c,v 1.13 2003/12/23 03:31:30 momjian Exp $
2020
*
2121
*-------------------------------------------------------------------------
2222
*/
@@ -25,6 +25,7 @@
2525
#include"storage/lwlock.h"
2626
#include"storage/pg_sema.h"
2727
#include"storage/spin.h"
28+
#include"storage/s_lock.h"
2829

2930

3031
#ifdefHAS_TEST_AND_SET

‎src/include/port/aix.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
#defineCLASS_CONFLICT
22
#defineDISABLE_XOPEN_NLS
3-
#defineHAS_TEST_AND_SET
4-
5-
typedefunsignedintslock_t;
63

74
#include<sys/machine.h>/* ENDIAN definitions for network
85
* communication */

‎src/include/port/beos.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
#include<kernel/image.h>
33
#include<sys/ioctl.h>
44

5-
#defineHAS_TEST_AND_SET
6-
7-
typedefunsignedcharslock_t;
8-
95
#defineAF_UNIX10/* no domain sockets on BeOS */
106

117
/* Beos doesn't have all the required getrusage fields */

‎src/include/port/bsdi.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +0,0 @@
1-
#if defined(__i386__)|| defined(__x86_64__)
2-
typedefunsignedcharslock_t;
3-
#endif
4-
#if defined(__ia64)
5-
typedefunsignedintslock_t;
6-
#endif
7-
#if defined(__sparc__)
8-
typedefunsignedcharslock_t;
9-
#endif
10-
11-
#defineHAS_TEST_AND_SET
12-

‎src/include/port/cygwin.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
/* $PostgreSQL: pgsql/src/include/port/cygwin.h,v 1.5 2003/11/29 19:52:08 pgsql Exp $ */
2-
3-
#defineHAS_TEST_AND_SET
4-
typedefunsignedcharslock_t;
1+
/* $PostgreSQL: pgsql/src/include/port/cygwin.h,v 1.6 2003/12/23 03:31:30 momjian Exp $ */
52

63
#include<cygwin/version.h>
74

‎src/include/port/darwin.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
11
#define__darwin__1
2-
3-
#if defined(__ppc__)
4-
#defineHAS_TEST_AND_SET
5-
#endif
6-
7-
#if defined(__ppc__)
8-
typedefunsignedintslock_t;
9-
10-
#else
11-
typedefunsignedcharslock_t;
12-
13-
#endif

‎src/include/port/freebsd.h

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +0,0 @@
1-
#if defined(__i386__)|| defined(__x86_64__)
2-
#defineHAS_TEST_AND_SET
3-
typedefunsignedcharslock_t;
4-
#endif
5-
6-
#if defined(__ia64)
7-
#defineHAS_TEST_AND_SET
8-
typedefunsignedintslock_t;
9-
#endif
10-
11-
#if defined(__sparc__)
12-
#defineHAS_TEST_AND_SET
13-
typedefunsignedcharslock_t;
14-
#endif
15-
16-
#if defined(__vax__)
17-
#defineNEED_VAX_TAS_ASM
18-
#defineHAS_TEST_AND_SET
19-
typedefunsignedcharslock_t;
20-
#endif
21-
22-
#if defined(__ns32k__)
23-
#defineNEED_NS32K_TAS_ASM
24-
#defineHAS_TEST_AND_SET
25-
typedefunsignedcharslock_t;
26-
#endif
27-
28-
#if defined(__m68k__)
29-
#defineHAS_TEST_AND_SET
30-
typedefunsignedcharslock_t;
31-
#endif
32-
33-
#if defined(__arm__)
34-
#defineHAS_TEST_AND_SET
35-
typedefunsignedcharslock_t;
36-
#endif
37-
38-
#if defined(__mips__)
39-
/* #undef HAS_TEST_AND_SET */
40-
#endif
41-
42-
#if defined(__alpha__)
43-
#defineHAS_TEST_AND_SET
44-
typedefunsigned longslock_t;
45-
#endif
46-
47-
#if defined(__powerpc__)
48-
#defineHAS_TEST_AND_SET
49-
typedefunsignedintslock_t;
50-
51-
#endif

‎src/include/port/hpux.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,12 @@
1010

1111
#if defined(__hppa)
1212

13-
#defineHAS_TEST_AND_SET
14-
typedefstruct
15-
{
16-
intsema[4];
17-
}slock_t;
18-
1913
#ifndefBYTE_ORDER
2014
#defineBYTE_ORDERBIG_ENDIAN
2115
#endif
2216

2317
#elif defined(__ia64)
2418

25-
#defineHAS_TEST_AND_SET
26-
typedefunsignedintslock_t;
27-
2819
#ifndefBYTE_ORDER
2920
#defineBYTE_ORDERLITTLE_ENDIAN
3021
#endif

‎src/include/port/irix5.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
#defineHAS_TEST_AND_SET
2-
3-
typedefunsigned longslock_t;

‎src/include/port/linux.h

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +0,0 @@
1-
#if defined(__i386__)|| defined(__x86_64__)
2-
typedefunsignedcharslock_t;
3-
4-
#defineHAS_TEST_AND_SET
5-
6-
#elif defined(__sparc__)
7-
typedefunsignedcharslock_t;
8-
9-
#defineHAS_TEST_AND_SET
10-
11-
#elif defined(__powerpc64__)
12-
typedefunsigned longslock_t;
13-
14-
#defineHAS_TEST_AND_SET
15-
16-
#elif defined(__powerpc__)
17-
typedefunsignedintslock_t;
18-
19-
#defineHAS_TEST_AND_SET
20-
21-
#elif defined(__alpha__)
22-
typedeflongintslock_t;
23-
24-
#defineHAS_TEST_AND_SET
25-
26-
#elif defined(__mips__)
27-
typedefunsignedintslock_t;
28-
29-
#defineHAS_TEST_AND_SET
30-
31-
#elif defined(__arm__)
32-
typedefunsignedcharslock_t;
33-
34-
#defineHAS_TEST_AND_SET
35-
36-
#elif defined(__ia64__)
37-
typedefunsignedintslock_t;
38-
39-
#defineHAS_TEST_AND_SET
40-
41-
#elif defined(__s390__)|| defined(__s390x__)
42-
typedefunsignedintslock_t;
43-
44-
#defineHAS_TEST_AND_SET
45-
46-
#elif defined(__mc68000__)
47-
typedefunsignedcharslock_t;
48-
49-
#defineHAS_TEST_AND_SET
50-
51-
#endif

‎src/include/port/netbsd.h

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +0,0 @@
1-
#if defined(__i386__)|| defined(__x86_64__)
2-
#defineHAS_TEST_AND_SET
3-
typedefunsignedcharslock_t;
4-
#endif
5-
6-
#if defined(__ia64)
7-
#defineHAS_TEST_AND_SET
8-
typedefunsignedintslock_t;
9-
#endif
10-
11-
#if defined(__sparc__)
12-
#defineHAS_TEST_AND_SET
13-
typedefunsignedcharslock_t;
14-
#endif
15-
16-
#if defined(__vax__)
17-
#defineNEED_VAX_TAS_ASM
18-
#defineHAS_TEST_AND_SET
19-
typedefunsignedcharslock_t;
20-
#endif
21-
22-
#if defined(__ns32k__)
23-
#defineNEED_NS32K_TAS_ASM
24-
#defineHAS_TEST_AND_SET
25-
typedefunsignedcharslock_t;
26-
#endif
27-
28-
#if defined(__m68k__)
29-
#defineHAS_TEST_AND_SET
30-
typedefunsignedcharslock_t;
31-
#endif
32-
33-
#if defined(__arm__)
34-
#defineHAS_TEST_AND_SET
35-
typedefunsignedcharslock_t;
36-
#endif
37-
38-
#if defined(__mips__)
39-
/* #undef HAS_TEST_AND_SET */
40-
#endif
41-
42-
#if defined(__alpha__)
43-
#defineHAS_TEST_AND_SET
44-
typedefunsigned longslock_t;
45-
#endif
46-
47-
#if defined(__powerpc__)
48-
#defineHAS_TEST_AND_SET
49-
typedefunsignedintslock_t;
50-
51-
#endif

‎src/include/port/nextstep.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,3 @@ typedef int sigset_t;
1515
#endif
1616

1717
#defineNO_WAITPID
18-
typedefstructmutexslock_t;

‎src/include/port/openbsd.h

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +0,0 @@
1-
#if defined(__i386__)|| defined(__x86_64__)
2-
#defineHAS_TEST_AND_SET
3-
typedefunsignedcharslock_t;
4-
#endif
5-
6-
#if defined(__ia64)
7-
#defineHAS_TEST_AND_SET
8-
typedefunsignedintslock_t;
9-
#endif
10-
11-
#if defined(__sparc__)
12-
#defineHAS_TEST_AND_SET
13-
typedefunsignedcharslock_t;
14-
#endif
15-
16-
#if defined(__vax__)
17-
#defineNEED_VAX_TAS_ASM
18-
#defineHAS_TEST_AND_SET
19-
typedefunsignedcharslock_t;
20-
#endif
21-
22-
#if defined(__ns32k__)
23-
#defineNEED_NS32K_TAS_ASM
24-
#defineHAS_TEST_AND_SET
25-
typedefunsignedcharslock_t;
26-
#endif
27-
28-
#if defined(__m68k__)
29-
#defineHAS_TEST_AND_SET
30-
typedefunsignedcharslock_t;
31-
#endif
32-
33-
#if defined(__arm__)
34-
#defineHAS_TEST_AND_SET
35-
typedefunsignedcharslock_t;
36-
#endif
37-
38-
#if defined(__mips__)
39-
/* #undef HAS_TEST_AND_SET */
40-
#endif
41-
42-
#if defined(__alpha__)
43-
#defineHAS_TEST_AND_SET
44-
typedefunsigned longslock_t;
45-
#endif
46-
47-
#if defined(__powerpc__)
48-
#defineHAS_TEST_AND_SET
49-
typedefunsignedintslock_t;
50-
51-
#endif

‎src/include/port/osf.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,2 @@
11
#defineNOFIXADE
22
#defineDISABLE_XOPEN_NLS
3-
#defineHAS_TEST_AND_SET
4-
/* #include <sys/mman.h> *//* for msemaphore */
5-
/*typedef msemaphore slock_t;*/
6-
#include<alpha/builtins.h>
7-
typedefvolatilelongslock_t;

‎src/include/port/qnx4.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
#include<unix.h>
66
#include<sys/select.h>/* for select */
77

8-
#defineHAS_TEST_AND_SET
9-
108
#undef HAVE_GETRUSAGE
119

1210
#definestrncasecmp strnicmp
@@ -22,8 +20,6 @@ extern unsigned char __nan[8];
2220

2321
typedefu_shortushort;
2422

25-
typedefunsignedcharslock_t;
26-
2723
externintisnan(doubledsrc);
2824

2925
externlongrandom(void);

‎src/include/port/sco.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
/* see src/backend/libpq/pqcomm.c */
22
#defineSCO_ACCEPT_BUG
33

4-
#defineHAS_TEST_AND_SET
5-
64
#defineUSE_UNIVEL_CC
75

8-
#if defined(__ia64)
9-
typedefunsignedintslock_t;
10-
#else
11-
typedefunsignedcharslock_t;
12-
#endif
13-
14-
156
#ifndefBIG_ENDIAN
167
#defineBIG_ENDIAN4321
178
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp