Skip to content

Commit 69f2e9b

Browse files
committed
Move slock_t typdefs into s_lock.h from include/port files for
centralization and easier maintanence.
1 parent dcae578 commit 69f2e9b

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/23 00:32:06 momjian Exp $
12+
* $PostgreSQL: pgsql/src/backend/storage/lmgr/s_lock.c,v 1.20 2003/12/23 03: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
#ifdef HAS_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
#define CLASS_CONFLICT
22
#define DISABLE_XOPEN_NLS
3-
#define HAS_TEST_AND_SET
4-
5-
typedef unsigned int slock_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-
#define HAS_TEST_AND_SET
6-
7-
typedef unsigned char slock_t;
8-
95
#define AF_UNIX 10 /* 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-
typedef unsigned char slock_t;
3-
#endif
4-
#if defined(__ia64)
5-
typedef unsigned int slock_t;
6-
#endif
7-
#if defined(__sparc__)
8-
typedef unsigned char slock_t;
9-
#endif
10-
11-
#define HAS_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-
#define HAS_TEST_AND_SET
4-
typedef unsigned char slock_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-
#define HAS_TEST_AND_SET
5-
#endif
6-
7-
#if defined(__ppc__)
8-
typedef unsigned int slock_t;
9-
10-
#else
11-
typedef unsigned char slock_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-
#define HAS_TEST_AND_SET
3-
typedef unsigned char slock_t;
4-
#endif
5-
6-
#if defined(__ia64)
7-
#define HAS_TEST_AND_SET
8-
typedef unsigned int slock_t;
9-
#endif
10-
11-
#if defined(__sparc__)
12-
#define HAS_TEST_AND_SET
13-
typedef unsigned char slock_t;
14-
#endif
15-
16-
#if defined(__vax__)
17-
#define NEED_VAX_TAS_ASM
18-
#define HAS_TEST_AND_SET
19-
typedef unsigned char slock_t;
20-
#endif
21-
22-
#if defined(__ns32k__)
23-
#define NEED_NS32K_TAS_ASM
24-
#define HAS_TEST_AND_SET
25-
typedef unsigned char slock_t;
26-
#endif
27-
28-
#if defined(__m68k__)
29-
#define HAS_TEST_AND_SET
30-
typedef unsigned char slock_t;
31-
#endif
32-
33-
#if defined(__arm__)
34-
#define HAS_TEST_AND_SET
35-
typedef unsigned char slock_t;
36-
#endif
37-
38-
#if defined(__mips__)
39-
/* # undef HAS_TEST_AND_SET */
40-
#endif
41-
42-
#if defined(__alpha__)
43-
#define HAS_TEST_AND_SET
44-
typedef unsigned long slock_t;
45-
#endif
46-
47-
#if defined(__powerpc__)
48-
#define HAS_TEST_AND_SET
49-
typedef unsigned int slock_t;
50-
51-
#endif

0 commit comments

Comments
 (0)