mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
* sysdeps/pthread/list.h (list_add): Initialize new element first.
(list_add_tail): Removed.
This commit is contained in:
parent
16c124f7c0
commit
f25c7b087f
@ -1,3 +1,8 @@
|
||||
2009-01-08 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/pthread/list.h (list_add): Initialize new element first.
|
||||
(list_add_tail): Removed.
|
||||
|
||||
2009-01-04 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* init.c (__pthread_initialize_minimal_internal): Optimize test
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2002 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2002, 2009 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
|
||||
|
||||
@ -46,24 +46,13 @@ typedef struct list_head
|
||||
static inline void
|
||||
list_add (list_t *newp, list_t *head)
|
||||
{
|
||||
head->next->prev = newp;
|
||||
newp->next = head->next;
|
||||
newp->prev = head;
|
||||
head->next->prev = newp;
|
||||
head->next = newp;
|
||||
}
|
||||
|
||||
|
||||
/* Add new element at the tail of the list. */
|
||||
static inline void
|
||||
list_add_tail (list_t *newp, list_t *head)
|
||||
{
|
||||
head->prev->next = newp;
|
||||
newp->next = head;
|
||||
newp->prev = head->prev;
|
||||
head->prev = newp;
|
||||
}
|
||||
|
||||
|
||||
/* Remove element from list. */
|
||||
static inline void
|
||||
list_del (list_t *elem)
|
||||
|
Loading…
Reference in New Issue
Block a user