* time.c (SYS_FUNC(nanosleep)): Remove.
[HAVE_ARCH_TIME32_SYSCALLS || HAVE_ARCH_OLD_TIME64_SYSCALLS]
(do_nanosleep): New function.
[HAVE_ARCH_TIME32_SYSCALLS] (SYS_FUNC(nanosleep_time32)): Likewise.
[HAVE_ARCH_OLD_TIME64_SYSCALLS] (SYS_FUNC(nanosleep_time64)): Likewise.
* linux/64/syscallent.h: Replace SEN(nanosleep) with
SEN(nanosleep_time64).
* linux/alpha/syscallent.h: Likewise.
* linux/ia64/syscallent.h: Likewise.
* linux/mips/syscallent-n64.h: Likewise.
* linux/powerpc64/syscallent.h: Likewise.
* linux/s390x/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc64/syscallent.h: Likewise.
* linux/x32/syscallent.h: Likewise.
* linux/x86_64/syscallent.h: Likewise.
* linux/32/syscallent.h: Replace SEN(nanosleep) with
SEN(nanosleep_time32).
* linux/arm/syscallent.h: Likewise.
* linux/avr32/syscallent.h: Likewise.
* linux/bfin/syscallent.h: Likewise.
* linux/hppa/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/mips/syscallent-n32.h: Likewise.
* linux/mips/syscallent-o32.h: Likewise.
* linux/powerpc/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/xtensa/syscallent.h: Likewise.
[ 98] = { 6, 0, SEN(futex_time32), "futex" },
[ 99] = { 2, 0, SEN(set_robust_list), "set_robust_list" },
[100] = { 3, 0, SEN(get_robust_list), "get_robust_list" },
-[101] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[101] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[102] = { 2, 0, SEN(getitimer), "getitimer" },
[103] = { 3, 0, SEN(setitimer), "setitimer" },
[104] = { 4, 0, SEN(kexec_load), "kexec_load" },
[ 98] = { 6, 0, SEN(futex_time64), "futex" },
[ 99] = { 2, 0, SEN(set_robust_list), "set_robust_list" },
[100] = { 3, 0, SEN(get_robust_list), "get_robust_list" },
-[101] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[101] = { 2, 0, SEN(nanosleep_time64), "nanosleep" },
[102] = { 2, 0, SEN(getitimer), "getitimer" },
[103] = { 3, 0, SEN(setitimer), "setitimer" },
[104] = { 4, 0, SEN(kexec_load), "kexec_load" },
[337] = { 2, 0, SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
[338] = { 5, 0, SEN(afs_syscall), "afs_syscall" }, /* not implemented */
[339] = { 1, 0, SEN(uname), "uname" },
-[340] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[340] = { 2, 0, SEN(nanosleep_time64), "nanosleep" },
[341] = { 5, TM|SI, SEN(mremap), "mremap" },
[342] = { 3, 0, SEN(nfsservctl), "nfsservctl" }, /* not implemented */
[343] = { 3, 0, SEN(setresuid), "setresuid" },
[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[161] = { 2, 0, SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[162] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[163] = { 5, TM|SI, SEN(mremap), "mremap" },
[164] = { 3, 0, SEN(setresuid16), "setresuid" },
[165] = { 3, 0, SEN(getresuid16), "getresuid" },
[140] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[141] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[142] = { 2, 0, SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[143] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[143] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[144] = { 3, TD, SEN(poll_time32), "poll" },
[145] = { 3, 0, SEN(nfsservctl), "nfsservctl" },
[146] = { 3, 0, SEN(setresgid), "setresgid" },
[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[161] = { 2, 0, SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[162] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[163] = { 5, TM|SI, SEN(mremap), "mremap" },
[164] = { 3, 0, SEN(setresuid16), "setresuid" },
[165] = { 3, 0, SEN(getresuid16), "getresuid" },
[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[161] = { 2, 0, SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[162] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[163] = { 5, TM|SI, SEN(mremap), "mremap" },
[164] = { 3, 0, SEN(setresuid), "setresuid" },
[165] = { 3, 0, SEN(getresuid), "getresuid" },
[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[161] = { 2, 0, SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[162] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[163] = { 5, TM|SI, SEN(mremap), "mremap" },
[164] = { 3, 0, SEN(setresuid16), "setresuid" },
[165] = { 3, 0, SEN(getresuid16), "getresuid" },
[1024 + 141] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[1024 + 142] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[1024 + 143] = { 2, 0, SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
-[1024 + 144] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[1024 + 144] = { 2, 0, SEN(nanosleep_time64), "nanosleep" },
[1024 + 145] = { 3, 0, SEN(nfsservctl), "nfsservctl" },
[1024 + 146] = { 5, 0, SEN(prctl), "prctl" },
[1024 + 147] = { 0, PU|NF, SEN(getpagesize), "getpagesize" },
[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[161] = { 2, 0, SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[162] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[163] = { 5, TM|SI, SEN(mremap), "mremap" },
[164] = { 3, 0, SEN(setresuid16), "setresuid" },
[165] = { 3, 0, SEN(getresuid16), "getresuid" },
[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[161] = { 2, 0, SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[162] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[163] = { 5, TM|SI, SEN(mremap), "mremap" },
[164] = { 3, 0, SEN(setresuid16), "setresuid" },
[165] = { 3, 0, SEN(getresuid16), "getresuid" },
[6031] = { 1, TD, SEN(dup), "dup" },
[6032] = { 2, TD, SEN(dup2), "dup2" },
[6033] = { 0, TS, SEN(pause), "pause" },
-[6034] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[6034] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[6035] = { 2, 0, SEN(getitimer), "getitimer" },
[6036] = { 3, 0, SEN(setitimer), "setitimer" },
[6037] = { 1, 0, SEN(alarm), "alarm" },
[5031] = { 1, TD, SEN(dup), "dup" },
[5032] = { 2, TD, SEN(dup2), "dup2" },
[5033] = { 0, TS, SEN(pause), "pause" },
-[5034] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[5034] = { 2, 0, SEN(nanosleep_time64), "nanosleep" },
[5035] = { 2, 0, SEN(getitimer), "getitimer" },
[5036] = { 3, 0, SEN(setitimer), "setitimer" },
[5037] = { 1, 0, SEN(alarm), "alarm" },
[4163] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[4164] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[4165] = { 2, 0, SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[4166] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[4166] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[4167] = { 5, TM|SI, SEN(mremap), "mremap" },
[4168] = { 3, TN, SEN(accept), "accept" },
[4169] = { 3, TN, SEN(bind), "bind" },
[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[161] = { 2, 0, SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[162] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[163] = { 5, TM|SI, SEN(mremap), "mremap" },
[164] = { 3, 0, SEN(setresuid), "setresuid" },
[165] = { 3, 0, SEN(getresuid), "getresuid" },
[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[161] = { 2, 0, SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
-[162] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[162] = { 2, 0, SEN(nanosleep_time64), "nanosleep" },
[163] = { 5, TM|SI, SEN(mremap), "mremap" },
[164] = { 3, 0, SEN(setresuid), "setresuid" },
[165] = { 3, 0, SEN(getresuid), "getresuid" },
[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[161] = { 2, 0, SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[162] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[163] = { 5, TM|SI, SEN(mremap), "mremap" },
[164] = { 3, 0, SEN(setresuid16), "setresuid" },
[165] = { 3, 0, SEN(getresuid16), "getresuid" },
[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[161] = { 2, 0, SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
-[162] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[162] = { 2, 0, SEN(nanosleep_time64), "nanosleep" },
[163] = { 5, TM|SI, SEN(mremap), "mremap" },
[164 ... 166] = { },
[167] = { 5, 0, SEN(query_module), "query_module" },
[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[161] = { 2, 0, SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[162] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[162] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[163] = { 5, TM|SI, SEN(mremap), "mremap" },
[164] = { 3, 0, SEN(setresuid16), "setresuid" },
[165] = { 3, 0, SEN(getresuid16), "getresuid" },
[159] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[160] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[161] = { 2, 0, SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
-[162] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[162] = { 2, 0, SEN(nanosleep_time64), "nanosleep" },
[163] = { 5, TM|SI, SEN(mremap), "mremap" },
[164] = { 3, 0, SEN(setresuid16), "setresuid" },
[165] = { 3, 0, SEN(getresuid16), "getresuid" },
[246] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[247] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[248] = { 2, 0, SEN(sched_rr_get_interval_time32),"sched_rr_get_interval"},
-[249] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[249] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[250] = { 5, TM|SI, SEN(mremap), "mremap" },
[251] = { 1, 0, SEN(sysctl), "_sysctl" },
[252] = { 1, 0, SEN(getsid), "getsid" },
[246] = { 1, 0, SEN(sched_get_priority_max), "sched_get_priority_max"},
[247] = { 1, 0, SEN(sched_get_priority_min), "sched_get_priority_min"},
[248] = { 2, 0, SEN(sched_rr_get_interval_time64),"sched_rr_get_interval"},
-[249] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[249] = { 2, 0, SEN(nanosleep_time64), "nanosleep" },
[250] = { 5, TM|SI, SEN(mremap), "mremap" },
[251] = { 1, 0, SEN(sysctl), "_sysctl" },
[252] = { 1, 0, SEN(getsid), "getsid" },
[ 32] = { 1, TD, SEN(dup), "dup" },
[ 33] = { 2, TD, SEN(dup2), "dup2" },
[ 34] = { 0, TS, SEN(pause), "pause" },
-[ 35] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[ 35] = { 2, 0, SEN(nanosleep_time64), "nanosleep" },
[ 36] = { 2, 0, SEN(getitimer), "getitimer" },
[ 37] = { 1, 0, SEN(alarm), "alarm" },
[ 38] = { 3, 0, SEN(setitimer), "setitimer" },
[ 32] = { 1, TD, SEN(dup), "dup" },
[ 33] = { 2, TD, SEN(dup2), "dup2" },
[ 34] = { 0, TS, SEN(pause), "pause" },
-[ 35] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[ 35] = { 2, 0, SEN(nanosleep_time64), "nanosleep" },
[ 36] = { 2, 0, SEN(getitimer), "getitimer" },
[ 37] = { 1, 0, SEN(alarm), "alarm" },
[ 38] = { 3, 0, SEN(setitimer), "setitimer" },
[192] = { 2, 0, SEN(gettimeofday), "gettimeofday" },
[193] = { 2, 0, SEN(settimeofday), "settimeofday" },
[194] = { 1, 0, SEN(adjtimex32), "adjtimex" },
-[195] = { 2, 0, SEN(nanosleep), "nanosleep" },
+[195] = { 2, 0, SEN(nanosleep_time32), "nanosleep" },
[196] = { 2, 0, SEN(getgroups), "getgroups" },
[197] = { 2, 0, SEN(setgroups), "setgroups" },
[198] = { 2, 0, SEN(sethostname), "sethostname" },
}
#endif
-SYS_FUNC(nanosleep)
+#if HAVE_ARCH_TIME32_SYSCALLS || HAVE_ARCH_OLD_TIME64_SYSCALLS
+static int
+do_nanosleep(struct tcb *const tcp, const print_obj_by_addr_fn print_ts)
{
if (entering(tcp)) {
- print_timespec(tcp, tcp->u_arg[0]);
+ print_ts(tcp, tcp->u_arg[0]);
tprints(", ");
} else {
*/
if (is_erestart(tcp)) {
temporarily_clear_syserror(tcp);
- print_timespec(tcp, tcp->u_arg[1]);
+ print_ts(tcp, tcp->u_arg[1]);
restore_cleared_syserror(tcp);
} else {
printaddr(tcp->u_arg[1]);
}
return 0;
}
+#endif /* HAVE_ARCH_TIME32_SYSCALLS || HAVE_ARCH_OLD_TIME64_SYSCALLS */
+
+#if HAVE_ARCH_TIME32_SYSCALLS
+SYS_FUNC(nanosleep_time32)
+{
+ return do_nanosleep(tcp, print_timespec32);
+}
+#endif
+
+#if HAVE_ARCH_OLD_TIME64_SYSCALLS
+SYS_FUNC(nanosleep_time64)
+{
+ return do_nanosleep(tcp, print_timespec64);
+}
+#endif
#include "xlat/itimer_which.h"