mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Linux: Move timer helper routines from librt to libc
This adds several temporary GLIBC_PRIVATE exports. The symbol names are changed so that they all start with __timer_. It is now possible to invoke the fork handler directly, so pthread_atfork is no longer necessary. The associated error cannot happen anymore, and cancellation handling can be removed from the helper thread routine. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@ -42,12 +42,12 @@ timer_delete (timer_t timerid)
|
||||
struct timer *kt = timerid_to_timer (timerid);
|
||||
|
||||
/* Remove the timer from the list. */
|
||||
pthread_mutex_lock (&__active_timer_sigev_thread_lock);
|
||||
if (__active_timer_sigev_thread == kt)
|
||||
__active_timer_sigev_thread = kt->next;
|
||||
pthread_mutex_lock (&__timer_active_sigev_thread_lock);
|
||||
if (__timer_active_sigev_thread == kt)
|
||||
__timer_active_sigev_thread = kt->next;
|
||||
else
|
||||
{
|
||||
struct timer *prevp = __active_timer_sigev_thread;
|
||||
struct timer *prevp = __timer_active_sigev_thread;
|
||||
while (prevp->next != NULL)
|
||||
if (prevp->next == kt)
|
||||
{
|
||||
@ -57,7 +57,7 @@ timer_delete (timer_t timerid)
|
||||
else
|
||||
prevp = prevp->next;
|
||||
}
|
||||
pthread_mutex_unlock (&__active_timer_sigev_thread_lock);
|
||||
pthread_mutex_unlock (&__timer_active_sigev_thread_lock);
|
||||
|
||||
free (kt);
|
||||
}
|
||||
|
Reference in New Issue
Block a user