summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_alq.c
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-05-25 08:48:11 +0000
committermtm <mtm@FreeBSD.org>2003-05-25 08:48:11 +0000
commit7f947a0032071b2639d959b21b13b71a532376d9 (patch)
tree79da265fb53834aa5475bf10c54f9f58202ebf91 /sys/kern/kern_alq.c
parent94241277a7c9dc09ec3b0577288fb0c25b782043 (diff)
downloadFreeBSD-src-7f947a0032071b2639d959b21b13b71a532376d9.zip
FreeBSD-src-7f947a0032071b2639d959b21b13b71a532376d9.tar.gz
_pthread_cancel() breaks the normal lock order of first locking the
joined and then the joiner thread. There isn't an easy (sane?) way to make it use the correct order without introducing races involving the target thread and finding which (active or dead) list it is on. So, after locking the canceled thread it will try to lock the joined thread and if it fails release the first lock and try again from the top. Introduce a new function, _spintrylock, which is simply a wrapper arround umtx_trylock(), to help accomplish this. Approved by: re/blanket libthr
Diffstat (limited to 'sys/kern/kern_alq.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud