about summary refs log tree commit diff
path: root/linuxthreads/sysdeps/pthread/timer_create.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-08 20:38:08 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-08 20:38:08 +0000
commit559382738799bf3bef8d81c2091bd713ec8c1c9e (patch)
tree7657c43ac5a62e8d4c00bfee75ab9b4782758d05 /linuxthreads/sysdeps/pthread/timer_create.c
parent2715f28ad4494dcf5da41398a6dbf2e43042620d (diff)
downloadglibc-559382738799bf3bef8d81c2091bd713ec8c1c9e.tar.gz
glibc-559382738799bf3bef8d81c2091bd713ec8c1c9e.tar.xz
glibc-559382738799bf3bef8d81c2091bd713ec8c1c9e.zip
Update.
	* sysdeps/pthread/posix-timer.h (struct timer_node): Add creator_pid.
	* sysdeps/pthread/timer_create.c: Fill in creator_pid.
	* sysdeps/pthread/timer_routines.c (thread_expire_timer): Send signal
	with sigqueueinfo is this system call is available.

	* sysdeps/pthread/timer_create.c (timer_create): Allow
	CLOCK_CPUTIME if _POSIX_CPUTIME is defined.
Diffstat (limited to 'linuxthreads/sysdeps/pthread/timer_create.c')
-rw-r--r--linuxthreads/sysdeps/pthread/timer_create.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/linuxthreads/sysdeps/pthread/timer_create.c b/linuxthreads/sysdeps/pthread/timer_create.c
index 36823e83b6..84e5cfed2f 100644
--- a/linuxthreads/sysdeps/pthread/timer_create.c
+++ b/linuxthreads/sysdeps/pthread/timer_create.c
@@ -36,7 +36,11 @@ timer_create (clock_id, evp, timerid)
   struct timer_node *newtimer = NULL;
   struct thread_node *thread = NULL;
 
-  if (clock_id != CLOCK_REALTIME)
+  if (clock_id != CLOCK_REALTIME
+#ifdef _POSIX_CPUTIME
+      && clock_id != CLOCK_CPUTIME
+#endif
+      )
     {
       errno = EINVAL;
       return -1;
@@ -70,6 +74,7 @@ timer_create (clock_id, evp, timerid)
     }
 
   newtimer->event.sigev_notify_attributes = &newtimer->attr;
+  newtimer->creator_pid = getpid ();
 
   switch (__builtin_expect (newtimer->event.sigev_notify, SIGEV_SIGNAL))
     {