Miscellanious protection around pthread calls to avoid signal reentrancy.
authorMatthew Dillon <dillon@apollo.backplane.com>
Sat, 23 May 2009 23:21:53 +0000 (16:21 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sat, 23 May 2009 23:21:53 +0000 (16:21 -0700)
commit03bcb4abdb8be5956d50bff79c4bf8916fcfe611
treee7db78abad502fc6cecd8b8197089ab56cf63f51
parent9a768e120d65d2366c6f56af77f9aa4a7a220c95
Miscellanious protection around pthread calls to avoid signal reentrancy.

Use pread/pwrite instead of read/write in a few cases.  Cases that still
use read/write now protect the calls with a crit_enter()/crit_exit().

Protect usleep() calls with a critical section.

Protect pthread_*() calls with a critical section where applicable.  Note
that calls made from cothreads do not need to be protected because the
cothreads do not take signals and are not operated as virtual cpus so they
can't preempt themselves either.

Reported-by: Trevor Kendall
sys/dev/virtual/cdrom/vcd.c
sys/platform/vkernel/i386/cpu_regs.c
sys/platform/vkernel/platform/console.c
sys/platform/vkernel/platform/cothread.c
sys/platform/vkernel/platform/systimer.c