[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
thrd: Work around thrd_join bug on AIX 7.3.1
From: |
Bruno Haible |
Subject: |
thrd: Work around thrd_join bug on AIX 7.3.1 |
Date: |
Fri, 18 Aug 2023 22:42:07 +0200 |
On AIX 7.3.1, I see these two test failures:
FAIL: test-thrd_create
======================
../../gltests/test-thrd_create.c:61: assertion 'ret == MAGIC' failed
FAIL test-thrd_create (exit status: 134)
FAIL: test-thrd_exit
====================
../../gltests/test-thrd_exit.c:65: assertion 'ret == MAGIC' failed
FAIL test-thrd_exit (exit status: 134)
The cause is:
- In AIX 7.[12], the type thrd_start_t is broken, and accordingly it was
impossible to implement thrd_join correctly, since the exit code types
did not match.
- In AIX 7.3.1 they fixed the thrd_start_t type. But the thrd_join is still
broken, for no good reason.
This patch adds a workaround.
2023-08-18 Bruno Haible <bruno@clisp.org>
thrd: Work around thrd_join bug on AIX 7.3.1.
* m4/threads_h.m4 (gl_THREADS_H): Test against AIX 7 thrd_join bug. Set
BROKEN_THRD_JOIN.
(gl_THREADS_H_DEFAULTS): Initialize BROKEN_THRD_JOIN.
* m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set REPLACE_THRD_* to 1 also if
BROKEN_THRD_JOIN is 1. Define BROKEN_THRD_START_T_OR_JOIN instead of
BROKEN_THRD_START_T.
* modules/threads-h (Makefile.am): Substitute BROKEN_THRD_JOIN.
* lib/threads.in.h (rpl_thrd_t, thrd_t): Define also if BROKEN_THRD_JOIN
is 1.
* lib/thrd.c: Test BROKEN_THRD_START_T_OR_JOIN instead of
BROKEN_THRD_START_T.
* doc/posix-functions/thrd_join.texi: Update.
* doc/posix-functions/thrd_exit.texi: Likewise.
thrd: Refactor.
* m4/thrd.m4 (gl_FUNC_THRD_JOIN): Define BROKEN_THRD_JOIN_NULL, not
BROKEN_THRD_JOIN. Rename gl_cv_func_thrd_join_works to
gl_cv_func_thrd_join_null_works.
* lib/thrd.c: Test BROKEN_THRD_JOIN_NULL instead of BROKEN_THRD_JOIN.
0001-thrd-Refactor.patch
Description: Text Data
0002-thrd-Work-around-thrd_join-bug-on-AIX-7.3.1.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- thrd: Work around thrd_join bug on AIX 7.3.1,
Bruno Haible <=