1# zx_thread_exit 2 3## NAME 4 5<!-- Updated by update-docs-from-abigen, do not edit. --> 6 7thread_exit - terminate the current running thread 8 9## SYNOPSIS 10 11<!-- Updated by update-docs-from-abigen, do not edit. --> 12 13``` 14#include <zircon/syscalls.h> 15 16[[noreturn]] void zx_thread_exit(void); 17``` 18 19## DESCRIPTION 20 21`zx_thread_exit()` causes the currently running thread to cease 22running and exit. 23 24The signal **ZX_THREAD_TERMINATED** will be asserted on the thread 25object upon exit and may be observed via [`zx_object_wait_one()`] 26or [`zx_object_wait_many()`] on a handle to the thread. 27 28## RIGHTS 29 30<!-- Updated by update-docs-from-abigen, do not edit. --> 31 32TODO(ZX-2399) 33 34## RETURN VALUE 35 36`zx_thread_exit()` does not return. 37 38## SEE ALSO 39 40 - [`zx_handle_close()`] 41 - [`zx_handle_duplicate()`] 42 - [`zx_object_wait_async()`] 43 - [`zx_object_wait_many()`] 44 - [`zx_object_wait_one()`] 45 - [`zx_thread_create()`] 46 - [`zx_thread_start()`] 47 48<!-- References updated by update-docs-from-abigen, do not edit. --> 49 50[`zx_handle_close()`]: handle_close.md 51[`zx_handle_duplicate()`]: handle_duplicate.md 52[`zx_object_wait_async()`]: object_wait_async.md 53[`zx_object_wait_many()`]: object_wait_many.md 54[`zx_object_wait_one()`]: object_wait_one.md 55[`zx_thread_create()`]: thread_create.md 56[`zx_thread_start()`]: thread_start.md 57