Deleted Added
full compact
exmutex.c (193529) exmutex.c (200553)
1
2/******************************************************************************
3 *
4 * Module Name: exmutex - ASL Mutex Acquire/Release functions
5 *
6 *****************************************************************************/
7
8/******************************************************************************

--- 476 unchanged lines hidden (view full) ---

485
486 if (!ObjDesc->Mutex.OwnerThread)
487 {
488 ACPI_ERROR ((AE_INFO, "Cannot release Mutex [%4.4s], not acquired",
489 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
490 return_ACPI_STATUS (AE_AML_MUTEX_NOT_ACQUIRED);
491 }
492
1
2/******************************************************************************
3 *
4 * Module Name: exmutex - ASL Mutex Acquire/Release functions
5 *
6 *****************************************************************************/
7
8/******************************************************************************

--- 476 unchanged lines hidden (view full) ---

485
486 if (!ObjDesc->Mutex.OwnerThread)
487 {
488 ACPI_ERROR ((AE_INFO, "Cannot release Mutex [%4.4s], not acquired",
489 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
490 return_ACPI_STATUS (AE_AML_MUTEX_NOT_ACQUIRED);
491 }
492
493 /* Must have a valid thread ID */
494
495 if (!WalkState->Thread)
496 {
497 ACPI_ERROR ((AE_INFO, "Cannot release Mutex [%4.4s], null thread info",
498 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
499 return_ACPI_STATUS (AE_AML_INTERNAL);
500 }
501
493 /*
494 * The Mutex is owned, but this thread must be the owner.
495 * Special case for Global Lock, any thread can release
496 */
497 if ((ObjDesc->Mutex.OwnerThread->ThreadId != WalkState->Thread->ThreadId) &&
498 (ObjDesc != AcpiGbl_GlobalLockMutex))
499 {
500 ACPI_ERROR ((AE_INFO,
501 "Thread %p cannot release Mutex [%4.4s] acquired by thread %p",
502 ACPI_CAST_PTR (void, WalkState->Thread->ThreadId),
503 AcpiUtGetNodeName (ObjDesc->Mutex.Node),
504 ACPI_CAST_PTR (void, ObjDesc->Mutex.OwnerThread->ThreadId)));
505 return_ACPI_STATUS (AE_AML_NOT_OWNER);
506 }
507
502 /*
503 * The Mutex is owned, but this thread must be the owner.
504 * Special case for Global Lock, any thread can release
505 */
506 if ((ObjDesc->Mutex.OwnerThread->ThreadId != WalkState->Thread->ThreadId) &&
507 (ObjDesc != AcpiGbl_GlobalLockMutex))
508 {
509 ACPI_ERROR ((AE_INFO,
510 "Thread %p cannot release Mutex [%4.4s] acquired by thread %p",
511 ACPI_CAST_PTR (void, WalkState->Thread->ThreadId),
512 AcpiUtGetNodeName (ObjDesc->Mutex.Node),
513 ACPI_CAST_PTR (void, ObjDesc->Mutex.OwnerThread->ThreadId)));
514 return_ACPI_STATUS (AE_AML_NOT_OWNER);
515 }
516
508 /* Must have a valid thread ID */
509
510 if (!WalkState->Thread)
511 {
512 ACPI_ERROR ((AE_INFO, "Cannot release Mutex [%4.4s], null thread info",
513 AcpiUtGetNodeName (ObjDesc->Mutex.Node)));
514 return_ACPI_STATUS (AE_AML_INTERNAL);
515 }
516
517 /*
518 * The sync level of the mutex must be equal to the current sync level. In
519 * other words, the current level means that at least one mutex at that
520 * level is currently being held. Attempting to release a mutex of a
521 * different level can only mean that the mutex ordering rule is being
522 * violated. This behavior is clarified in ACPI 4.0 specification.
523 */
524 if (ObjDesc->Mutex.SyncLevel != WalkState->Thread->CurrentSyncLevel)

--- 97 unchanged lines hidden ---
517 /*
518 * The sync level of the mutex must be equal to the current sync level. In
519 * other words, the current level means that at least one mutex at that
520 * level is currently being held. Attempting to release a mutex of a
521 * different level can only mean that the mutex ordering rule is being
522 * violated. This behavior is clarified in ACPI 4.0 specification.
523 */
524 if (ObjDesc->Mutex.SyncLevel != WalkState->Thread->CurrentSyncLevel)

--- 97 unchanged lines hidden ---