mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
bsd-user; Update the definitions of __put_user and __get_user macros
Use __builtin_choose_expr to avoid type promotion from ?: in __put_user_e and __get_user_e macros. Copied from linux-user/qemu.h, originally by Blue Swirl. Signed-off-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
15b950ecd1
commit
6538c682db
2 changed files with 35 additions and 51 deletions
|
@ -787,10 +787,7 @@ static int reset_signal_mask(target_ucontext_t *ucontext)
|
|||
TaskState *ts = (TaskState *)thread_cpu->opaque;
|
||||
|
||||
for (i = 0; i < TARGET_NSIG_WORDS; i++) {
|
||||
if (__get_user(target_set.__bits[i],
|
||||
&ucontext->uc_sigmask.__bits[i])) {
|
||||
return -TARGET_EFAULT;
|
||||
}
|
||||
__get_user(target_set.__bits[i], &ucontext->uc_sigmask.__bits[i]);
|
||||
}
|
||||
target_to_host_sigset_internal(&blocked, &target_set);
|
||||
ts->signal_mask = blocked;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue