diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-07-27 00:24:04 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-07-27 00:24:04 +0000 |
commit | be1dd9498ba15988055e8de83bf5b67a0d0a6543 (patch) | |
tree | 4284b8546a2565f36e2efd901e2334831369813e /sysdeps/unix/sysv/linux | |
parent | 38b4c0404f30e9b68a4f7609b269d9906a6a5e82 (diff) | |
download | glibc-be1dd9498ba15988055e8de83bf5b67a0d0a6543.tar.gz glibc-be1dd9498ba15988055e8de83bf5b67a0d0a6543.tar.xz glibc-be1dd9498ba15988055e8de83bf5b67a0d0a6543.zip |
Update.
1999-07-26 Ulrich Drepper <drepper@cygnus.com> * sysdeps/generic/clock_getres.c: New file. * sysdeps/generic/clock_gettime.c: New file. * sysdeps/generic/clock_settime.c: New file. * sysdeps/generic/timer_create.c: New file. * sysdeps/generic/timer_delete.c: New file. * sysdeps/generic/timer_getoverr.c: New file. * sysdeps/generic/timer_gettime.c: New file. * sysdeps/generic/timer_settime.c: New file. * sysdeps/generic/bits/time.h: Define __clockid_t, __timer_t, CLOCK_REALTIME, and TIMER_ABSTIME. * sysdeps/mach/hurd/bits/time.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/time.h: Likewise. * sysdeps/unix/sysv/linux/bits/time.h: Likewise. * sysdeps/unix/sysv/linux/bits/posix_opt.h: Define _POSIX_TIMERS. * sysdeps/unix/sysv/linux/bits/siginfo.h: Define si_timer1 and si_timer2. * sysdeps/unix/sysv/linux/syscalls.list: Add clock and timer syscalls. * time/Makefile (routines): Add clock_getres, clock_gettime, clock_setres, timer_create, timer_delete, timer_getoverr, timer_gettime, and timer_settime. * time/time.h: Define clockid_t, timer_t, and struct itimerspec for POSIX.1b. Add prototypes for clock and timer functions.
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/bits/time.h | 14 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/posix_opt.h | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/siginfo.h | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/time.h | 14 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/syscalls.list | 8 |
5 files changed, 42 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/time.h b/sysdeps/unix/sysv/linux/alpha/bits/time.h index aeb03b6341..bbf93f6952 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/time.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/time.h @@ -39,6 +39,20 @@ # define CLK_TCK 1024 # endif +/* Clock ID used in clock and timer functions. */ +typedef int __clockid_t; + +/* Timer ID returned by `timer_create'. */ +typedef int __timer_t; + +# ifdef __USE_POSIX199309 +/* Identifier for system-wide realtime clock. */ +# define CLOCK_REALTIME 0 + +/* Flag to indicate time is absolute. */ +# define TIMER_ABSTIME 1 +# endif + # endif /* bits/time.h */ #endif /* !__need_timeval */ diff --git a/sysdeps/unix/sysv/linux/bits/posix_opt.h b/sysdeps/unix/sysv/linux/bits/posix_opt.h index 2a53420578..7641d497d1 100644 --- a/sysdeps/unix/sysv/linux/bits/posix_opt.h +++ b/sysdeps/unix/sysv/linux/bits/posix_opt.h @@ -81,4 +81,7 @@ #define _LFS64_LARGEFILE 1 #define _LFS64_STDIO 1 +/* POSIX timers are available. */ +#define _POSIX_TIMERS 1 + #endif /* bits/posix_opt.h */ diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h index 66e6261999..c8682f45e7 100644 --- a/sysdeps/unix/sysv/linux/bits/siginfo.h +++ b/sysdeps/unix/sysv/linux/bits/siginfo.h @@ -1,5 +1,5 @@ /* siginfo_t, sigevent and constants. Linux version. - Copyright (C) 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -97,6 +97,8 @@ typedef struct siginfo /* X/Open requires some more fields with fixed names. */ # define si_pid _sifields._kill.si_pid # define si_uid _sifields._kill.si_uid +# define si_timer1 _sifields._timer._timer1 +# define si_timer2 _sifields._timer._timer2 # define si_status _sifields._sigchld.si_status # define si_utime _sifields._sigchld.si_utime # define si_stime _sifields._sigchld.si_stime diff --git a/sysdeps/unix/sysv/linux/bits/time.h b/sysdeps/unix/sysv/linux/bits/time.h index 4b7ef52b7a..d827193146 100644 --- a/sysdeps/unix/sysv/linux/bits/time.h +++ b/sysdeps/unix/sysv/linux/bits/time.h @@ -39,6 +39,20 @@ # define CLK_TCK 100 # endif +/* Clock ID used in clock and timer functions. */ +typedef int __clockid_t; + +/* Timer ID returned by `timer_create'. */ +typedef int __timer_t; + +# ifdef __USE_POSIX199309 +/* Identifier for system-wide realtime clock. */ +# define CLOCK_REALTIME 0 + +/* Flag to indicate time is absolute. */ +# define TIMER_ABSTIME 1 +# endif + # endif /* bits/time.h */ #endif diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 9cec3e3686..25a8ff168e 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -4,6 +4,9 @@ adjtimex adjtime adjtimex 1 __adjtimex adjtimex ntp_adjtime bdflush EXTRA bdflush 2 bdflush capget EXTRA capget 2 capget capset EXTRA capset 2 capset +clock_getres - clock_getres 2 clock_getres +clock_gettime - clock_gettime 2 clock_gettime +clock_settime - clock_settime 2 clock_settime create_module EXTRA create_module 3 create_module delete_module EXTRA delete_module 3 delete_module fdatasync - fdatasync 1 fdatasync @@ -55,5 +58,10 @@ sigaltstack - sigaltstack 2 __sigaltstack sigaltstack sysinfo EXTRA sysinfo 1 sysinfo swapon - swapon 2 __swapon swapon swapoff - swapoff 1 __swapoff swapoff +timer_create - timer_create 3 timer_create +timer_delete - timer_delete 1 timer_delete +timer_getoverr - timer_getoverrun 1 timer_getoverrun +timer_gettime - timer_gettime 2 timer_gettime +timer_settime - timer_settime 4 timer_settime uselib EXTRA uselib 1 uselib wait4 - wait4 4 __wait4 wait4 |