aboutsummaryrefslogtreecommitdiff
path: root/bsd-user/signal.c
diff options
context:
space:
mode:
authorWarner Losh <imp@bsdimp.com>2023-08-13 10:41:24 +0200
committerWarner Losh <imp@bsdimp.com>2023-08-28 12:16:18 -0600
commit6538c682db9c2b34fbffc22e111a4bcd8f4b02de (patch)
treef06c7599a07a7fe294002680a06faadaff708c20 /bsd-user/signal.c
parent15b950ecd16ecc6e9a1f21e1f9f185ee61a5a1d5 (diff)
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>
Diffstat (limited to 'bsd-user/signal.c')
-rw-r--r--bsd-user/signal.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/bsd-user/signal.c b/bsd-user/signal.c
index f4e078ee1d..4db85a3485 100644
--- a/bsd-user/signal.c
+++ b/bsd-user/signal.c
@@ -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;