Inline nested function check_list

This commit is contained in:
Siddhesh Poyarekar 2014-06-06 02:59:49 +05:30
parent d89b3d80f9
commit fc75bf464d
2 changed files with 20 additions and 18 deletions

View File

@ -1,3 +1,8 @@
2014-06-05 Siddhesh Poyarekar <siddhesh@redhat.com>
* nptl/allocatestack.c (check_list): Inlined function...
(__reclaim_stacks): ... here.
2014-06-05 Ondřej Bílka <neleai@seznam.cz> 2014-06-05 Ondřej Bílka <neleai@seznam.cz>
[BZ #15698] [BZ #15698]

View File

@ -830,26 +830,23 @@ __reclaim_stacks (void)
if (add_p) if (add_p)
{ {
/* We always add at the beginning of the list. So in this /* We always add at the beginning of the list. So in this case we
case we only need to check the beginning of these lists. */ only need to check the beginning of these lists to see if the
int check_list (list_t *l) pointers at the head of the list are inconsistent. */
{ list_t *l = NULL;
if (l->next->prev != l)
{
assert (l->next->prev == elem);
elem->next = l->next; if (stack_used.next->prev != &stack_used)
elem->prev = l; l = &stack_used;
l->next = elem; else if (stack_cache.next->prev != &stack_cache)
l = &stack_cache;
return 1; if (l != NULL)
} {
assert (l->next->prev == elem);
return 0; elem->next = l->next;
} elem->prev = l;
l->next = elem;
if (check_list (&stack_used) == 0) }
(void) check_list (&stack_cache);
} }
else else
{ {