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
42a3c46b
Commit
42a3c46b
authored
27 years ago
by
Marc G. Fournier
Browse files
Options
Downloads
Patches
Plain Diff
Oops, missed adding a file
From: Ryan Kirkpatrick <rkirkpat@nag.cs.colorado.edu>
parent
8a0967a3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend/storage/buffer/s_lock.c
+65
-0
65 additions, 0 deletions
src/backend/storage/buffer/s_lock.c
with
65 additions
and
0 deletions
src/backend/storage/buffer/s_lock.c
0 → 100644
+
65
−
0
View file @
42a3c46b
/*-------------------------------------------------------------------------
*
* s_lock.c--
* buffer manager interface routines
*
* Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.1 1997/12/30 04:03:01 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
/*
* S_LOCK() -- Implements the S_LOCK function for the Linux/Alpha platform.
* This function is usually an inlined macro for all other platforms,
* but must be a seperate function for the Linux/Alpha platform, due
* to the assembly code involved.
*/
#if defined(__alpha__) && defined(linux)
#include
<sys/types.h>
#include
<sys/file.h>
#include
<stdio.h>
#include
<string.h>
#include
<math.h>
#include
<signal.h>
#include
"postgres.h"
/* declarations split between these three files */
#include
"storage/buf.h"
#include
"storage/buf_internals.h"
#include
"storage/bufmgr.h"
#include
"storage/fd.h"
#include
"storage/ipc.h"
#include
"storage/s_lock.h"
void
S_LOCK
(
slock_t
*
lock
)
{
do
{
slock_t
_res
;
do
{
__asm__
(
" ldq $0, %0
\n
\
bne $0, already_set
\n
\
ldq_l $0, %0
\n
\
bne $0, already_set
\n
\
or $31, 1, $0
\n
\
stq_c $0, %0
\n
\
beq $0, stqc_fail
\n
\
success: bis $31, $31, %1
\n
\
mb
\n
\
jmp $31, end
\n
\
stqc_fail: or $31, 1, $0
\n
\
already_set: bis $0, $0, %1
\n
\
end: nop "
:
"=m"
(
*
lock
),
"=r"
(
_res
)
:
:
"0"
);
}
while
(
_res
!=
0
);
}
while
(
0
);
}
#endif
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