Lines Matching refs:Mutex

3  * Module Name: exmutex - ASL Mutex Acquire/Release functions
76 ACPI_THREAD_STATE *Thread = ObjDesc->Mutex.OwnerThread;
86 if (ObjDesc->Mutex.Next)
88 (ObjDesc->Mutex.Next)->Mutex.Prev = ObjDesc->Mutex.Prev;
91 if (ObjDesc->Mutex.Prev)
93 (ObjDesc->Mutex.Prev)->Mutex.Next = ObjDesc->Mutex.Next;
101 (ObjDesc->Mutex.Prev)->Mutex.OriginalSyncLevel =
102 ObjDesc->Mutex.OriginalSyncLevel;
106 Thread->AcquiredMutexList = ObjDesc->Mutex.Next;
136 ObjDesc->Mutex.Prev = NULL;
137 ObjDesc->Mutex.Next = ListHead;
143 ListHead->Mutex.Prev = ObjDesc;
157 * ObjDesc - Mutex object
194 if (ObjDesc->Mutex.ThreadId == ThreadId)
200 ObjDesc->Mutex.AcquisitionDepth++;
212 Status = AcpiExSystemWaitMutex (ObjDesc->Mutex.OsMutex, Timeout);
224 ObjDesc->Mutex.ThreadId = ThreadId;
225 ObjDesc->Mutex.AcquisitionDepth = 1;
226 ObjDesc->Mutex.OriginalSyncLevel = 0;
227 ObjDesc->Mutex.OwnerThread = NULL; /* Used only for AML Acquire() */
238 * ObjDesc - Mutex object
269 "Cannot acquire Mutex [%4.4s], null thread info",
270 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
278 if (WalkState->Thread->CurrentSyncLevel > ObjDesc->Mutex.SyncLevel)
281 "Cannot acquire Mutex [%4.4s], "
283 AcpiUtGetNodeName (ObjDesc->Mutex.Node),
289 "Acquiring: Mutex SyncLevel %u, Thread SyncLevel %u, "
291 ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel,
292 ObjDesc->Mutex.AcquisitionDepth, WalkState->Thread));
297 if (ACPI_SUCCESS (Status) && ObjDesc->Mutex.AcquisitionDepth == 1)
301 ObjDesc->Mutex.OwnerThread = WalkState->Thread;
302 ObjDesc->Mutex.OriginalSyncLevel =
305 ObjDesc->Mutex.SyncLevel;
313 "Acquired: Mutex SyncLevel %u, Thread SyncLevel %u, Depth %u\n",
314 ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel,
315 ObjDesc->Mutex.AcquisitionDepth));
329 * DESCRIPTION: Release a previously acquired Mutex, low level interface.
353 if (ObjDesc->Mutex.AcquisitionDepth == 0)
360 ObjDesc->Mutex.AcquisitionDepth--;
361 if (ObjDesc->Mutex.AcquisitionDepth != 0)
368 if (ObjDesc->Mutex.OwnerThread)
373 ObjDesc->Mutex.OwnerThread = NULL;
384 AcpiOsReleaseMutex (ObjDesc->Mutex.OsMutex);
389 ObjDesc->Mutex.ThreadId = 0;
403 * DESCRIPTION: Release a previously acquired Mutex.
425 OwnerThread = ObjDesc->Mutex.OwnerThread;
432 "Cannot release Mutex [%4.4s], not acquired",
433 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
442 "Cannot release Mutex [%4.4s], null thread info",
443 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
448 * The Mutex is owned, but this thread must be the owner.
455 "Thread %u cannot release Mutex [%4.4s] acquired by thread %u",
457 AcpiUtGetNodeName (ObjDesc->Mutex.Node),
469 if (ObjDesc->Mutex.SyncLevel != OwnerThread->CurrentSyncLevel)
472 "Cannot release Mutex [%4.4s], SyncLevel mismatch: "
474 AcpiUtGetNodeName (ObjDesc->Mutex.Node),
475 ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel));
485 OwnerThread->AcquiredMutexList->Mutex.OriginalSyncLevel;
490 ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel,
491 PreviousSyncLevel, ObjDesc->Mutex.AcquisitionDepth,
500 if (ObjDesc->Mutex.AcquisitionDepth == 0)
510 ObjDesc->Mutex.SyncLevel, WalkState->Thread->CurrentSyncLevel,
511 PreviousSyncLevel, ObjDesc->Mutex.AcquisitionDepth));
552 "Mutex [%4.4s] force-release, SyncLevel %u Depth %u\n",
553 ObjDesc->Mutex.Node->Name.Ascii, ObjDesc->Mutex.SyncLevel,
554 ObjDesc->Mutex.AcquisitionDepth));
566 AcpiOsReleaseMutex (ObjDesc->Mutex.OsMutex);
571 Thread->CurrentSyncLevel = ObjDesc->Mutex.OriginalSyncLevel;
575 Next = ObjDesc->Mutex.Next;
577 ObjDesc->Mutex.Prev = NULL;
578 ObjDesc->Mutex.Next = NULL;
579 ObjDesc->Mutex.AcquisitionDepth = 0;
580 ObjDesc->Mutex.OwnerThread = NULL;
581 ObjDesc->Mutex.ThreadId = 0;