Lines Matching refs:Mutex
3 * Module Name: exmutex - ASL Mutex Acquire/Release functions
184 ACPI_THREAD_STATE *Thread = ObjDesc->Mutex.OwnerThread;
194 if (ObjDesc->Mutex.Next)
196 (ObjDesc->Mutex.Next)->Mutex.Prev = ObjDesc->Mutex.Prev;
199 if (ObjDesc->Mutex.Prev)
201 (ObjDesc->Mutex.Prev)->Mutex.Next = ObjDesc->Mutex.Next;
209 (ObjDesc->Mutex.Prev)->Mutex.OriginalSyncLevel =
210 ObjDesc->Mutex.OriginalSyncLevel;
214 Thread->AcquiredMutexList = ObjDesc->Mutex.Next;
244 ObjDesc->Mutex.Prev = NULL;
245 ObjDesc->Mutex.Next = ListHead;
251 ListHead->Mutex.Prev = ObjDesc;
265 * ObjDesc - Mutex object
302 if (ObjDesc->Mutex.ThreadId == ThreadId)
308 ObjDesc->Mutex.AcquisitionDepth++;
320 Status = AcpiExSystemWaitMutex (ObjDesc->Mutex.OsMutex, Timeout);
332 ObjDesc->Mutex.ThreadId = ThreadId;
333 ObjDesc->Mutex.AcquisitionDepth = 1;
334 ObjDesc->Mutex.OriginalSyncLevel = 0;
335 ObjDesc->Mutex.OwnerThread = NULL; /* Used only for AML Acquire() */
346 * ObjDesc - Mutex object
377 "Cannot acquire Mutex [%4.4s], null thread info",
378 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
386 if (WalkState->Thread->CurrentSyncLevel > ObjDesc->Mutex.SyncLevel)
389 "Cannot acquire Mutex [%4.4s], "
391 AcpiUtGetNodeName (ObjDesc->Mutex.Node),
397 "Acquiring: Mutex SyncLevel %u, Thread SyncLevel %u, "
399 ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel,
400 ObjDesc->Mutex.AcquisitionDepth, WalkState->Thread));
405 if (ACPI_SUCCESS (Status) && ObjDesc->Mutex.AcquisitionDepth == 1)
409 ObjDesc->Mutex.OwnerThread = WalkState->Thread;
410 ObjDesc->Mutex.OriginalSyncLevel =
413 ObjDesc->Mutex.SyncLevel;
421 "Acquired: Mutex SyncLevel %u, Thread SyncLevel %u, Depth %u\n",
422 ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel,
423 ObjDesc->Mutex.AcquisitionDepth));
437 * DESCRIPTION: Release a previously acquired Mutex, low level interface.
461 if (ObjDesc->Mutex.AcquisitionDepth == 0)
468 ObjDesc->Mutex.AcquisitionDepth--;
469 if (ObjDesc->Mutex.AcquisitionDepth != 0)
476 if (ObjDesc->Mutex.OwnerThread)
481 ObjDesc->Mutex.OwnerThread = NULL;
492 AcpiOsReleaseMutex (ObjDesc->Mutex.OsMutex);
497 ObjDesc->Mutex.ThreadId = 0;
511 * DESCRIPTION: Release a previously acquired Mutex.
533 OwnerThread = ObjDesc->Mutex.OwnerThread;
540 "Cannot release Mutex [%4.4s], not acquired",
541 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
550 "Cannot release Mutex [%4.4s], null thread info",
551 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
556 * The Mutex is owned, but this thread must be the owner.
563 "Thread %u cannot release Mutex [%4.4s] acquired by thread %u",
565 AcpiUtGetNodeName (ObjDesc->Mutex.Node),
577 if (ObjDesc->Mutex.SyncLevel != OwnerThread->CurrentSyncLevel)
580 "Cannot release Mutex [%4.4s], SyncLevel mismatch: "
582 AcpiUtGetNodeName (ObjDesc->Mutex.Node),
583 ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel));
593 OwnerThread->AcquiredMutexList->Mutex.OriginalSyncLevel;
598 ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel,
599 PreviousSyncLevel, ObjDesc->Mutex.AcquisitionDepth,
608 if (ObjDesc->Mutex.AcquisitionDepth == 0)
618 ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel,
619 PreviousSyncLevel, ObjDesc->Mutex.AcquisitionDepth));
660 "Mutex [%4.4s] force-release, SyncLevel %u Depth %u\n",
661 ObjDesc->Mutex.Node->Name.Ascii, ObjDesc->Mutex.SyncLevel,
662 ObjDesc->Mutex.AcquisitionDepth));
674 AcpiOsReleaseMutex (ObjDesc->Mutex.OsMutex);
679 Thread->CurrentSyncLevel = ObjDesc->Mutex.OriginalSyncLevel;
683 Next = ObjDesc->Mutex.Next;
685 ObjDesc->Mutex.Prev = NULL;
686 ObjDesc->Mutex.Next = NULL;
687 ObjDesc->Mutex.AcquisitionDepth = 0;
688 ObjDesc->Mutex.OwnerThread = NULL;
689 ObjDesc->Mutex.ThreadId = 0;