Print this page
acpica-unix2-20130823
PANKOVs restructure

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/intel/io/acpica/executer/exmutex.c
          +++ new/usr/src/common/acpica/components/executer/exmutex.c
   1      -
   2    1  /******************************************************************************
   3    2   *
   4    3   * Module Name: exmutex - ASL Mutex Acquire/Release functions
   5    4   *
   6    5   *****************************************************************************/
   7    6  
   8    7  /*
   9      - * Copyright (C) 2000 - 2011, Intel Corp.
        8 + * Copyright (C) 2000 - 2013, Intel Corp.
  10    9   * All rights reserved.
  11   10   *
  12   11   * Redistribution and use in source and binary forms, with or without
  13   12   * modification, are permitted provided that the following conditions
  14   13   * are met:
  15   14   * 1. Redistributions of source code must retain the above copyright
  16   15   *    notice, this list of conditions, and the following disclaimer,
  17   16   *    without modification.
  18   17   * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  19   18   *    substantially similar to the "NO WARRANTY" disclaimer below
↓ open down ↓ 314 lines elided ↑ open up ↑
 334  333      ACPI_OPERAND_OBJECT     *ObjDesc)
 335  334  {
 336  335      ACPI_STATUS             Status = AE_OK;
 337  336  
 338  337  
 339  338      ACPI_FUNCTION_TRACE (ExReleaseMutexObject);
 340  339  
 341  340  
 342  341      if (ObjDesc->Mutex.AcquisitionDepth == 0)
 343  342      {
 344      -        return (AE_NOT_ACQUIRED);
      343 +        return_ACPI_STATUS (AE_NOT_ACQUIRED);
 345  344      }
 346  345  
 347  346      /* Match multiple Acquires with multiple Releases */
 348  347  
 349  348      ObjDesc->Mutex.AcquisitionDepth--;
 350  349      if (ObjDesc->Mutex.AcquisitionDepth != 0)
 351  350      {
 352  351          /* Just decrement the depth and return */
 353  352  
 354  353          return_ACPI_STATUS (AE_OK);
↓ open down ↓ 153 lines elided ↑ open up ↑
 508  507   ******************************************************************************/
 509  508  
 510  509  void
 511  510  AcpiExReleaseAllMutexes (
 512  511      ACPI_THREAD_STATE       *Thread)
 513  512  {
 514  513      ACPI_OPERAND_OBJECT     *Next = Thread->AcquiredMutexList;
 515  514      ACPI_OPERAND_OBJECT     *ObjDesc;
 516  515  
 517  516  
 518      -    ACPI_FUNCTION_ENTRY ();
      517 +    ACPI_FUNCTION_NAME (ExReleaseAllMutexes);
 519  518  
 520  519  
 521  520      /* Traverse the list of owned mutexes, releasing each one */
 522  521  
 523  522      while (Next)
 524  523      {
 525  524          ObjDesc = Next;
 526  525          Next = ObjDesc->Mutex.Next;
 527  526  
 528  527          ObjDesc->Mutex.Prev = NULL;
 529  528          ObjDesc->Mutex.Next = NULL;
 530  529          ObjDesc->Mutex.AcquisitionDepth = 0;
 531  530  
      531 +        ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
      532 +            "Force-releasing held mutex: %p\n", ObjDesc));
      533 +
 532  534          /* Release the mutex, special case for Global Lock */
 533  535  
 534  536          if (ObjDesc == AcpiGbl_GlobalLockMutex)
 535  537          {
 536  538              /* Ignore errors */
 537  539  
 538  540              (void) AcpiEvReleaseGlobalLock ();
 539  541          }
 540  542          else
 541  543          {
↓ open down ↓ 13 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX