utdelete.c revision 26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte/*******************************************************************************
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Module Name: utdelete - object deletion and reference count utilities
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte ******************************************************************************/
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Copyright (C) 2000 - 2011, Intel Corp.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Redistribution and use in source and binary forms, with or without
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * modification, are permitted provided that the following conditions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 1. Redistributions of source code must retain the above copyright
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * notice, this list of conditions, and the following disclaimer,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * without modification.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 2. Redistributions in binary form must reproduce at minimum a disclaimer
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * substantially similar to the "NO WARRANTY" disclaimer below
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * ("Disclaimer") and any redistribution must be conditioned upon
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * including a substantially similar Disclaimer requirement for further
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * binary redistribution.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * 3. Neither the names of the above-listed copyright holders nor the names
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * of any contributors may be used to endorse or promote products derived
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * from this software without specific prior written permission.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte * Alternatively, this software may be distributed under the terms of the
#define __UTDELETE_C__
#include "acpi.h"
#include "accommon.h"
#include "acinterp.h"
#include "acnamesp.h"
#include "acevents.h"
if (!Object)
case ACPI_TYPE_STRING:
case ACPI_TYPE_BUFFER:
case ACPI_TYPE_PACKAGE:
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_THERMAL:
while (HandlerDesc)
case ACPI_TYPE_MUTEX:
case ACPI_TYPE_EVENT:
case ACPI_TYPE_METHOD:
case ACPI_TYPE_REGION:
if (SecondDesc)
if (HandlerDesc)
while (NextDesc)
case ACPI_TYPE_BUFFER_FIELD:
if (SecondDesc)
if (SecondDesc)
if (ObjPointer)
ObjPointer));
if (!Object)
switch (Action)
case REF_INCREMENT:
NewCount++;
case REF_DECREMENT:
NewCount = 0;
NewCount--;
if (NewCount == 0)
case REF_FORCE_DELETE:
NewCount = 0;
UINT32 i;
while (Object)
case ACPI_TYPE_DEVICE:
case ACPI_TYPE_PROCESSOR:
case ACPI_TYPE_POWER:
case ACPI_TYPE_THERMAL:
case ACPI_TYPE_PACKAGE:
goto ErrorExit;
case ACPI_TYPE_BUFFER_FIELD:
goto ErrorExit;
goto ErrorExit;
case ACPI_TYPE_REGION:
if (NextObject)
else if (StateList)
while (StateList)
if (!Object ||