// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /******************************************************************************* * * Module Name: utxfmutex - external AML mutex access functions * ******************************************************************************/ #include <acpi/acpi.h> #include "accommon.h" #include "acnamesp.h" #define _COMPONENT … ACPI_MODULE_NAME("utxfmutex") /* Local prototypes */ static acpi_status acpi_ut_get_mutex_object(acpi_handle handle, acpi_string pathname, union acpi_operand_object **ret_obj); /******************************************************************************* * * FUNCTION: acpi_ut_get_mutex_object * * PARAMETERS: handle - Mutex or prefix handle (optional) * pathname - Mutex pathname (optional) * ret_obj - Where the mutex object is returned * * RETURN: Status * * DESCRIPTION: Get an AML mutex object. The mutex node is pointed to by * Handle:Pathname. Either Handle or Pathname can be NULL, but * not both. * ******************************************************************************/ static acpi_status acpi_ut_get_mutex_object(acpi_handle handle, acpi_string pathname, union acpi_operand_object **ret_obj) { … } /******************************************************************************* * * FUNCTION: acpi_acquire_mutex * * PARAMETERS: handle - Mutex or prefix handle (optional) * pathname - Mutex pathname (optional) * timeout - Max time to wait for the lock (millisec) * * RETURN: Status * * DESCRIPTION: Acquire an AML mutex. This is a device driver interface to * AML mutex objects, and allows for transaction locking between * drivers and AML code. The mutex node is pointed to by * Handle:Pathname. Either Handle or Pathname can be NULL, but * not both. * ******************************************************************************/ acpi_status acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout) { … } ACPI_EXPORT_SYMBOL(…) /******************************************************************************* * * FUNCTION: acpi_release_mutex * * PARAMETERS: handle - Mutex or prefix handle (optional) * pathname - Mutex pathname (optional) * * RETURN: Status * * DESCRIPTION: Release an AML mutex. This is a device driver interface to * AML mutex objects, and allows for transaction locking between * drivers and AML code. The mutex node is pointed to by * Handle:Pathname. Either Handle or Pathname can be NULL, but * not both. * ******************************************************************************/ acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname) { … } ACPI_EXPORT_SYMBOL(…)