Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
550f2097
Commit
550f2097
authored
Jul 18, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move common lock code to their own section.
parent
a93f3974
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
50 deletions
+52
-50
src/include/storage/s_lock.h
src/include/storage/s_lock.h
+52
-50
No files found.
src/include/storage/s_lock.h
View file @
550f2097
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.3
8 1998/07/18 14:51:10
momjian Exp $
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.3
9 1998/07/18 14:58:58
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -170,39 +170,6 @@ tas(volatile slock_t *lock)
* All non gcc
*/
#if defined (nextstep)
/*
* NEXTSTEP (mach)
* slock_t is defined as a struct mutex.
*/
#define S_LOCK(lock) mutex_lock(lock)
#define S_UNLOCK(lock) mutex_unlock(lock)
#define S_INIT_LOCK(lock) mutex_init(lock)
/* For Mach, we have to delve inside the entrails of `struct mutex'. Ick! */
#define S_LOCK_FREE(alock) ((alock)->lock == 0)
#endif
/* nextstep */
#if defined(__sgi)
/*
* SGI IRIX 5
* slock_t is defined as a struct abilock_t, which has a single unsigned long
* member.
*
* This stuff may be supplemented in the future with Masato Kataoka's MIPS-II
* assembly from his NECEWS SVR4 port, but we probably ought to retain this
* for the R3000 chips out there.
*/
#define TAS(lock) (!acquire_lock(lock))
#define S_UNLOCK(lock) release_lock(lock)
#define S_INIT_LOCK(lock) init_lock(lock)
#define S_LOCK_FREE(lock) (stat_lock(lock) == UNLOCKED)
#endif
/* __sgi */
#if defined(__alpha)
/*
* OSF/1 (Alpha AXP)
...
...
@@ -218,23 +185,9 @@ tas(volatile slock_t *lock)
#if defined(_AIX)
/*
* AIX (POWER)
*
* Note that slock_t on POWER/POWER2/PowerPC is int instead of char
* (see storage/ipc.h).
*/
#define TAS(lock) cs((int *) (lock), 0, 1)
#endif
/* _AIX */
#if defined(NEED_I386_TAS_ASM)
/* non gcc i386 based things */
#if defined(USE_UNIVEL_CC)
#define TAS(lock) tas(lock)
...
...
@@ -253,11 +206,16 @@ tas(slock_t *s_lock)
}
#endif
/* USE_UNIVEL_CC */
#endif
/* NEED_I386_TAS_ASM */
#endif
/* else defined(__GNUC__) */
#endif
/* defined(__GNUC__) */
/*************************************************************************
* These are the platforms that have common code for gcc and non-gcc
*/
#if defined(__hpux)
/*
...
...
@@ -277,6 +235,50 @@ static const slock_t clear_lock =
#endif
/* __hpux */
#if defined(__sgi)
/*
* SGI IRIX 5
* slock_t is defined as a struct abilock_t, which has a single unsigned long
* member.
*
* This stuff may be supplemented in the future with Masato Kataoka's MIPS-II
* assembly from his NECEWS SVR4 port, but we probably ought to retain this
* for the R3000 chips out there.
*/
#define TAS(lock) (!acquire_lock(lock))
#define S_UNLOCK(lock) release_lock(lock)
#define S_INIT_LOCK(lock) init_lock(lock)
#define S_LOCK_FREE(lock) (stat_lock(lock) == UNLOCKED)
#endif
/* __sgi */
#if defined(_AIX)
/*
* AIX (POWER)
*
* Note that slock_t on POWER/POWER2/PowerPC is int instead of char
* (see storage/ipc.h).
*/
#define TAS(lock) cs((int *) (lock), 0, 1)
#endif
/* _AIX */
#if defined (nextstep)
/*
* NEXTSTEP (mach)
* slock_t is defined as a struct mutex.
*/
#define S_LOCK(lock) mutex_lock(lock)
#define S_UNLOCK(lock) mutex_unlock(lock)
#define S_INIT_LOCK(lock) mutex_init(lock)
/* For Mach, we have to delve inside the entrails of `struct mutex'. Ick! */
#define S_LOCK_FREE(alock) ((alock)->lock == 0)
#endif
/* nextstep */
/****************************************************************************
* Default Definitions - override these above as needed.
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment