src/add-ons/kernel/bus_managers/acpi/acpica/components/utilities/utcache.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiOsPurgeCache
 *
 * PARAMETERS:  Cache           - Handle to cache object
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Free all objects within the requested cache.
 *
 ******************************************************************************/
AcpiOsPurgeCache
PARAMETERS:  Cache           - Handle to cache object

Status

Free all objects within the requested cache.
AcpiOsPurgeCache PARAMETERS : Cache - Handle to cache object Status Free all objects within the requested cache .
ACPI_STATUS
AcpiOsPurgeCache (
    ACPI_MEMORY_LIST        *Cache)
{
    void                    *Next;
    ACPI_STATUS             Status;
    ACPI_FUNCTION_ENTRY ();
    if (!Cache)
    {
        return (AE_BAD_PARAMETER);
    }
    Status = AcpiUtAcquireMutex (ACPI_MTX_CACHES);
    if (ACPI_FAILURE (Status))
    {
        return (Status);
    }
    while (Cache->ListHead)
    {
        Next = ACPI_GET_DESCRIPTOR_PTR (Cache->ListHead);
        ACPI_FREE (Cache->ListHead);
        Cache->ListHead = Next;
        Cache->CurrentDepth--;
    }
    (void) AcpiUtReleaseMutex (ACPI_MTX_CACHES);
    return (AE_OK);
}
ACPI_STATUS AcpiOsPurgeCache ( ACPI_MEMORY_LIST * Cache ) { void * Next ; ACPI_STATUS Status ; ACPI_FUNCTION_ENTRY ( ) ; if ( ! Cache ) { return ( AE_BAD_PARAMETER ) ; } Status = AcpiUtAcquireMutex ( ACPI_MTX_CACHES ) ; if ( ACPI_FAILURE ( Status ) ) { return ( Status ) ; } while ( Cache -> ListHead ) { Next = ACPI_GET_DESCRIPTOR_PTR ( Cache -> ListHead ) ; ACPI_FREE ( Cache -> ListHead ) ; Cache -> ListHead = Next ; Cache -> CurrentDepth -- ; } ( void ) AcpiUtReleaseMutex ( ACPI_MTX_CACHES ) ; return ( AE_OK ) ; }
FUNCTION:    AcpiOsPurgeCache
 PARAMETERS:  Cache           - Handle to cache object
FUNCTION : AcpiOsPurgeCache PARAMETERS : Cache - Handle to cache object
/* Walk the list of objects in this cache */ /* Delete and unlink one cached state object */