#ifdef ACPI_USE_LOCAL_CACHE /******************************************************************************* * * FUNCTION: acpi_os_create_cache * * PARAMETERS: cache_name - Ascii name for the cache * object_size - Size of each cached object * max_depth - Maximum depth of the cache (in objects) * return_cache - Where the new cache object is returned * * RETURN: Status * * DESCRIPTION: Create a cache object *
******************************************************************************/
acpi_status
acpi_os_create_cache(char *cache_name,
u16 object_size,
u16 max_depth, struct acpi_memory_list **return_cache)
{ struct acpi_memory_list *cache;
ACPI_FUNCTION_ENTRY();
if (!cache_name || !return_cache || !object_size) { return (AE_BAD_PARAMETER);
}
/* Create the cache object */
cache = acpi_os_allocate(sizeof(struct acpi_memory_list)); if (!cache) { return (AE_NO_MEMORY);
}
status = acpi_os_purge_cache(cache); if (ACPI_FAILURE(status)) { return (status);
}
/* Now we can delete the cache object */
acpi_os_free(cache); return (AE_OK);
}
/******************************************************************************* * * FUNCTION: acpi_os_release_object * * PARAMETERS: cache - Handle to cache object * object - The object to be released * * RETURN: None * * DESCRIPTION: Release an object to the specified cache. If cache is full, * the object is deleted. *
******************************************************************************/
/******************************************************************************* * * FUNCTION: acpi_os_acquire_object * * PARAMETERS: cache - Handle to cache object * * RETURN: the acquired object. NULL on error * * DESCRIPTION: Get an object from the specified cache. If cache is empty, * the object is allocated. *
******************************************************************************/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.