diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-07-03 14:24:28 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-07-03 14:24:28 +0200 |
commit | 80abc82e6cf1959c3e88e85daede5795b755cf9c (patch) | |
tree | 391c4336b29090bf3cf23c3d68503d70aa3f4809 /tools | |
parent | c0bc126f97fb929b3ae02c1c62322645d70eb408 (diff) | |
parent | 3d867f6c5fd6535cdeceef3170e5e84e5dd80fc1 (diff) | |
download | linux-80abc82e6cf1959c3e88e85daede5795b755cf9c.tar.bz2 |
Merge branch 'acpica'
* acpica: (53 commits)
ACPICA: Use designated initializers
ACPICA: Update version to 20170531
ACPICA: Update a couple of debug output messages
ACPICA: acpiexec: enhance local signal handler
ACPICA: Simplify output for the ACPI Debug Object
ACPICA: Unix application OSL: Correctly handle control-c (EINTR)
ACPICA: Improvements for debug output only
ACPICA: Disassembler: allow conflicting external declarations to be emitted.
ACPICA: Disassembler: add external op to namespace on first pass
ACPICA: Disassembler: prevent external op's from opening a new scope
ACPICA: Changed Gbl_disasm_flag to acpi_gbl_disasm_flag
ACPICA: Changing External to a named object
ACPICA: Update two error messages to emit control method name
ACPICA: Fix for Device/Thermal objects with ObjectType and DerefOf
ACPICA: Comment update: spelling/format. No functional change
ACPICA: Update comments, no functional change
ACPICA: Split resource descriptor decode strings to a new file
ACPICA: Remove extraneous status check
ACPICA: Export the public mutex interfaces
ACPICA: Disassembler: Abort on an invalid/unknown AML opcode
...
Diffstat (limited to 'tools')
-rw-r--r-- | tools/power/acpi/os_specific/service_layers/osunixxf.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/power/acpi/os_specific/service_layers/osunixxf.c b/tools/power/acpi/os_specific/service_layers/osunixxf.c index c04e8fea2c60..025c1b07049d 100644 --- a/tools/power/acpi/os_specific/service_layers/osunixxf.c +++ b/tools/power/acpi/os_specific/service_layers/osunixxf.c @@ -750,9 +750,9 @@ acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 msec_timeout) { acpi_status status = AE_OK; sem_t *sem = (sem_t *) handle; + int ret_val; #ifndef ACPI_USE_ALTERNATE_TIMEOUT struct timespec time; - int ret_val; #endif if (!sem) { @@ -778,7 +778,10 @@ acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 msec_timeout) case ACPI_WAIT_FOREVER: - if (sem_wait(sem)) { + while (((ret_val = sem_wait(sem)) == -1) && (errno == EINTR)) { + continue; /* Restart if interrupted */ + } + if (ret_val != 0) { status = (AE_TIME); } break; @@ -831,7 +834,8 @@ acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 msec_timeout) while (((ret_val = sem_timedwait(sem, &time)) == -1) && (errno == EINTR)) { - continue; + continue; /* Restart if interrupted */ + } if (ret_val != 0) { |