mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Merge branch 'acpica'
* acpica: ACPICA: Utilities: Add new decode function for parser values ACPICA: Tables: Add an error message complaining driver bugs ACPICA: Tables: Add acpi_tb_unload_table() ACPICA: Tables: Cleanup acpi_tb_install_and_load_table() ACPICA: Events: Fix acpi_ev_initialize_region() return value ACPICA: Back port of "ACPICA: Dispatcher: Tune interpreter lock around AcpiEvInitializeRegion()" ACPICA: Namespace: Add acpi_ns_handle_to_name() ACPICA: Update version to 20160930 ACPICA: Move acpi_gbl_max_loop_iterations to the public globals file ACPICA: Disassembler: Fix for Divide() support, new support for test suite ACPICA: Increase loop limit for AE_AML_INFINITE_LOOP exception ACPICA: MacOSX: Fix wrong sem_destroy definition ACPICA: MacOSX: Fix anonymous semaphore implementation ACPICA: Update an info message during table load phase
This commit is contained in:
commit
496c9a9293
21 changed files with 250 additions and 211 deletions
|
|
@ -646,8 +646,12 @@ acpi_os_create_semaphore(u32 max_units,
|
|||
}
|
||||
#ifdef __APPLE__
|
||||
{
|
||||
char *semaphore_name = tmpnam(NULL);
|
||||
static int semaphore_count = 0;
|
||||
char semaphore_name[32];
|
||||
|
||||
snprintf(semaphore_name, sizeof(semaphore_name), "acpi_sem_%d",
|
||||
semaphore_count++);
|
||||
printf("%s\n", semaphore_name);
|
||||
sem =
|
||||
sem_open(semaphore_name, O_EXCL | O_CREAT, 0755,
|
||||
initial_units);
|
||||
|
|
@ -692,10 +696,15 @@ acpi_status acpi_os_delete_semaphore(acpi_handle handle)
|
|||
if (!sem) {
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (sem_close(sem) == -1) {
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
#else
|
||||
if (sem_destroy(sem) == -1) {
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
#endif
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue