mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 08:11:08 +00:00
[BZ #4306]
2007-04-27 Ulrich Drepper <drepper@redhat.com> [BZ #4306] * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Initialize the whole sigevent structure to appease valgrind.
This commit is contained in:
parent
109f51f2b2
commit
f672076efa
@ -1,3 +1,9 @@
|
|||||||
|
2007-04-27 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
[BZ #4306]
|
||||||
|
* sysdeps/unix/sysv/linux/timer_create.c (timer_create):
|
||||||
|
Initialize the whole sigevent structure to appease valgrind.
|
||||||
|
|
||||||
2007-04-25 Ulrich Drepper <drepper@redhat.com>
|
2007-04-25 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
|
* sysdeps/x86_64/tls.h (tcbhead_t): Add vgetcpu_cache.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 2003,2004 Free Software Foundation, Inc.
|
/* Copyright (C) 2003,2004, 2007 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
|
||||||
|
|
||||||
@ -193,12 +193,11 @@ timer_create (clock_id, evp, timerid)
|
|||||||
PTHREAD_CREATE_DETACHED);
|
PTHREAD_CREATE_DETACHED);
|
||||||
|
|
||||||
/* Create the event structure for the kernel timer. */
|
/* Create the event structure for the kernel timer. */
|
||||||
struct sigevent sev;
|
struct sigevent sev =
|
||||||
sev.sigev_value.sival_ptr = newp;
|
{ .sigev_value.sival_ptr = newp,
|
||||||
sev.sigev_signo = SIGTIMER;
|
.sigev_signo = SIGTIMER,
|
||||||
sev.sigev_notify = SIGEV_SIGNAL | SIGEV_THREAD_ID;
|
.sigev_notify = SIGEV_SIGNAL | SIGEV_THREAD_ID,
|
||||||
/* This is the thread ID of the helper thread. */
|
._sigev_un = { ._pad = { [0] = __helper_tid } } };
|
||||||
sev._sigev_un._pad[0] = __helper_tid;
|
|
||||||
|
|
||||||
/* Create the timer. */
|
/* Create the timer. */
|
||||||
INTERNAL_SYSCALL_DECL (err);
|
INTERNAL_SYSCALL_DECL (err);
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
02111-1307 USA. */
|
02111-1307 USA. */
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#include <sysdep.h>
|
#include <sysdep.h>
|
||||||
|
|
||||||
@ -25,11 +26,9 @@ sched_getcpu (void)
|
|||||||
{
|
{
|
||||||
#ifdef __NR_getcpu
|
#ifdef __NR_getcpu
|
||||||
unsigned int cpu;
|
unsigned int cpu;
|
||||||
INTERNAL_SYSCALL_DECL (err);
|
int r = INLINE_SYSCALL (getcpu, 3, &cpu, NULL, NULL);
|
||||||
int r = INTERNAL_SYSCALL (getcpu, err, &cpu, NULL, NULL);
|
|
||||||
|
|
||||||
return (INTERNAL_SYSCALL_ERROR (r, err)
|
return r == -1 ? r : cpu;
|
||||||
? INTERNAL_SYSCALL_ERRNO (r, err) : cpu);
|
|
||||||
#else
|
#else
|
||||||
__set_errno (ENOSYS);
|
__set_errno (ENOSYS);
|
||||||
return -1;
|
return -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user