Skip to content

Commit 4458838

Browse files
vivierstsquad
authored andcommitted
linux-user, ppc: fix clock_nanosleep() for linux-user-ppc
Our safe_clock_nanosleep() returns -1 and updates errno. We don't need to update the CRF bit in syscall.c because it will be updated in ppc/cpu_loop.c as the return value is negative. Signed-off-by: Laurent Vivier <[email protected]> Signed-off-by: Alex Bennée <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Message-Id: <[email protected]> Message-Id: <[email protected]>
1 parent 8ec68a0 commit 4458838

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

linux-user/syscall.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11840,13 +11840,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
1184011840
host_to_target_timespec(arg4, &ts);
1184111841
}
1184211842

11843-
#if defined(TARGET_PPC)
11844-
/* clock_nanosleep is odd in that it returns positive errno values.
11845-
* On PPC, CR0 bit 3 should be set in such a situation. */
11846-
if (ret && ret != -TARGET_ERESTARTSYS) {
11847-
((CPUPPCState *)cpu_env)->crf[0] |= 1;
11848-
}
11849-
#endif
1185011843
return ret;
1185111844
}
1185211845
#endif

0 commit comments

Comments
 (0)