Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_jdk
提交
d7586529
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看板
提交
d7586529
编写于
8月 26, 2008
作者:
A
alanb
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
6728542: (se) epoll based SelectorProvider should be portable to platforms other than x86 and x64
Reviewed-by: sherman
上级
ac03c625
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
30 addition
and
6 deletion
+30
-6
make/java/nio/mapfile-linux
make/java/nio/mapfile-linux
+2
-0
src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java
src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java
+7
-5
src/solaris/native/sun/nio/ch/EPollArrayWrapper.c
src/solaris/native/sun/nio/ch/EPollArrayWrapper.c
+21
-1
未找到文件。
make/java/nio/mapfile-linux
浏览文件 @
d7586529
...
...
@@ -18,6 +18,8 @@ SUNWprivate_1.1 {
Java_sun_nio_ch_EPollArrayWrapper_fdLimit;
Java_sun_nio_ch_EPollArrayWrapper_init;
Java_sun_nio_ch_EPollArrayWrapper_interrupt;
Java_sun_nio_ch_EPollArrayWrapper_offsetofData;
Java_sun_nio_ch_EPollArrayWrapper_sizeofEPollEvent;
Java_sun_nio_ch_FileChannelImpl_close0;
Java_sun_nio_ch_FileChannelImpl_force0;
Java_sun_nio_ch_FileChannelImpl_initIDs;
...
...
src/solaris/classes/sun/nio/ch/EPollArrayWrapper.java
浏览文件 @
d7586529
...
...
@@ -69,11 +69,11 @@ class EPollArrayWrapper {
static
final
int
EPOLL_CTL_MOD
=
3
;
// Miscellaneous constants
static
final
short
SIZE_EPOLLEVENT
=
12
;
static
final
shor
t
EVENT_OFFSET
=
0
;
static
final
short
DATA_OFFSET
=
4
;
static
final
short
FD_OFFSET
=
4
;
static
final
int
NUM_EPOLLEVENTS
=
Math
.
min
(
fdLimit
(),
8192
);
static
final
int
SIZE_EPOLLEVENT
=
sizeofEPollEvent
()
;
static
final
in
t
EVENT_OFFSET
=
0
;
static
final
int
DATA_OFFSET
=
offsetofData
()
;
static
final
int
FD_OFFSET
=
DATA_OFFSET
;
static
final
int
NUM_EPOLLEVENTS
=
Math
.
min
(
fdLimit
(),
8192
);
// Base address of the native pollArray
private
final
long
pollArrayAddress
;
...
...
@@ -280,6 +280,8 @@ class EPollArrayWrapper {
private
native
void
epollCtl
(
int
epfd
,
int
opcode
,
int
fd
,
int
events
);
private
native
int
epollWait
(
long
pollAddress
,
int
numfds
,
long
timeout
,
int
epfd
)
throws
IOException
;
private
static
native
int
sizeofEPollEvent
();
private
static
native
int
offsetofData
();
private
static
native
int
fdLimit
();
private
static
native
void
interrupt
(
int
fd
);
private
static
native
void
init
();
...
...
src/solaris/native/sun/nio/ch/EPollArrayWrapper.c
浏览文件 @
d7586529
...
...
@@ -48,10 +48,18 @@ typedef union epoll_data {
__uint64_t
u64
;
}
epoll_data_t
;
/* x86-64 has same alignment as 32-bit */
#ifdef __x86_64__
#define EPOLL_PACKED __attribute__((packed))
#else
#define EPOLL_PACKED
#endif
struct
epoll_event
{
__uint32_t
events
;
/* Epoll events */
epoll_data_t
data
;
/* User data variable */
}
__attribute__
((
__packed__
))
;
}
EPOLL_PACKED
;
#ifdef __cplusplus
}
...
...
@@ -143,6 +151,18 @@ Java_sun_nio_ch_EPollArrayWrapper_fdLimit(JNIEnv *env, jclass this)
return
(
jint
)
rlp
.
rlim_max
;
}
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_EPollArrayWrapper_sizeofEPollEvent
(
JNIEnv
*
env
,
jclass
this
)
{
return
sizeof
(
struct
epoll_event
);
}
JNIEXPORT
jint
JNICALL
Java_sun_nio_ch_EPollArrayWrapper_offsetofData
(
JNIEnv
*
env
,
jclass
this
)
{
return
offsetof
(
struct
epoll_event
,
data
);
}
JNIEXPORT
void
JNICALL
Java_sun_nio_ch_EPollArrayWrapper_epollCtl
(
JNIEnv
*
env
,
jobject
this
,
jint
epfd
,
jint
opcode
,
jint
fd
,
jint
events
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录