diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-01-08 18:32:16 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-01-08 18:32:16 +0000 |
commit | f25c7b087f0e9536040966d5a870512f101e8ce9 (patch) | |
tree | ae80eca40b8f7111aa4a39e436c216f083639b3a /nptl | |
parent | 16c124f7c0c5366c66ce32928388654606d1caf5 (diff) | |
download | glibc-f25c7b087f0e9536040966d5a870512f101e8ce9.tar glibc-f25c7b087f0e9536040966d5a870512f101e8ce9.tar.gz glibc-f25c7b087f0e9536040966d5a870512f101e8ce9.tar.bz2 glibc-f25c7b087f0e9536040966d5a870512f101e8ce9.zip |
* sysdeps/pthread/list.h (list_add): Initialize new element first.
(list_add_tail): Removed.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 5 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/list.h | 15 |
2 files changed, 7 insertions, 13 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index e25da8b640..1fa74054dc 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -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 diff --git a/nptl/sysdeps/pthread/list.h b/nptl/sysdeps/pthread/list.h index 43186a2d51..6ddccb9fb9 100644 --- a/nptl/sysdeps/pthread/list.h +++ b/nptl/sysdeps/pthread/list.h @@ -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) |