From 13644a8180a084c4c682d54f27a2eaab01a92d7f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 21 Jun 2019 11:59:22 +0200 Subject: thrd: Add comment. * lib/thrd.c (pthread_main_func): Add comment. --- lib/thrd.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/thrd.c') 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 , + whereas the exit code passed to thrd_exit() is not constrained. */ return (void *) (intptr_t) exitcode; } } -- cgit v1.2.1