From 13644a8180a084c4c682d54f27a2eaab01a92d7f Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 21 Jun 2019 11:59:22 +0200 Subject: [PATCH] thrd: Add comment. * lib/thrd.c (pthread_main_func): Add comment. --- ChangeLog | 5 +++++ lib/thrd.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4398916057..ffd37618ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2019-06-21 Bruno Haible + + thrd: Add comment. + * lib/thrd.c (pthread_main_func): Add comment. + 2019-06-21 Bruno Haible threads-h: Define 'thread_local' if and only if it actually works. 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; } } -- 2.39.5