Lines 935-942
arena_thread_freeres (void)
Link Here
|
935 |
if (a != NULL) |
935 |
if (a != NULL) |
936 |
{ |
936 |
{ |
937 |
(void) mutex_lock (&list_lock); |
937 |
(void) mutex_lock (&list_lock); |
938 |
a->next_free = free_list; |
938 |
/* Insert "a" last in free_list. */ |
939 |
free_list = a; |
939 |
if (free_list != NULL) |
|
|
940 |
{ |
941 |
mstate b = free_list; |
942 |
while (b->next_free != NULL) |
943 |
{ |
944 |
/* Make sure to check if "a" is already in free_list. */ |
945 |
if (b->next_free == a) |
946 |
b->next_free = a->next_free; |
947 |
else |
948 |
b = b->next_free; |
949 |
} |
950 |
b->next_free = a; |
951 |
} |
952 |
else |
953 |
free_list = a; |
954 |
a->next_free = NULL; |
940 |
(void) mutex_unlock (&list_lock); |
955 |
(void) mutex_unlock (&list_lock); |
941 |
} |
956 |
} |
942 |
} |
957 |
} |
943 |
- |
|
|