Skip to content

Commit

Permalink
posix: pthread: ensure pthread_exit() has noreturn attribute
Browse files Browse the repository at this point in the history
The function pthread_exit() does not return. It should be declared
with the noreturn attribute.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
  • Loading branch information
cfriedt authored and MaureenHelm committed Feb 12, 2024
1 parent c0a72cf commit 5c455aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/zephyr/posix/pthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ int pthread_attr_setstack(pthread_attr_t *attr, void *stackaddr,
#ifdef CONFIG_PTHREAD_IPC
int pthread_once(pthread_once_t *once, void (*initFunc)(void));
#endif
void pthread_exit(void *retval);
FUNC_NORETURN void pthread_exit(void *retval);
int pthread_join(pthread_t thread, void **status);
int pthread_cancel(pthread_t pthread);
int pthread_detach(pthread_t thread);
Expand Down

0 comments on commit 5c455aa

Please sign in to comment.