|
From: David W. <we...@cw...> - 2001-11-07 22:44:55
|
On Wed, Nov 07, 2001 at 08:09:54PM +0100, Eric Kohl wrote: > I guess I found a bug in the scheduler. When I run the new mutex test app, > two secondary threads are created which use a mutex to synchronize the > access to a global counter variable. After creating the secondary threads, > the main thread waits for the termination of both secondary threads by > calling WaitForMultipleObjects(). > > After both secondary threads terminated, the main thread is reactivated by a > call to PsUnblockThread() inside of WaitForMultipleObjects(). Now > PsUnblockThread() calls KeAcquireSpinLock() to acquire the PiThreadListLock > and bugchecks with the "Spinning on spinlock..." message. > > Any ideas why this happens??? > Yes, the problem is that PsTerminateCurrentThread acquires the thread list lock to manipulate the thread's data structures but doesn't release it when waking up any threads waiting for termination. Spinning on spinlock means that the thread would otherwise have waiting for the spinlock to be available but since this is a uniprocessor system it will just hang so it bug checks. ==================================================== = To remove yourself from this mailing list, go to = = http://www.reactos.com/home/mailing.html = ==================================================== |