diff options
Diffstat (limited to 'sysdeps/nacl/exit-thread.h')
-rw-r--r-- | sysdeps/nacl/exit-thread.h | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/sysdeps/nacl/exit-thread.h b/sysdeps/nacl/exit-thread.h index a08a5b1d5c..a67ce3c1d8 100644 --- a/sysdeps/nacl/exit-thread.h +++ b/sysdeps/nacl/exit-thread.h @@ -16,20 +16,13 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ -#include <stddef.h> -#include <nacl-interfaces.h> +#include <stdbool.h> -/* This causes the current thread to exit, without affecting other - threads in the process if there are any. If there are no other - threads left, then this has the effect of _exit (0). */ +/* This causes the current thread to exit, without affecting other threads + in the process if there are any. If there are no other threads left, + then this has the effect of _exit (0). If DETACHED is true, then the + TCB returned by THREAD_SELF has been reclaimed and must not be examined + or touched. */ -static inline void __attribute__ ((noreturn, always_inline, unused)) -__exit_thread (void) -{ - __nacl_irt_thread.thread_exit (NULL); - - /* That never returns unless something is severely and unrecoverably wrong. - If it ever does, try to make sure we crash. */ - while (1) - __builtin_trap (); -} +extern void __exit_thread (bool detached) + internal_function __attribute__ ((noreturn)); |