diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 18:26:36 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2007-07-12 18:26:36 +0000 |
commit | 0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch) | |
tree | 2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /nptl/sysdeps/unix/sysv/linux/timer_create.c | |
parent | 7d58530341304d403a6626d7f7a1913165fe2f32 (diff) | |
download | glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.bz2 glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip |
2.5-18.1
Diffstat (limited to 'nptl/sysdeps/unix/sysv/linux/timer_create.c')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/timer_create.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_create.c b/nptl/sysdeps/unix/sysv/linux/timer_create.c index ca6ff6c7ef..5e99513950 100644 --- a/nptl/sysdeps/unix/sysv/linux/timer_create.c +++ b/nptl/sysdeps/unix/sysv/linux/timer_create.c @@ -28,6 +28,7 @@ #include <internaltypes.h> #include <nptl/pthreadP.h> #include "kernel-posix-timers.h" +#include "kernel-posix-cpu-timers.h" #ifdef __NR_timer_create @@ -58,6 +59,12 @@ timer_create (clock_id, evp, timerid) if (__no_posix_timers >= 0) # endif { + clockid_t syscall_clockid = (clock_id == CLOCK_PROCESS_CPUTIME_ID + ? MAKE_PROCESS_CPUCLOCK (0, CPUCLOCK_SCHED) + : clock_id == CLOCK_THREAD_CPUTIME_ID + ? MAKE_THREAD_CPUCLOCK (0, CPUCLOCK_SCHED) + : clock_id); + /* If the user wants notification via a thread we need to handle this special. */ if (evp == NULL @@ -88,7 +95,7 @@ timer_create (clock_id, evp, timerid) } kernel_timer_t ktimerid; - int retval = INLINE_SYSCALL (timer_create, 3, clock_id, evp, + int retval = INLINE_SYSCALL (timer_create, 3, syscall_clockid, evp, &ktimerid); # ifndef __ASSUME_POSIX_TIMERS @@ -196,8 +203,8 @@ timer_create (clock_id, evp, timerid) /* Create the timer. */ INTERNAL_SYSCALL_DECL (err); int res; - res = INTERNAL_SYSCALL (timer_create, err, 3, clock_id, &sev, - &newp->ktimerid); + res = INTERNAL_SYSCALL (timer_create, err, 3, + syscall_clockid, &sev, &newp->ktimerid); if (! INTERNAL_SYSCALL_ERROR_P (res, err)) { *timerid = (timer_t) newp; |