* lib/thrd.c (pthread_main_func): Add comment.
+2019-06-21 Bruno Haible <bruno@clisp.org>
+
+ thrd: Add comment.
+ * lib/thrd.c (pthread_main_func): Add comment.
+
2019-06-21 Bruno Haible <bruno@clisp.org>
threads-h: Define 'thread_local' if and only if it actually works.
/* Execute mainfunc, with arg as argument. */
{
int exitcode = mainfunc (arg);
+ /* Note: When using Windows threads, this exit code is different from the
+ argument passed to ExitThread(), because the latter should never be 259,
+ see <https://docs.microsoft.com/de-de/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getexitcodethread>,
+ whereas the exit code passed to thrd_exit() is not constrained. */
return (void *) (intptr_t) exitcode;
}
}