bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

thrd: On AIX 7.1 and 7.2, override also thrd_exit


From: Bruno Haible
Subject: thrd: On AIX 7.1 and 7.2, override also thrd_exit
Date: Fri, 18 Aug 2023 20:56:03 +0200

I just noticed that the AIX thrd_join workaround is incomplete: The exit code
of the thread may not only be provided by a 'return' statement in the thread's
main function, but alternatively as an argument to thread_exit(). Thus
thread_exit must be overridden as well.

Done through this patch, with a new unit test.


2023-08-18  Bruno Haible  <bruno@clisp.org>

        thrd tests: Add unit test for thrd_exit.
        * tests/test-thrd_exit.c: New file, based on tests/test-thrd_create.c.
        * modules/thrd-tests (Files): Add it.
        (Makefile.am): Compile and run it.

        thrd: On AIX 7.1 and 7.2, override also thrd_exit.
        * lib/threads.in.h (thrd_exit): Consider REPLACE_THRD_EXIT.
        * lib/thrd.c (rpl_thrd_exit): New function.
        * m4/threads_h.m4 (gl_THREADS_H_DEFAULTS): Initialize REPLACE_THRD_EXIT.
        * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set also REPLACE_THRD_EXIT and adjust
        LIBSTDTHREAD.
        * modules/threads-h (Makefile.am): Substitute REPLACE_THRD_EXIT.
        * doc/posix-functions/thrd_exit.texi: Mention the AIX thrd_join problem
        also here.

Attachment: 0001-thrd-On-AIX-7.1-and-7.2-override-also-thrd_exit.patch
Description: Text Data

Attachment: 0002-thrd-tests-Add-unit-test-for-thrd_exit.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]