gthread: Annotate g_thread_exit() with G_NORETURN

pthread_exit() is also marked noreturn, and the function does not in
fact return.

For win32, I can't find a copy of the header file to check if
_endthreadex() is marked with __declspec(noreturn), but its
documentation does say that it never returns.
This commit is contained in:
Philip Chimento 2023-09-01 23:49:25 -07:00
parent dea6ab937f
commit a10f42dad8
2 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ GThread * g_thread_try_new (const gchar *name,
GError **error);
GLIB_AVAILABLE_IN_ALL
GThread * g_thread_self (void);
GLIB_AVAILABLE_IN_ALL
G_NORETURN GLIB_AVAILABLE_IN_ALL
void g_thread_exit (gpointer retval);
GLIB_AVAILABLE_IN_ALL
gpointer g_thread_join (GThread *thread);

View File

@ -124,7 +124,7 @@ GRealThread *g_system_thread_new (GThreadFunc proxy,
GError **error);
void g_system_thread_free (GRealThread *thread);
void g_system_thread_exit (void);
G_NORETURN void g_system_thread_exit (void);
void g_system_thread_set_name (const gchar *name);
/* gthread.c */