summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2008-09-03 01:02:46 +0000
committerDmitry V. Levin <ldv@altlinux.org>2008-09-03 01:02:46 +0000
commit2e55ff4562e87f8361f0c1db5a42ee6e9ac0cc56 (patch)
treee0044f84d5b4af3bbaabf4b783b9059af374c95a /time.c
parent50f6013c15bd5103cd1fe4e518f177f0eec74660 (diff)
downloadstrace-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.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/time.c b/time.c
index 651ec40..204a6da 100644
--- a/time.c
+++ b/time.c
@@ -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"},