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
75815c31
Commit
75815c31
authored
Jan 19, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup.
parent
27aaf9df
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
71 additions
and
68 deletions
+71
-68
src/backend/storage/buffer/s_lock.c
src/backend/storage/buffer/s_lock.c
+13
-10
src/include/storage/s_lock.h
src/include/storage/s_lock.h
+58
-58
No files found.
src/backend/storage/buffer/s_lock.c
View file @
75815c31
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.3
0 2001/01/19 20:39:16
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.3
1 2001/01/19 21:09:57
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -144,7 +144,8 @@ _tas: \n\
rts
\n
\
_success:
\n
\
moveq #0,d0
\n
\
rts"
);
rts
\n
\
"
);
}
#endif
/* __m68k__ */
...
...
@@ -174,7 +175,7 @@ fail: li r3,1 \n\
success:
\n
\
li r3,0
\n
\
blr
\n
\
"
);
"
);
}
#endif
/* __APPLE__ && __ppc__ */
...
...
@@ -198,7 +199,8 @@ fail: li 3,1 \n\
blr
\n
\
success:
\n
\
li 3,0
\n
\
blr"
);
blr
\n
\
"
);
}
#endif
/* __powerpc__ */
...
...
@@ -222,7 +224,8 @@ tas: \n\
j $31
\n
\
fail:
\n
\
li $2, 1
\n
\
j $31"
);
j $31
\n
\
"
);
}
#endif
/* __mips__ */
...
...
src/include/storage/s_lock.h
View file @
75815c31
...
...
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.8
3 2001/01/19 20:39:16
momjian Exp $
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.8
4 2001/01/19 21:09:57
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -103,12 +103,12 @@ extern void s_lock_sleep(unsigned spins, int microsec,
* Standard _asm format:
*
* __asm__ __volatile__(
*
"command \n"
*
"command \n"
*
"command \n"
* :
"=r"(_res) return value, in register
* :
"r"(lock) argument, 'lock pointer', in register
* :
"r0"); inline code uses this register
"command \n"
"command \n"
"command \n"
:
"=r"(_res) return value, in register
:
"r"(lock) argument, 'lock pointer', in register
:
"r0"); inline code uses this register
*/
...
...
@@ -123,8 +123,8 @@ tas(volatile slock_t *lock)
__asm__
__volatile__
(
"lock
\n
"
"xchgb %0,%1
\n
"
:
"=q"
(
_res
),
"=m"
(
*
lock
)
:
"0"
(
_res
));
:
"=q"
(
_res
),
"=m"
(
*
lock
)
:
"0"
(
_res
));
return
(
int
)
_res
;
}
...
...
@@ -141,9 +141,9 @@ tas(volatile slock_t *lock)
__asm__
__volatile__
(
"xchg4 %0=%1,%2
\n
"
:
"=r"
(
ret
),
"=m"
(
*
lock
)
:
"r"
(
1
),
"1"
(
*
lock
)
:
"memory"
);
:
"=r"
(
ret
),
"=m"
(
*
lock
)
:
"r"
(
1
),
"1"
(
*
lock
)
:
"memory"
);
return
(
int
)
ret
;
}
...
...
@@ -161,8 +161,8 @@ tas(volatile slock_t *lock)
__asm__
__volatile__
(
"swpb %0, %0, [%3]
\n
"
:
"=r"
(
_res
),
"=m"
(
*
lock
)
:
"0"
(
_res
),
"r"
(
lock
));
:
"=r"
(
_res
),
"=m"
(
*
lock
)
:
"0"
(
_res
),
"r"
(
lock
));
return
(
int
)
_res
;
}
...
...
@@ -183,11 +183,11 @@ tas(volatile slock_t *lock)
"la 1,1
\n
"
"l 2,%2
\n
"
"slr 0,0
\n
"
"cs 0,1,0(2)
\n
"
"cs 0,1,0(2)
\n
"
"lr %1,0
\n
"
:
"=m"
(
lock
),
"=d"
(
_res
)
:
"m"
(
lock
)
:
"0"
,
"1"
,
"2"
);
:
"=m"
(
lock
),
"=d"
(
_res
)
:
"m"
(
lock
)
:
"0"
,
"1"
,
"2"
);
return
(
_res
);
}
...
...
@@ -205,8 +205,8 @@ tas(volatile slock_t *lock)
__asm__
__volatile__
(
"ldstub [%2], %0
\n
"
:
"=r"
(
_res
),
"=m"
(
*
lock
)
:
"r"
(
lock
));
:
"=r"
(
_res
),
"=m"
(
*
lock
)
:
"r"
(
lock
));
return
(
int
)
_res
;
}
...
...
@@ -224,9 +224,9 @@ tas(volatile slock_t *lock)
__asm__
__volatile__
(
"tas %1
\n
"
"sne %0
\n
"
:
"=d"
(
rv
),
"=m"
(
*
lock
)
:
"1"
(
*
lock
)
:
"cc"
);
:
"=d"
(
rv
),
"=m"
(
*
lock
)
:
"1"
(
*
lock
)
:
"cc"
);
return
rv
;
}
...
...
@@ -253,9 +253,9 @@ tas(volatile slock_t *lock)
"bbssi $0, (%1), 1f
\n
"
"clrl r0
\n
"
"1: movl r0, %0
\n
"
:
"=r"
(
_res
)
:
"r"
(
lock
)
:
"r0"
);
:
"=r"
(
_res
)
:
"r"
(
lock
)
:
"r0"
);
return
(
int
)
_res
;
}
...
...
@@ -273,7 +273,7 @@ tas(volatile slock_t *lock)
__asm__
__volatile__
(
"sbitb 0, %0
\n
"
"sfsd %1
\n
"
:
"=m"
(
*
lock
),
"=r"
(
_res
));
:
"=m"
(
*
lock
),
"=r"
(
_res
));
return
(
int
)
_res
;
}
...
...
@@ -349,10 +349,10 @@ tas(volatile slock_t *lock)
"mb
\n
"
"br 3f
\n
"
"2: mov 1, %1
\n
"
"3:
"
:
"=m"
(
*
lock
),
"=r"
(
_res
)
:
:
"0"
);
"3:
\n
"
:
"=m"
(
*
lock
),
"=r"
(
_res
)
:
:
"0"
);
return
(
int
)
_res
;
}
...
...
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