Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
58ed1232
Commit
58ed1232
authored
27 years ago
by
Bruce Momjian
Browse files
Options
Downloads
Patches
Plain Diff
Fix for netbsd locking, from Henry B. Hotz.
parent
e2617c85
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/include/port/BSD44_derived.h
+11
-1
11 additions, 1 deletion
src/include/port/BSD44_derived.h
src/include/storage/s_lock.h
+30
-1
30 additions, 1 deletion
src/include/storage/s_lock.h
with
41 additions
and
2 deletions
src/include/port/BSD44_derived.h
+
11
−
1
View file @
58ed1232
#define USE_POSIX_TIME
#if defined(i386)
#define NEED_I386_TAS_ASM
#define HAS_TEST_AND_SET
#endif
#if defined(sparc)
#define NEED_SPARC_TAS_ASM
#define HAS_TEST_AND_SET
#endif
#if defined(ns32k)
#define NEED_NS32k_TAS_ASM
#define HAS_TEST_AND_SET
#endif
#if defined(__m68k__)
#define HAS_TEST_AND_SET
#endif
#if defined(__mips__)
/* #
undef HAS_TEST_AND_SET */
/* #
undef HAS_TEST_AND_SET */
#endif
typedef
unsigned
char
slock_t
;
This diff is collapsed.
Click to expand it.
src/include/storage/s_lock.h
+
30
−
1
View file @
58ed1232
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.1
0
1997/10/
03 1
5:2
7
:1
8
momjian Exp $
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.1
1
1997/10/
30 0
5:2
4
:1
9
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -24,6 +24,10 @@
* ;
* }
*
* In addition to modifying this file you will need to modify
* the appropriate ...src/include/port/...h file to define
* HAS_TEST_AND_SET for the appropriate circumstances.
*
* If this is not done, POSTGRES will default to using System V
* semaphores (and take a large performance hit -- around 40% of
* its time on a DS5000/240 is spent in semop(3)...).
...
...
@@ -228,6 +232,31 @@ tas_dummy()
#endif
/* sun3 */
/*
* M68000 ports under NetBSD.
*
* This version should also work on a sun3, but I can't test it.
* Conversely the sun3 version should work under NetBSD/m68k, but
* it doesn't.
*/
#if defined(__NetBSD__) && defined(__m68k__)
static
void
S_LOCK
(
char
*
lock
)
{
asm
(
"
movel a6@(8),a0
LOOP:
tas a0@
bmi LOOP
"
);
}
#define S_UNLOCK(lock) (*(lock) = 0)
#define S_INIT_LOCK(lock) S_UNLOCK(lock)
#endif
/* M68000 && NetBSD */
/*
* sparc machines
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment