diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-03-03 05:29:09 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-03-03 05:29:09 +0000 |
commit | 885bafa14aaf7509f6cfc824d5b6c924c2f7a50f (patch) | |
tree | ee01652dbc78a4b6bba72076b0ec3e6b30a9d807 /linuxthreads/sysdeps | |
parent | e5497892bb7e66511e5e9a7502cac6c3f32b73dd (diff) | |
download | glibc-885bafa14aaf7509f6cfc824d5b6c924c2f7a50f.tar glibc-885bafa14aaf7509f6cfc824d5b6c924c2f7a50f.tar.gz glibc-885bafa14aaf7509f6cfc824d5b6c924c2f7a50f.tar.bz2 glibc-885bafa14aaf7509f6cfc824d5b6c924c2f7a50f.zip |
Update.
2003-03-02 Ulrich Drepper <drepper@redhat.com>
* sysdeps/generic/bits/time.h: Define CLOCK_MONOTONIC.
* sysdeps/posix/clock_getres.c: Define code for CLOCK_REALTIME only
if not already defined. Use SYSDEP_GETRES to allow other files to
provide alternative implementations.
* sysdeps/unix/sysv/linux/clock_getres.c: New file
* sysdeps/unix/clock_gettime.c: Define code for CLOCK_REALTIME only
if not already defined. Use SYSDEP_GETTIME to allow other files to
provide alternative implementations.
* sysdeps/unix/sysv/linux/clock_gettime.c: New file.
* sysdeps/unix/clock_settime.c: Define code for CLOCK_REALTIME only
if not already defined. Use SYSDEP_GETTIME to allow other files to
provide alternative implementations.
* sysdeps/unix/sysv/linux/clock_settime.c: New file.
* sysdeps/unix/clock_nanosleep.c: Use SYSDEP_NANOSLEEP to allow
other files to provide alternative implementations. Rearrange
tests for invalid parameters.
* sysdeps/unix/sysv/linux/clock_nanosleep.c: New file.
* sysdeps/unix/sysv/linux/sysconf.c: New file.
* sysdeps/unix/sysv/linux/kernel-features.h: Define
__ASSUME_POSIX_TIMERS for Linux 2.4.63 and up.
* sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
_POSIX_MONOTONIC_CLOCK.
Diffstat (limited to 'linuxthreads/sysdeps')
-rw-r--r-- | linuxthreads/sysdeps/pthread/timer_create.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/linuxthreads/sysdeps/pthread/timer_create.c b/linuxthreads/sysdeps/pthread/timer_create.c index b34f70e8c1..795f94c7d2 100644 --- a/linuxthreads/sysdeps/pthread/timer_create.c +++ b/linuxthreads/sysdeps/pthread/timer_create.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kaz Kylheku <kaz@ashi.footprints.net>. @@ -37,15 +37,23 @@ timer_create (clock_id, evp, timerid) struct timer_node *newtimer = NULL; struct thread_node *thread = NULL; - if (clock_id != CLOCK_REALTIME + if (0 #ifdef _POSIX_CPUTIME - && clock_id != CLOCK_PROCESS_CPUTIME_ID + || clock_id == CLOCK_PROCESS_CPUTIME_ID #endif #ifdef _POSIX_THREAD_CPUTIME - && clock_id != CLOCK_THREAD_CPUTIME_ID + || clock_id == CLOCK_THREAD_CPUTIME_ID #endif ) { + /* We don't allow timers for CPU clocks. At least not in the + moment. */ + __set_errno (ENOTSUP); + return -1; + } + + if (clock_id != CLOCK_REALTIME) + { __set_errno (EINVAL); return -1; } |