diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-06-10 08:28:06 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-06-10 08:28:06 +0000 |
commit | 45dc1187ee47bc0ffa9bb7ff7ac49749aaabe413 (patch) | |
tree | 79f3540143b070f52eb00aa78d7abf00fd0aa772 /linuxthreads/sysdeps/pthread/posix-timer.h | |
parent | 15109bd4aa7cef49d08ba0c3939b5389a3b90803 (diff) | |
download | glibc-45dc1187ee47bc0ffa9bb7ff7ac49749aaabe413.tar.gz glibc-45dc1187ee47bc0ffa9bb7ff7ac49749aaabe413.tar.xz glibc-45dc1187ee47bc0ffa9bb7ff7ac49749aaabe413.zip |
Update.
2000-06-10 Kaz Kylheku <kaz@ashi.footprints.net> * sysdeps/pthread/timer_create.c: Thread matching now done on clock type as well as thread attributes. There are individual global signal-delivering threads for different clock types. * sysdeps/pthread/posix-timer.h: Likewise. * sysdeps/pthread/timer_routines.c: Likewise. * sysdeps/pthread/timer_routines.c: Thread allocation and deallocation function now remembers to put thread on active list and remove from active list. Thus now the feature of binding multiple timers to a single thread actually works.
Diffstat (limited to 'linuxthreads/sysdeps/pthread/posix-timer.h')
-rw-r--r-- | linuxthreads/sysdeps/pthread/posix-timer.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/linuxthreads/sysdeps/pthread/posix-timer.h b/linuxthreads/sysdeps/pthread/posix-timer.h index fc56ba61aa..bb66c2d3d8 100644 --- a/linuxthreads/sysdeps/pthread/posix-timer.h +++ b/linuxthreads/sysdeps/pthread/posix-timer.h @@ -44,6 +44,7 @@ struct thread_node pthread_cond_t cond; struct timer_node *current_timer; pthread_t captured; + clockid_t clock_id; }; @@ -76,8 +77,16 @@ extern pthread_once_t __timer_init_once_control; /* Nonzero if initialization of timer implementation failed. */ extern int __timer_init_failed; -/* Node for the thread used to deliver signals. */ -extern struct thread_node __timer_signal_thread; +/* Nodes for the threads used to deliver signals. */ +/* A distinct thread is used for each clock type. */ + +extern struct thread_node __timer_signal_thread_rclk; +#ifdef _POSIX_CPUTIME +extern struct thread_node __timer_signal_thread_pclk; +#endif +#ifdef _POSIX_THREAD_CPUTIME +extern struct thread_node __timer_signal_thread_tclk; +#endif /* Return pointer to timer structure corresponding to ID. */ @@ -160,10 +169,10 @@ extern void __timer_mutex_cancel_handler (void *arg); extern void __timer_init_once (void); extern struct timer_node *__timer_alloc (void); extern int __timer_thread_start (struct thread_node *thread); -extern struct thread_node *__timer_thread_find_matching (const pthread_attr_t *desired_attr); -extern struct thread_node *__timer_thread_alloc (const pthread_attr_t *desired_attr); +extern struct thread_node *__timer_thread_find_matching (const pthread_attr_t *desired_attr, clockid_t); +extern struct thread_node *__timer_thread_alloc (const pthread_attr_t *desired_attr, clockid_t); extern void __timer_dealloc (struct timer_node *timer); extern void __timer_thread_dealloc (struct thread_node *thread); -extern int __timer_thread_queue_timer (struct thread_node *thread, +extern void __timer_thread_queue_timer (struct thread_node *thread, struct timer_node *insert); extern void __timer_thread_wakeup (struct thread_node *thread); |