summaryrefslogtreecommitdiff
path: root/lib/thrd.c
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2019-06-21 11:59:22 +0200
committerBruno Haible <bruno@clisp.org>2019-06-21 11:59:22 +0200
commit13644a8180a084c4c682d54f27a2eaab01a92d7f (patch)
tree532776f64c5f6f8435c176fa80668b8079d12c54 /lib/thrd.c
parentd1cb5add44c04c66e5e6f2967244e71c005f5a46 (diff)
downloadgnulib-13644a8180a084c4c682d54f27a2eaab01a92d7f.tar.gz
thrd: Add comment.
* lib/thrd.c (pthread_main_func): Add comment.
Diffstat (limited to 'lib/thrd.c')
-rw-r--r--lib/thrd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/thrd.c b/lib/thrd.c
index e8f29bc09c..f3f69496b0 100644
--- a/lib/thrd.c
+++ b/lib/thrd.c
@@ -263,6 +263,10 @@ pthread_main_func (void *pmarg)
/* 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;
}
}