Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
qemu
提交
c596ed17
Q
qemu
项目概览
openeuler
/
qemu
通知
10
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Q
qemu
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
c596ed17
编写于
7月 13, 2003
作者:
B
bellard
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
times() fix
git-svn-id:
svn://svn.savannah.nongnu.org/qemu/trunk@327
c046a42c-6fe2-441c-8c8c-71466251a162
上级
91cf4d88
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
27 addition
and
6 deletion
+27
-6
linux-user/syscall.c
linux-user/syscall.c
+21
-4
linux-user/syscall_defs.h
linux-user/syscall_defs.h
+6
-2
未找到文件。
linux-user/syscall.c
浏览文件 @
c596ed17
...
@@ -210,6 +210,21 @@ static inline void host_to_target_fds(target_long *target_fds,
...
@@ -210,6 +210,21 @@ static inline void host_to_target_fds(target_long *target_fds,
#endif
#endif
}
}
#if defined(__alpha__)
#define HOST_HZ 1024
#else
#define HOST_HZ 100
#endif
static
inline
long
host_to_target_clock_t
(
long
ticks
)
{
#if HOST_HZ == TARGET_HZ
return
ticks
;
#else
return
((
int64_t
)
ticks
*
TARGET_HZ
)
/
HOST_HZ
;
#endif
}
static
inline
void
host_to_target_rusage
(
struct
target_rusage
*
target_rusage
,
static
inline
void
host_to_target_rusage
(
struct
target_rusage
*
target_rusage
,
const
struct
rusage
*
rusage
)
const
struct
rusage
*
rusage
)
{
{
...
@@ -1423,11 +1438,13 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
...
@@ -1423,11 +1438,13 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3,
struct
tms
tms
;
struct
tms
tms
;
ret
=
get_errno
(
times
(
&
tms
));
ret
=
get_errno
(
times
(
&
tms
));
if
(
tmsp
)
{
if
(
tmsp
)
{
tmsp
->
tms_utime
=
tswapl
(
tms
.
tms_utime
);
tmsp
->
tms_utime
=
tswapl
(
host_to_target_clock_t
(
tms
.
tms_utime
)
);
tmsp
->
tms_stime
=
tswapl
(
tms
.
tms_stime
);
tmsp
->
tms_stime
=
tswapl
(
host_to_target_clock_t
(
tms
.
tms_stime
)
);
tmsp
->
tms_cutime
=
tswapl
(
tms
.
tms_cutime
);
tmsp
->
tms_cutime
=
tswapl
(
host_to_target_clock_t
(
tms
.
tms_cutime
)
);
tmsp
->
tms_cstime
=
tswapl
(
tms
.
tms_cstime
);
tmsp
->
tms_cstime
=
tswapl
(
host_to_target_clock_t
(
tms
.
tms_cstime
)
);
}
}
if
(
!
is_error
(
ret
))
ret
=
host_to_target_clock_t
(
ret
);
}
}
break
;
break
;
case
TARGET_NR_prof
:
case
TARGET_NR_prof
:
...
...
linux-user/syscall_defs.h
浏览文件 @
c596ed17
...
@@ -383,6 +383,8 @@ struct target_itimerval {
...
@@ -383,6 +383,8 @@ struct target_itimerval {
typedef
target_long
target_clock_t
;
typedef
target_long
target_clock_t
;
#define TARGET_HZ 100
struct
target_tms
{
struct
target_tms
{
target_clock_t
tms_utime
;
target_clock_t
tms_utime
;
target_clock_t
tms_stime
;
target_clock_t
tms_stime
;
...
@@ -539,8 +541,8 @@ static inline void target_siginitset(target_sigset_t *d, target_ulong set)
...
@@ -539,8 +541,8 @@ static inline void target_siginitset(target_sigset_t *d, target_ulong set)
d
->
sig
[
i
]
=
0
;
d
->
sig
[
i
]
=
0
;
}
}
void
host_to_target_sigset
(
target_sigset_t
*
d
,
sigset_t
*
s
);
void
host_to_target_sigset
(
target_sigset_t
*
d
,
const
sigset_t
*
s
);
void
target_to_host_sigset
(
sigset_t
*
d
,
target_sigset_t
*
s
);
void
target_to_host_sigset
(
sigset_t
*
d
,
const
target_sigset_t
*
s
);
void
host_to_target_old_sigset
(
target_ulong
*
old_sigset
,
void
host_to_target_old_sigset
(
target_ulong
*
old_sigset
,
const
sigset_t
*
sigset
);
const
sigset_t
*
sigset
);
void
target_to_host_old_sigset
(
sigset_t
*
sigset
,
void
target_to_host_old_sigset
(
sigset_t
*
sigset
,
...
@@ -590,6 +592,8 @@ int do_sigaction(int sig, const struct target_sigaction *act,
...
@@ -590,6 +592,8 @@ int do_sigaction(int sig, const struct target_sigaction *act,
#define TARGET_SIGPROF 27
#define TARGET_SIGPROF 27
#define TARGET_SIGWINCH 28
#define TARGET_SIGWINCH 28
#define TARGET_SIGIO 29
#define TARGET_SIGIO 29
#define TARGET_SIGPWR 30
#define TARGET_SIGSYS 31
#define TARGET_SIGRTMIN 32
#define TARGET_SIGRTMIN 32
#define TARGET_SIG_BLOCK 0
/* for blocking signals */
#define TARGET_SIG_BLOCK 0
/* for blocking signals */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录