Skip to content

Commit

Permalink
Fix timer_create to initialize timer_t properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Suzuki Poulose authored and Ulrich Drepper committed Sep 3, 2009
1 parent 2eeb9a5 commit 38eb613
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
8 changes: 8 additions & 0 deletions nptl/ChangeLog
Original file line number Diff line number Diff line change
@@ -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):
Expand Down
3 changes: 2 additions & 1 deletion nptl/sysdeps/unix/sysv/linux/timer_create.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 38eb613

Please sign in to comment.