Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
54ffd467
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,发现更多精彩内容 >>
提交
54ffd467
编写于
11月 23, 1999
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ecpg ECPGFree fix from Rene Hogendoorn.
上级
85bb91a3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
48 addition
and
45 deletion
+48
-45
src/include/storage/s_lock.h
src/include/storage/s_lock.h
+47
-44
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/ecpg/preproc/preproc.y
+1
-1
未找到文件。
src/include/storage/s_lock.h
浏览文件 @
54ffd467
...
...
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.6
6 1999/11/18 21:47:41
momjian Exp $
* $Header: /cvsroot/pgsql/src/include/storage/s_lock.h,v 1.6
7 1999/11/23 19:47:13
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -78,35 +78,6 @@ extern void s_lock_sleep(unsigned spin);
* All the gcc inlines
*/
#if defined(__alpha__)
#define TAS(lock) tas(lock)
#define S_UNLOCK(lock) { __asm__("mb"); *(lock) = 0; }
static
__inline__
int
tas
(
volatile
slock_t
*
lock
)
{
register
slock_t
_res
;
__asm__
(
" ldq $0, %0
\n
\
bne $0, 3f
\n
\
ldq_l $0, %0
\n
\
bne $0, 3f
\n
\
or $31, 1, $0
\n
\
stq_c $0, %0
\n
\
beq $0, 2f
\n
\
bis $31, $31, %1
\n
\
mb
\n
\
jmp $31, 4f
\n
\
2: or $31, 1, $0
\n
\
3: bis $0, $0, %1
\n
\
4: nop "
:
"=m"
(
*
lock
),
"=r"
(
_res
)
:
:
"0"
);
return
(
int
)
_res
;
}
#endif
/* __alpha__ */
#if defined(__i386__)
#define TAS(lock) tas(lock)
...
...
@@ -226,20 +197,6 @@ tas(volatile slock_t *lock)
* All non gcc
*/
#if defined(__alpha__)
/*
* OSF/1 (Alpha AXP)
*
* Note that slock_t on the Alpha AXP is msemaphore instead of char
* (see storage/ipc.h).
*/
#define TAS(lock) (msem_lock((lock), MSEM_IF_NOWAIT) < 0)
#define S_UNLOCK(lock) msem_unlock((lock), 0)
#define S_INIT_LOCK(lock) msem_init((lock), MSEM_UNLOCKED)
#define S_LOCK_FREE(lock) (!(lock)->msem_state)
#endif
/* __alpha__ */
#if defined(NEED_I386_TAS_ASM)
/* non gcc i386 based things */
...
...
@@ -272,6 +229,52 @@ tas(slock_t *s_lock)
* These are the platforms that have common code for gcc and non-gcc
*/
#if defined(__alpha)
#if defined(__osf__)
/*
* OSF/1 (Alpha AXP)
*
* Note that slock_t on the Alpha AXP is msemaphore instead of char
* (see storage/ipc.h).
*/
#define TAS(lock) (msem_lock((lock), MSEM_IF_NOWAIT) < 0)
#define S_UNLOCK(lock) msem_unlock((lock), 0)
#define S_INIT_LOCK(lock) msem_init((lock), MSEM_UNLOCKED)
#define S_LOCK_FREE(lock) (!(lock)->msem_state)
#else
/* i.e. not __osf__ */
#define TAS(lock) tas(lock)
#define S_UNLOCK(lock) { __asm__("mb"); *(lock) = 0; }
static
__inline__
int
tas
(
volatile
slock_t
*
lock
)
{
register
slock_t
_res
;
__asm__
(
" ldq $0, %0
\n
\
bne $0, 3f
\n
\
ldq_l $0, %0
\n
\
bne $0, 3f
\n
\
or $31, 1, $0
\n
\
stq_c $0, %0
\n
\
beq $0, 2f
\n
\
bis $31, $31, %1
\n
\
mb
\n
\
jmp $31, 4f
\n
\
2: or $31, 1, $0
\n
\
3: bis $0, $0, %1
\n
\
4: nop "
:
"=m"
(
*
lock
),
"=r"
(
_res
)
:
:
"0"
);
return
(
int
)
_res
;
}
#endif
/* __osf__ */
#endif
/* __alpha */
#if defined(__hpux)
/*
* HP-UX (PA-RISC)
...
...
src/interfaces/ecpg/preproc/preproc.y
浏览文件 @
54ffd467
...
...
@@ -969,7 +969,7 @@ stmt: AddAttrStmt { output_statement($1, 0); }
output_statement($1, 0);
}
| ECPGFree {
fprintf(yyout, "{ ECPGdeallocate(__LINE__, %s, \"%s\");", connection ? connection : "NULL
", $1);
fprintf(yyout, "{ ECPGdeallocate(__LINE__, \"%s\");
", $1);
whenever_action(2);
free($1);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录