![]() ![]() For more information about spin locks, see Spin Locks. The caller should release the spin lock with KeReleaseSpinLock as quickly as possible.Īttempting to acquire a spin lock recursively is guaranteed to cause a deadlock. The code within a critical region guarded by a spin lock can neither call any external function that might access pageable data or raise an exception, nor can it generate any exceptions. The code within a critical region guarded by an spin lock must neither be pageable nor make any references to pageable data. In particular, no deadlock protection is performed and dispatching is disabled while the spin lock is held. Axel Rietschin, a kernel engineer at Microsoft, has claimed that ReactOS, an open-source operating system intended to be binary-compatible with Windows, is 'a ripoff of the Windows Research Kernel that Microsoft licensed to universities. Spin locks can cause serious problems if not used judiciously. A driver can also use a shared memory location, such as a global variable, but the driver must not use the same location for two different locks. Most drivers use a local variable to store the old IRQL value. It doesn’t mean we don’t respect or understand. That doesn’t diminish the work people have poured into it. The OldIrql value must be specified when the spin lock is released with KeReleaseSpinLock. ReactOS in its current state isn’t usable for anything outside tinkering. > 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. The previous IRQL is written to OldIrql after the lock is acquired. Now > PsUnblockThread() calls KeAcquireSpinLock() to acquire the PiThreadListLock > and bugchecks with the 'Spinning on spinlock.' message. KeAcquireSpinLock first resets the IRQL to DISPATCH_LEVEL and then acquires the lock. Pointer to a KIRQL variable that is set to the current IRQL when this call occurs. 382 if (SharedCacheMap->FileSize.QuadPart > TruncateSize->QuadPart). Pointer to an initialized KSPIN_LOCK spin lock for which the caller provides the storage. 381 KeAcquireSpinLock(&SharedCacheMap->CacheMapLock, &OldIrql). The KeAcquireSpinLock routine acquires a spin lock so the caller can synchronize access to shared data in a multiprocessor-safe way by raising IRQL. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |