Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [nathanw_sa] basesrc/lib/libpthread



Module Name:    basesrc
Committed By:   nathanw
Date:           Tue Oct 22 01:38:18 UTC 2002

Modified Files:
        basesrc/lib/libpthread [nathanw_sa]: pthread_lock.c

Log Message:
Revert 1.1.2.7 (don't switch if we're an upcall) and the assertion in
1.1.2.6 that encountering a locked spinlock is a bug.

Since upcalls can hold spinlocks (signal system, recycle lock, alarm
queue, condition variable interlocks via alarm queue callbacks) it is
possible that an upcall that has itself been preempted will try to
acquire a spinlock that is held by another thread in the
lock-resolution code. In this case, the proper thing to do is to
transfer control via the preempted-while-spinning code, rather than
raising an assertion failure. This will permit the other thread to
make forward progress in its critical region, after which this upcall
will run again and can aquire the spinlock


To generate a diff of this commit:
cvs rdiff -r1.1.2.9 -r1.1.2.10 basesrc/lib/libpthread/pthread_lock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index