1
2/******************************************************************************
3 *
4 * Module Name: exmutex - ASL Mutex Acquire/Release functions
5 * $Revision: 20 $
6 *
7 *****************************************************************************/
8
9/******************************************************************************
10 *
11 * 1. Copyright Notice
12 *
13 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp.
--- 239 unchanged lines hidden (view full) ---
253 ACPI_REPORT_ERROR (("Cannot acquire Mutex [%4.4s], incorrect SyncLevel\n",
254 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
255 return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
256 }
257
258 /*
259 * Support for multiple acquires by the owning thread
260 */
261
262 if ((ObjDesc->Mutex.OwnerThread) &&
263 (ObjDesc->Mutex.OwnerThread->ThreadId == WalkState->Thread->ThreadId))
264 {
265 /*
266 * The mutex is already owned by this thread,
267 * just increment the acquisition depth
268 */
269 ObjDesc->Mutex.AcquisitionDepth++;
270 return_ACPI_STATUS (AE_OK);
271 }
272
273 /* Acquire the mutex, wait if necessary */
274
275 Status = AcpiExSystemAcquireMutex (TimeDesc, ObjDesc);
276 if (ACPI_FAILURE (Status))
277 {
278 /* Includes failure from a timeout on TimeDesc */
--- 57 unchanged lines hidden (view full) ---
336
337 if (!WalkState->Thread)
338 {
339 ACPI_REPORT_ERROR (("Cannot release Mutex [%4.4s], null thread info\n",
340 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
341 return_ACPI_STATUS (AE_AML_INTERNAL);
342 }
343
344 /* The Mutex is owned, but this thread must be the owner */
345
346 if (ObjDesc->Mutex.OwnerThread->ThreadId != WalkState->Thread->ThreadId)
347 {
348 ACPI_REPORT_ERROR ((
349 "Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n",
350 WalkState->Thread->ThreadId,
351 AcpiUtGetNodeName (ObjDesc->Mutex.Node),
352 ObjDesc->Mutex.OwnerThread->ThreadId));
353 return_ACPI_STATUS (AE_AML_NOT_OWNER);
354 }
--- 91 unchanged lines hidden ---
2/******************************************************************************
3 *
4 * Module Name: exmutex - ASL Mutex Acquire/Release functions
5 * $Revision: 20 $
6 *
7 *****************************************************************************/
8
9/******************************************************************************
10 *
11 * 1. Copyright Notice
12 *
13 * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp.
--- 239 unchanged lines hidden (view full) ---
253 ACPI_REPORT_ERROR (("Cannot acquire Mutex [%4.4s], incorrect SyncLevel\n",
254 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
255 return_ACPI_STATUS (AE_AML_MUTEX_ORDER);
256 }
257
258 /*
259 * Support for multiple acquires by the owning thread
260 */
261
262 if ((ObjDesc->Mutex.OwnerThread) &&
263 (ObjDesc->Mutex.OwnerThread->ThreadId == WalkState->Thread->ThreadId))
264 {
265 /*
266 * The mutex is already owned by this thread,
267 * just increment the acquisition depth
268 */
269 ObjDesc->Mutex.AcquisitionDepth++;
270 return_ACPI_STATUS (AE_OK);
271 }
272
273 /* Acquire the mutex, wait if necessary */
274
275 Status = AcpiExSystemAcquireMutex (TimeDesc, ObjDesc);
276 if (ACPI_FAILURE (Status))
277 {
278 /* Includes failure from a timeout on TimeDesc */
--- 57 unchanged lines hidden (view full) ---
336
337 if (!WalkState->Thread)
338 {
339 ACPI_REPORT_ERROR (("Cannot release Mutex [%4.4s], null thread info\n",
340 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
341 return_ACPI_STATUS (AE_AML_INTERNAL);
342 }
343
344 /* The Mutex is owned, but this thread must be the owner */
345
346 if (ObjDesc->Mutex.OwnerThread->ThreadId != WalkState->Thread->ThreadId)
347 {
348 ACPI_REPORT_ERROR ((
349 "Thread %X cannot release Mutex [%4.4s] acquired by thread %X\n",
350 WalkState->Thread->ThreadId,
351 AcpiUtGetNodeName (ObjDesc->Mutex.Node),
352 ObjDesc->Mutex.OwnerThread->ThreadId));
353 return_ACPI_STATUS (AE_AML_NOT_OWNER);
354 }
--- 91 unchanged lines hidden ---