Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
a3e3eece
D
dragonwell8_jdk
项目概览
openanolis
/
dragonwell8_jdk
通知
4
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_jdk
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
a3e3eece
编写于
3月 22, 2012
作者:
Z
zhangshj
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
7155300: Include pthread.h on all POSIX platforms except Solaris to improve portability
Reviewed-by: alanb, dholmes
上级
4950df76
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
20 deletion
+17
-20
src/solaris/bin/java_md.c
src/solaris/bin/java_md.c
+15
-15
src/solaris/transport/socket/socket_md.c
src/solaris/transport/socket/socket_md.c
+2
-5
未找到文件。
src/solaris/bin/java_md.c
浏览文件 @
a3e3eece
...
...
@@ -37,10 +37,10 @@
#include "manifest_info.h"
#include "version_comp.h"
#ifdef __linux__
#include <pthread.h>
#else
#ifdef __solaris__
#include <thread.h>
#else
#include <pthread.h>
#endif
#define JVM_DLL "libjvm.so"
...
...
@@ -1434,7 +1434,18 @@ jlong_format_specifier() {
int
ContinueInNewThread0
(
int
(
JNICALL
*
continuation
)(
void
*
),
jlong
stack_size
,
void
*
args
)
{
int
rslt
;
#ifdef __linux__
#ifdef __solaris__
thread_t
tid
;
long
flags
=
0
;
if
(
thr_create
(
NULL
,
stack_size
,
(
void
*
(
*
)(
void
*
))
continuation
,
args
,
flags
,
&
tid
)
==
0
)
{
void
*
tmp
;
thr_join
(
tid
,
NULL
,
&
tmp
);
rslt
=
(
int
)
tmp
;
}
else
{
/* See below. Continue in current thread if thr_create() failed */
rslt
=
continuation
(
args
);
}
#else
pthread_t
tid
;
pthread_attr_t
attr
;
pthread_attr_init
(
&
attr
);
...
...
@@ -1459,17 +1470,6 @@ ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void
}
pthread_attr_destroy
(
&
attr
);
#else
thread_t
tid
;
long
flags
=
0
;
if
(
thr_create
(
NULL
,
stack_size
,
(
void
*
(
*
)(
void
*
))
continuation
,
args
,
flags
,
&
tid
)
==
0
)
{
void
*
tmp
;
thr_join
(
tid
,
NULL
,
&
tmp
);
rslt
=
(
int
)
tmp
;
}
else
{
/* See above. Continue in current thread if thr_create() failed */
rslt
=
continuation
(
args
);
}
#endif
return
rslt
;
}
...
...
src/solaris/transport/socket/socket_md.c
浏览文件 @
a3e3eece
...
...
@@ -35,8 +35,7 @@
#include <sys/time.h>
#ifdef __solaris__
#include <thread.h>
#endif
#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#else
#include <pthread.h>
#include <sys/poll.h>
#endif
...
...
@@ -306,9 +305,7 @@ dbgsysTlsGet(int index) {
return
r
;
}
#endif
#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#else
int
dbgsysTlsAlloc
()
{
pthread_key_t
key
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录