OLD | NEW |
1 /* Copyright (C) 2002-2007, 2008 Free Software Foundation, Inc. | 1 /* Copyright (C) 2002-2007, 2008 Free Software Foundation, Inc. |
2 This file is part of the GNU C Library. | 2 This file is part of the GNU C Library. |
3 Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. | 3 Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. |
4 | 4 |
5 The GNU C Library is free software; you can redistribute it and/or | 5 The GNU C Library is free software; you can redistribute it and/or |
6 modify it under the terms of the GNU Lesser General Public | 6 modify it under the terms of the GNU Lesser General Public |
7 License as published by the Free Software Foundation; either | 7 License as published by the Free Software Foundation; either |
8 version 2.1 of the License, or (at your option) any later version. | 8 version 2.1 of the License, or (at your option) any later version. |
9 | 9 |
10 The GNU C Library is distributed in the hope that it will be useful, | 10 The GNU C Library is distributed in the hope that it will be useful, |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 do | 388 do |
389 lll_futex_wait (&pd->setxid_futex, 0, LLL_PRIVATE); | 389 lll_futex_wait (&pd->setxid_futex, 0, LLL_PRIVATE); |
390 while (pd->cancelhandling & SETXID_BITMASK); | 390 while (pd->cancelhandling & SETXID_BITMASK); |
391 | 391 |
392 /* Reset the value so that the stack can be reused. */ | 392 /* Reset the value so that the stack can be reused. */ |
393 pd->setxid_futex = 0; | 393 pd->setxid_futex = 0; |
394 } | 394 } |
395 | 395 |
396 if (!IS_DETACHED (pd)) | 396 if (!IS_DETACHED (pd)) |
397 { | 397 { |
| 398 int count; |
398 /* We are about to die: make our pd "almost free" and wake up waiter. */ | 399 /* We are about to die: make our pd "almost free" and wake up waiter. */ |
399 pd->tid = -2; | 400 pd->tid = -2; |
400 | 401 |
401 __nacl_futex_wake (&pd->tid, INT_MAX, __FUTEX_BITSET_MATCH_ANY); | 402 __nacl_futex_wake (&pd->tid, INT_MAX, __FUTEX_BITSET_MATCH_ANY, &count); |
402 } | 403 } |
403 | 404 |
404 __nacl_irt_thread_exit (&pd->tid); | 405 __nacl_irt_thread_exit (&pd->tid); |
405 | 406 |
406 /* NOTREACHED */ | 407 /* NOTREACHED */ |
407 return 0; | 408 return 0; |
408 } | 409 } |
409 | 410 |
410 | 411 |
411 /* Default thread attributes for the case when the user does not | 412 /* Default thread attributes for the case when the user does not |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 PTHREAD_STATIC_FN_REQUIRE (pthread_mutex_trylock) | 604 PTHREAD_STATIC_FN_REQUIRE (pthread_mutex_trylock) |
604 PTHREAD_STATIC_FN_REQUIRE (pthread_mutex_unlock) | 605 PTHREAD_STATIC_FN_REQUIRE (pthread_mutex_unlock) |
605 | 606 |
606 PTHREAD_STATIC_FN_REQUIRE (pthread_once) | 607 PTHREAD_STATIC_FN_REQUIRE (pthread_once) |
607 PTHREAD_STATIC_FN_REQUIRE (pthread_cancel) | 608 PTHREAD_STATIC_FN_REQUIRE (pthread_cancel) |
608 | 609 |
609 PTHREAD_STATIC_FN_REQUIRE (pthread_key_create) | 610 PTHREAD_STATIC_FN_REQUIRE (pthread_key_create) |
610 PTHREAD_STATIC_FN_REQUIRE (pthread_key_delete) | 611 PTHREAD_STATIC_FN_REQUIRE (pthread_key_delete) |
611 PTHREAD_STATIC_FN_REQUIRE (pthread_setspecific) | 612 PTHREAD_STATIC_FN_REQUIRE (pthread_setspecific) |
612 PTHREAD_STATIC_FN_REQUIRE (pthread_getspecific) | 613 PTHREAD_STATIC_FN_REQUIRE (pthread_getspecific) |
OLD | NEW |