diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2008-09-03 01:02:46 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2008-09-03 01:02:46 +0000 |
commit | 2e55ff4562e87f8361f0c1db5a42ee6e9ac0cc56 (patch) | |
tree | e0044f84d5b4af3bbaabf4b783b9059af374c95a /time.c | |
parent | 50f6013c15bd5103cd1fe4e518f177f0eec74660 (diff) | |
download | strace-2e55ff4562e87f8361f0c1db5a42ee6e9ac0cc56.tar.gz strace-2e55ff4562e87f8361f0c1db5a42ee6e9ac0cc56.tar.bz2 strace-2e55ff4562e87f8361f0c1db5a42ee6e9ac0cc56.tar.xz |
2008-04-19 Dmitry V. Levin <ldv@altlinux.org>
* syscall.c (is_restart_error): New function.
* defs.h (is_restart_error): Declare it.
* linux/dummy.h (sys_nanosleep): Uncouple from sys_adjtime().
* time.c (sys_nanosleep): New function, based on is_restart_error().
Diffstat (limited to 'time.c')
-rw-r--r-- | time.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -329,6 +329,21 @@ struct tcb *tcp; return 0; } +int +sys_nanosleep(struct tcb *tcp) +{ + if (entering(tcp)) { + print_timespec(tcp, tcp->u_arg[0]); + tprintf(", "); + } else { + if (!tcp->u_arg[1] || is_restart_error(tcp)) + print_timespec(tcp, tcp->u_arg[1]); + else + tprintf("%#lx", tcp->u_arg[1]); + } + return 0; +} + static const struct xlat which[] = { { ITIMER_REAL, "ITIMER_REAL" }, { ITIMER_VIRTUAL,"ITIMER_VIRTUAL"}, |