drivers/acpi/acpica/utmutex.c
Source file repositories/reference/linux-study-clean/drivers/acpi/acpica/utmutex.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/acpi/acpica/utmutex.c- Extension
.c- Size
- 8580 bytes
- Lines
- 331
- Domain
- Driver Families
- Bucket
- drivers/acpi
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
Dependency Surface
acpi/acpi.haccommon.h
Detected Declarations
function acpi_ut_mutex_initializefunction acpi_ut_mutex_terminatefunction acpi_ut_create_mutexfunction acpi_ut_delete_mutexfunction acpi_ut_acquire_mutexfunction acpi_ut_release_mutex
Annotated Snippet
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
}
/* Create the spinlocks for use at interrupt level or for speed */
status = acpi_os_create_lock (&acpi_gbl_gpe_lock);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
status = acpi_os_create_raw_lock(&acpi_gbl_hardware_lock);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
status = acpi_os_create_lock(&acpi_gbl_reference_count_lock);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
/* Mutex for _OSI support */
status = acpi_os_create_mutex(&acpi_gbl_osi_mutex);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
/* Create the reader/writer lock for namespace access */
status = acpi_ut_create_rw_lock(&acpi_gbl_namespace_rw_lock);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
return_ACPI_STATUS(status);
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_mutex_terminate
*
* PARAMETERS: None.
*
* RETURN: None.
*
* DESCRIPTION: Delete all of the system mutex objects. This includes mutexes,
* spin locks, and reader/writer locks.
*
******************************************************************************/
void acpi_ut_mutex_terminate(void)
{
u32 i;
ACPI_FUNCTION_TRACE(ut_mutex_terminate);
/* Delete each predefined mutex object */
for (i = 0; i < ACPI_NUM_MUTEX; i++) {
acpi_ut_delete_mutex(i);
}
acpi_os_delete_mutex(acpi_gbl_osi_mutex);
/* Delete the spinlocks */
acpi_os_delete_lock(acpi_gbl_gpe_lock);
acpi_os_delete_raw_lock(acpi_gbl_hardware_lock);
acpi_os_delete_lock(acpi_gbl_reference_count_lock);
/* Delete the reader/writer lock */
acpi_ut_delete_rw_lock(&acpi_gbl_namespace_rw_lock);
return_VOID;
}
/*******************************************************************************
*
* FUNCTION: acpi_ut_create_mutex
*
* PARAMETERS: mutex_ID - ID of the mutex to be created
*
* RETURN: Status
*
* DESCRIPTION: Create a mutex object.
*
******************************************************************************/
Annotation
- Immediate include surface: `acpi/acpi.h`, `accommon.h`.
- Detected declarations: `function acpi_ut_mutex_initialize`, `function acpi_ut_mutex_terminate`, `function acpi_ut_create_mutex`, `function acpi_ut_delete_mutex`, `function acpi_ut_acquire_mutex`, `function acpi_ut_release_mutex`.
- Atlas domain: Driver Families / drivers/acpi.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.