]> git.ipfire.org Git - thirdparty/glibc.git/commit
nptl: Use exit_lock when accessing TID on pthread_getaffinity_np
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 23 Aug 2021 16:51:54 +0000 (13:51 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 9 Jul 2025 22:57:21 +0000 (19:57 -0300)
commita75cd1e3afbc742970c3b9edb486ddaa120eb8c5
treea64ea8e76f19fbc4da5fd4d04f89cfad7d1f3f5a
parente4585134ca361d7b636cad9b1c137f36bd9626bf
nptl: Use exit_lock when accessing TID on pthread_getaffinity_np

Also return EINVAL if the thread is already terminated at the time of
the call.  This is slight better than returning the calling thread
affinity (current behaviour), since the thread lifetime is defined.

Checked on x86_64-linux-gnu.
nptl/pthread_getaffinity.c
sysdeps/pthread/Makefile
sysdeps/pthread/tst-pthread-exited.c [new file with mode: 0644]