Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
68769616
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
68769616
编写于
2月 24, 2015
作者:
S
sgehwolf
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8067331: Zero: Atomic::xchg and Atomic::xchg_ptr need full memory barrier
Reviewed-by: dholmes, coleenp
上级
d223357e
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
22 addition
and
6 deletion
+22
-6
src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp
src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp
+10
-2
src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
+12
-4
未找到文件。
src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp
浏览文件 @
68769616
...
...
@@ -238,7 +238,13 @@ inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) {
// operation. Note that some platforms only support this with the
// limitation that the only valid value to store is the immediate
// constant 1. There is a test for this in JNI_CreateJavaVM().
return
__sync_lock_test_and_set
(
dest
,
exchange_value
);
jint
result
=
__sync_lock_test_and_set
(
dest
,
exchange_value
);
// All atomic operations are expected to be full memory barriers
// (see atomic.hpp). However, __sync_lock_test_and_set is not
// a full memory barrier, but an acquire barrier. Hence, this added
// barrier.
__sync_synchronize
();
return
result
;
#endif // M68K
#endif // ARM
}
...
...
@@ -251,7 +257,9 @@ inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value,
#ifdef M68K
return
m68k_lock_test_and_set
(
dest
,
exchange_value
);
#else
return
__sync_lock_test_and_set
(
dest
,
exchange_value
);
intptr_t
result
=
__sync_lock_test_and_set
(
dest
,
exchange_value
);
__sync_synchronize
();
return
result
;
#endif // M68K
#endif // ARM
}
...
...
src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp
浏览文件 @
68769616
/*
* Copyright (c) 2003, 201
3
, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2011 Red Hat, Inc.
* Copyright (c) 2003, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright 2007, 2008, 2011
, 2015,
Red Hat, Inc.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
...
...
@@ -232,7 +232,13 @@ inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) {
// operation. Note that some platforms only support this with the
// limitation that the only valid value to store is the immediate
// constant 1. There is a test for this in JNI_CreateJavaVM().
return
__sync_lock_test_and_set
(
dest
,
exchange_value
);
jint
result
=
__sync_lock_test_and_set
(
dest
,
exchange_value
);
// All atomic operations are expected to be full memory barriers
// (see atomic.hpp). However, __sync_lock_test_and_set is not
// a full memory barrier, but an acquire barrier. Hence, this added
// barrier.
__sync_synchronize
();
return
result
;
#endif // M68K
#endif // ARM
}
...
...
@@ -245,7 +251,9 @@ inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value,
#ifdef M68K
return
m68k_lock_test_and_set
(
dest
,
exchange_value
);
#else
return
__sync_lock_test_and_set
(
dest
,
exchange_value
);
intptr_t
result
=
__sync_lock_test_and_set
(
dest
,
exchange_value
);
__sync_synchronize
();
return
result
;
#endif // M68K
#endif // ARM
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录