|
Lines 490-495
Link Here
|
| 490 |
return_ACPI_STATUS (AE_AML_MUTEX_NOT_ACQUIRED); |
490 |
return_ACPI_STATUS (AE_AML_MUTEX_NOT_ACQUIRED); |
| 491 |
} |
491 |
} |
| 492 |
|
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 |
/* |
502 |
/* |
| 494 |
* The Mutex is owned, but this thread must be the owner. |
503 |
* The Mutex is owned, but this thread must be the owner. |
| 495 |
* Special case for Global Lock, any thread can release |
504 |
* Special case for Global Lock, any thread can release |
|
Lines 505-519
Link Here
|
| 505 |
return_ACPI_STATUS (AE_AML_NOT_OWNER); |
514 |
return_ACPI_STATUS (AE_AML_NOT_OWNER); |
| 506 |
} |
515 |
} |
| 507 |
|
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 |
/* |
517 |
/* |
| 518 |
* The sync level of the mutex must be equal to the current sync level. In |
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 |
519 |
* other words, the current level means that at least one mutex at that |
|
Lines 535-542
Link Here
|
| 535 |
* This handles the case where several mutexes at the same level have been |
535 |
* This handles the case where several mutexes at the same level have been |
| 536 |
* acquired, but are not released in reverse order. |
536 |
* acquired, but are not released in reverse order. |
| 537 |
*/ |
537 |
*/ |
| 538 |
PreviousSyncLevel = |
538 |
if (!WalkState->Thread->AcquiredMutexList) |
| 539 |
WalkState->Thread->AcquiredMutexList->Mutex.OriginalSyncLevel; |
539 |
{ |
|
|
540 |
ACPI_ERROR ((AE_INFO, "Thread AcquiredMutexList empty while releasing mutex Mutex [%4.4s]", |
| 541 |
AcpiUtGetNodeName (ObjDesc->Mutex.Node))); |
| 542 |
/* return_ACPI_STATUS (AE_AML_INTERNAL); */ |
| 543 |
PreviousSyncLevel = WalkState->Thread->CurrentSyncLevel; |
| 544 |
} |
| 545 |
else |
| 546 |
PreviousSyncLevel = |
| 547 |
WalkState->Thread->AcquiredMutexList->Mutex.OriginalSyncLevel; |
| 540 |
|
548 |
|
| 541 |
Status = AcpiExReleaseMutexObject (ObjDesc); |
549 |
Status = AcpiExReleaseMutexObject (ObjDesc); |
| 542 |
if (ACPI_FAILURE (Status)) |
550 |
if (ACPI_FAILURE (Status)) |