aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/i386
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-13 03:55:50 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-13 03:55:50 +0000
commitb3ae0650bcff54f12d87f878000d4c488b365bf7 (patch)
tree90c46a039ed0c6723a1dde8d85ba5a886689040e /sysdeps/unix/i386
parentaa780baba8ddf1845a5b8caeeaf98d2149fb68b8 (diff)
downloadglibc-b3ae0650bcff54f12d87f878000d4c488b365bf7.tar
glibc-b3ae0650bcff54f12d87f878000d4c488b365bf7.tar.gz
glibc-b3ae0650bcff54f12d87f878000d4c488b365bf7.tar.bz2
glibc-b3ae0650bcff54f12d87f878000d4c488b365bf7.zip
Update.
* posix/getconf.c: Add support for many more POSIX options. * sysdeps/posix/sysconf.c: Likewise. * sysdeps/generic/bits/confname.h: Add many more POSIX options. * sysdeps/mach/hurd/bits/posix_opt.h: Add _POSIX_REGEXP and _POSIX_SHELL. * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise. * sysdeps/unix/sysv/linux/i386/bits/time.h: Rename __CLOCK_HIGHRES to CLOCK_PROCESS_CPUTIME_ID. Add define CLOCK_MONOTONIC and CLOCK_THREAD_CPUTIME_ID. * sysdeps/unix/i386/clock_getcpuclockid.c: Set *clock_id to CLOCK_PROCESS_CPUTIME_ID. * sysdeps/unix/i386/i586/clock_getres.c: Change for renaming of __CLOCK_HIGHRES to CLOCK_PROCESS_CPUTIME_ID. Handle CLOCK_THREAD_CPUTIME_ID and CLOCK_MONOTONIC the same. * sysdeps/unix/i386/i586/clock_gettime.c: Likewise.
Diffstat (limited to 'sysdeps/unix/i386')
-rw-r--r--sysdeps/unix/i386/clock_getcpuclockid.c2
-rw-r--r--sysdeps/unix/i386/i586/clock_getres.c10
-rw-r--r--sysdeps/unix/i386/i586/clock_gettime.c10
3 files changed, 17 insertions, 5 deletions
diff --git a/sysdeps/unix/i386/clock_getcpuclockid.c b/sysdeps/unix/i386/clock_getcpuclockid.c
index 1fd8ad9044..cdd662c838 100644
--- a/sysdeps/unix/i386/clock_getcpuclockid.c
+++ b/sysdeps/unix/i386/clock_getcpuclockid.c
@@ -28,7 +28,7 @@ clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
return EPERM;
/* Store the number. */
- *clock_id = __CLOCK_HIGHRES;
+ *clock_id = CLOCK_PROCESS_CPUTIME_ID;
return 0;
}
diff --git a/sysdeps/unix/i386/i586/clock_getres.c b/sysdeps/unix/i386/i586/clock_getres.c
index dacf7f49d3..2ea21a0f8e 100644
--- a/sysdeps/unix/i386/i586/clock_getres.c
+++ b/sysdeps/unix/i386/i586/clock_getres.c
@@ -39,9 +39,15 @@ static long int nsec;
/* We add an limitation here: we assume that the machine is not up as
long as it takes to wrap-around the 64-bit timestamp counter. On a
4GHz machine it would take 136 years of uptime to wrap around so
- this "limitation" is not severe. */
+ this "limitation" is not severe.
+
+ We use this clock also as the monotonic clock since we don't allow
+ setting the CPU-time clock. If this should ever change we will have
+ to separate the two. */
#define EXTRA_CLOCK_CASES \
- case __CLOCK_HIGHRES: \
+ case CLOCK_PROCESS_CPUTIME_ID: \
+ case CLOCK_THREAD_CPUTIME_ID: \
+ case CLOCK_MONOTONIC: \
{ \
if (__builtin_expect (nsec == 0, 0)) \
{ \
diff --git a/sysdeps/unix/i386/i586/clock_gettime.c b/sysdeps/unix/i386/i586/clock_gettime.c
index 5163d877c6..38f7c4ab15 100644
--- a/sysdeps/unix/i386/i586/clock_gettime.c
+++ b/sysdeps/unix/i386/i586/clock_gettime.c
@@ -38,9 +38,15 @@ static unsigned long long int freq;
/* We add an limitation here: we assume that the machine is not up as
long as it takes to wrap-around the 64-bit timestamp counter. On a
4GHz machine it would take 136 years of uptime to wrap around so
- this "limitation" is not severe. */
+ this "limitation" is not severe.
+
+ We use this clock also as the monotonic clock since we don't allow
+ setting the CPU-time clock. If this should ever change we will have
+ to separate the two. */
#define EXTRA_CLOCK_CASES \
- case __CLOCK_HIGHRES: \
+ case CLOCK_PROCESS_CPUTIME_ID: \
+ case CLOCK_THREAD_CPUTIME_ID: \
+ case CLOCK_MONOTONIC: \
{ \
unsigned long long int tsc; \
\