diff options
author | Suzuki Poulose <suzuki@in.ibm.com> | 2009-09-02 19:58:50 -0700 |
---|---|---|
committer | Petr Baudis <pasky@suse.cz> | 2009-09-18 20:09:50 +0200 |
commit | c2c83ab3c062d57de42b35b69b302bae1151a952 (patch) | |
tree | bbf24fe53a3fe89eb651c1dc3f03bde1f7abf0c1 | |
parent | ebe5fd942feccba4e9f831baccf3778393f90d1c (diff) | |
download | glibc-c2c83ab3c062d57de42b35b69b302bae1151a952.tar.gz glibc-c2c83ab3c062d57de42b35b69b302bae1151a952.tar.xz glibc-c2c83ab3c062d57de42b35b69b302bae1151a952.zip |
Fix timer_create to initialize timer_t properly.
(cherry picked from commit 38eb61366303c2857f1b00785757bc21da983d70)
-rw-r--r-- | nptl/ChangeLog | 8 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/timer_create.c | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 2f5f74eb93..faeb166e9a 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,11 @@ +2009-09-02 Suzuki K P <suzuki@in.ibm.com> + Joseph Myers <joseph@codesourcery.com> + + [BZ #7094] + * sysdeps/unix/sysv/linux/timer_create.c (timer_create): + Initialize the sigev_notify field for newly created timer to make sure + the timer gets deleted from the active timer's list upon timer_delete. + 2009-08-27 Andrew Stubbs <ams@codesourcery.com> * sysdeps/unix/sysv/linux/sh/lowlevellock.S (__lll_timedlock_wait): diff --git a/nptl/sysdeps/unix/sysv/linux/timer_create.c b/nptl/sysdeps/unix/sysv/linux/timer_create.c index a07234d7d1..cdf127cb44 100644 --- a/nptl/sysdeps/unix/sysv/linux/timer_create.c +++ b/nptl/sysdeps/unix/sysv/linux/timer_create.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003,2004, 2007 Free Software Foundation, Inc. +/* Copyright (C) 2003,2004, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2003. @@ -167,6 +167,7 @@ timer_create (clock_id, evp, timerid) /* Copy the thread parameters the user provided. */ newp->sival = evp->sigev_value; newp->thrfunc = evp->sigev_notify_function; + newp->sigev_notify = SIGEV_THREAD; /* We cannot simply copy the thread attributes since the implementation might keep internal information for |