Print this page
acpica-unix2-20130823
PANKOVs restructure

@@ -1,14 +1,13 @@
-
 /******************************************************************************
  *
  * Module Name: exmutex - ASL Mutex Acquire/Release functions
  *
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2013, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:

@@ -339,11 +338,11 @@
     ACPI_FUNCTION_TRACE (ExReleaseMutexObject);
 
 
     if (ObjDesc->Mutex.AcquisitionDepth == 0)
     {
-        return (AE_NOT_ACQUIRED);
+        return_ACPI_STATUS (AE_NOT_ACQUIRED);
     }
 
     /* Match multiple Acquires with multiple Releases */
 
     ObjDesc->Mutex.AcquisitionDepth--;

@@ -513,11 +512,11 @@
 {
     ACPI_OPERAND_OBJECT     *Next = Thread->AcquiredMutexList;
     ACPI_OPERAND_OBJECT     *ObjDesc;
 
 
-    ACPI_FUNCTION_ENTRY ();
+    ACPI_FUNCTION_NAME (ExReleaseAllMutexes);
 
 
     /* Traverse the list of owned mutexes, releasing each one */
 
     while (Next)

@@ -527,10 +526,13 @@
 
         ObjDesc->Mutex.Prev = NULL;
         ObjDesc->Mutex.Next = NULL;
         ObjDesc->Mutex.AcquisitionDepth = 0;
 
+        ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+            "Force-releasing held mutex: %p\n", ObjDesc));
+
         /* Release the mutex, special case for Global Lock */
 
         if (ObjDesc == AcpiGbl_GlobalLockMutex)
         {
             /* Ignore errors */