glibc/sysdeps/unix/sysv/linux/i386
DJ Delorie 088136aa02 i386: Use pthread_barrier for synchronization on tst-bz21269
So I was able to reproduce the hangs in the original source, and debug
it, and fix it.  In doing so, I realized that we can't use anything
complex to trigger the thread because that "anything" might also cause
the expected segfault and force everything out of sync again.

Here's what I ended up with, and it doesn't seem to hang where the
original one hung quite often (in a tight while..end loop).  The key
changes are:

1. Calls to futex are error checked, with retries, to ensure that the
   futexes are actually doing what they're supposed to be doing.  In the
   original code, nearly every futex call returned an error.

2. The main loop has checks for whether the thread ran or not, and
   "unlocks" the thread if it didn't (this is how the original source
   hangs).

Note: the usleep() is not for timing purposes, but just to give the
kernel an excuse to run the other thread at that time.  The test will
not hang without it, but is more likely to test the right bugfix
if the usleep() is present.
2023-05-16 15:09:18 -04:00
..
i686 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
i786 Move remaining nptl/sysdeps/unix/sysv/linux/i386/ files. 2014-05-14 13:37:40 -07:00
____longjmp_chk.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
arch-syscall.h Update syscall lists for Linux 5.17 2022-03-23 17:11:56 +00:00
brk.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
c++-types.data x86: Move abilist files out of nptl/ subdirectories. 2014-05-14 15:45:23 -07:00
clone3.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
clone.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
configure Remove ldd libc4 support 2022-08-04 10:03:45 -03:00
configure.ac Remove ldd libc4 support 2022-08-04 10:03:45 -03:00
dl-procinfo.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-sysdep.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
getcontext.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
kernel_stat.h linux: Set default kernel_stat.h to LFS 2021-02-11 07:58:05 -03:00
kernel-features.h Linux: Assume and consolidate getpeername wire-up syscall 2023-02-20 10:20:44 -03:00
ld.abilist Fix glibc 2.34 ABI omission (missing GLIBC_2.34 in dynamic loader) 2022-01-27 18:52:05 +01:00
ldconfig.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
libanl.abilist resolv: Move libanl into libc (if libpthread is in libc) 2021-07-02 11:45:00 +02:00
libBrokenLocale.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libc_malloc_debug.abilist Move malloc_{g,s}et_state to libc_malloc_debug 2021-07-22 18:38:10 +05:30
libc_sigaction.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
libc-do-syscall-int80.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
libc-do-syscall.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
libc.abilist C2x scanf binary constant handling 2023-03-02 19:10:37 +00:00
libcrypt.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libdl.abilist dlfcn: Move dlopen into libc 2021-06-03 08:26:04 +02:00
libm.abilist math: Remove the error handling wrapper from hypot and hypotf 2021-12-13 10:08:46 -03:00
libnsl.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libpthread.abilist nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +02:00
libresolv.abilist resolv: Move res_query functions into libc 2021-07-19 07:56:57 +02:00
librt.abilist Linux: Move timer_settime, __timer_settime64 from librt to libc 2021-06-28 09:51:01 +02:00
libthread_db.abilist Ignore absolute symbols in ABI tests. 2018-05-04 15:46:32 +00:00
libutil.abilist login: Move libutil into libc 2021-06-30 08:43:37 +02:00
localplt.data elf: Rework exception handling in the dynamic loader [BZ #25486] 2022-11-03 09:39:31 +01:00
makecontext.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Makefile Remove ldd libc4 support 2022-08-04 10:03:45 -03:00
pointer_guard.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
setcontext.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
shlib-versions Clean up gnu/lib-names.h generation (bug 14171). 2014-09-26 17:33:04 +00:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
startup.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
struct_kernel_msqid64_ds.h sysv: linux: Add 64-bit time_t variant for msgctl 2020-07-09 12:05:40 -03:00
struct_kernel_semid64_ds.h sysv: linux: Add 64-bit time_t variant for semctl 2020-07-09 12:05:35 -03:00
struct_kernel_shmid64_ds.h sysv: linux: Add 64-bit time_t variant for shmctl 2020-07-09 12:05:47 -03:00
swapcontext.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
syscall.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
syscalls.list linux: Add prlimit64 C implementation 2021-11-30 13:13:03 -03:00
sysdep.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
time64-compat.h y2038: Add support for 64-bit time on legacy ABIs 2021-06-15 10:42:11 -03:00
tst-bz21269.c i386: Use pthread_barrier for synchronization on tst-bz21269 2023-05-16 15:09:18 -04:00
ucontext_i.sym i386: Enable CET support in ucontext functions 2020-02-14 15:15:25 -08:00
Versions Linux: Move wordsize-32 Version to default 2023-02-20 10:19:25 -03:00
vfork.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00