CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2020/01/21 08:20:47
Modified files:
sys/kern : kern_fork.c kern_synch.c syscalls.master
sys/sys : proc.h
Log message:
Make __thrsleep(2) and __thrwakeup(2) MP-safe
Threads in __thrsleep(2) are tracked using queues, one queue per each
process for synchronization between threads of a process, and one
system-wide queue for the special ident -1 handling. Each of these
queues has an associated rwlock that serializes access.
The queue lock is released when calling copyin() and copyout() in
thrsleep(). This preserves the existing behaviour where a blocked copy
operation does not prevent other threads from making progress.
Tested by anton@, claudio@
OK anton@, claudio@, tedu@, mpi@