Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
85f75551
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
85f75551
编写于
9月 22, 1997
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Small lock cleanup for prototype.
上级
5fb82eb4
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
25 deletion
+15
-25
src/include/storage/ipc.h
src/include/storage/ipc.h
+1
-15
src/include/storage/s_lock.h
src/include/storage/s_lock.h
+14
-10
未找到文件。
src/include/storage/ipc.h
浏览文件 @
85f75551
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: ipc.h,v 1.2
1 1997/09/18 14:20:54
momjian Exp $
* $Id: ipc.h,v 1.2
2 1997/09/22 15:49:11
momjian Exp $
*
* NOTES
* This file is very architecture-specific. This stuff should actually
...
...
@@ -26,20 +26,6 @@
#include <config.h>
#if defined(HAS_TEST_AND_SET)
#if (defined(alpha) && !defined(linuxalpha)) || \
defined(hpux) || \
defined(irix5) || \
defined(nextstep)
extern
int
S_LOCK_FREE
(
slock_t
*
lock
);
#else
#define S_LOCK_FREE(lock) ((*lock) == 0)
#endif
#endif
/* HAS_TEST_AND_SET */
#ifndef HAVE_UNION_SEMUN
union
semun
{
...
...
src/include/storage/s_lock.h
浏览文件 @
85f75551
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.
2 1997/09/22 04:21:51 vadim
Exp $
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.
3 1997/09/22 15:49:14 momjian
Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -301,11 +301,11 @@ tas_dummy()
#define S_LOCK(lock) do \
{ \
slock_t res; \
slock_t
_
res; \
do \
{ \
__asm__("xchgb %0,%1": "=q"(res), "=m"(*lock):"0"(0x1)); \
} while (res != 0); \
__asm__("xchgb %0,%1": "=q"(
_
res), "=m"(*lock):"0"(0x1)); \
} while (
_
res != 0); \
} while (0)
#define S_UNLOCK(lock) (*(lock) = 0)
...
...
@@ -319,7 +319,7 @@ tas_dummy()
#define S_LOCK(lock) do \
{ \
slock_t res; \
slock_t
_
res; \
do \
{ \
__asm__(" ldq $0, %0 \n\
...
...
@@ -334,8 +334,8 @@ tas_dummy()
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); \
end: nop ": "=m"(*lock), "=r"(
_
res): :"0"); \
} while (
_
res != 0); \
} while (0)
...
...
@@ -349,13 +349,13 @@ tas_dummy()
#define S_LOCK(lock) do \
{ \
slock_t res; \
slock_t
_
res; \
do \
{ \
__asm__("ldstub [%1], %0" \
: "=&r"(res) \
: "=&r"(
_
res) \
: "r"(lock)); \
} while (!res != 0); \
} while (!
_
res != 0); \
} while (0)
#define S_UNLOCK(lock) (*(lock) = 0)
...
...
@@ -399,6 +399,10 @@ success: \n\
#endif
/* defined(linux) && defined(PPC) */
#else
/* HAS_TEST_AND_SET */
#define S_LOCK_FREE(lock) ((*lock) == 0)
#endif
/* HAS_TEST_AND_SET */
#endif
/* S_LOCK_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录