Lines Matching refs:sig
60 #define MAKE_SIG_ENTRY(sig) [sig] = TARGET_##sig, argument
68 int host_to_target_signal(int sig) in host_to_target_signal() argument
70 if (sig < 1) { in host_to_target_signal()
71 return sig; in host_to_target_signal()
73 if (sig >= _NSIG) { in host_to_target_signal()
76 return host_to_target_signal_table[sig]; in host_to_target_signal()
80 int target_to_host_signal(int sig) in target_to_host_signal() argument
82 if (sig < 1) { in target_to_host_signal()
83 return sig; in target_to_host_signal()
85 if (sig > TARGET_NSIG) { in target_to_host_signal()
88 return target_to_host_signal_table[sig]; in target_to_host_signal()
95 set->sig[signum / TARGET_NSIG_BPW] |= mask; in target_sigaddset()
102 return ((set->sig[signum / TARGET_NSIG_BPW] & mask) != 0); in target_sigismember()
128 d->sig[i] = tswapal(d1.sig[i]); in host_to_target_sigset()
153 s1.sig[i] = tswapal(s->sig[i]); in target_to_host_sigset()
162 *old_sigset = d.sig[0]; in host_to_target_old_sigset()
171 d.sig[0] = *old_sigset; in target_to_host_old_sigset()
173 d.sig[i] = 0; in target_to_host_old_sigset()
338 int sig = host_to_target_signal(info->si_signo); in host_to_target_siginfo_noswap() local
341 tinfo->si_signo = sig; in host_to_target_siginfo_noswap()
381 switch (sig) { in host_to_target_siginfo_noswap()
500 static int core_dump_signal(int sig) in core_dump_signal() argument
502 switch (sig) { in core_dump_signal()
627 void force_sig(int sig) in force_sig() argument
632 info.si_signo = sig; in force_sig()
644 void force_sig_fault(int sig, int code, abi_ulong addr) in force_sig_fault() argument
649 info.si_signo = sig; in force_sig_fault()
653 queue_signal(cpu_env(cpu), sig, QEMU_SI_FAULT, &info); in force_sig_fault()
770 void queue_signal(CPUArchState *env, int sig, int si_type, in queue_signal() argument
776 trace_user_queue_signal(env, sig); in queue_signal()
781 ts->sync_signal.pending = sig; in queue_signal()
803 const char *sig, *code = NULL; in die_from_signal() local
807 sig = "SEGV"; in die_from_signal()
818 sig = "BUS"; in die_from_signal()
829 sig = "ILL"; in die_from_signal()
852 sig = "FPE"; in die_from_signal()
863 sig = "TRAP"; in die_from_signal()
867 sig = sigbuf; in die_from_signal()
876 sig, code, info->si_addr); in die_from_signal()
1080 int do_sigaction(int sig, const struct target_sigaction *act, in do_sigaction() argument
1087 trace_signal_do_sigaction_guest(sig, TARGET_NSIG); in do_sigaction()
1089 if (sig < 1 || sig > TARGET_NSIG) { in do_sigaction()
1093 if (act && (sig == TARGET_SIGKILL || sig == TARGET_SIGSTOP)) { in do_sigaction()
1101 k = &sigact_table[sig - 1]; in do_sigaction()
1124 host_sig = target_to_host_signal(sig); in do_sigaction()
1129 sig); in do_sigaction()
1154 if (core_dump_signal(sig)) { in do_sigaction()
1171 static void handle_pending_signal(CPUArchState *cpu_env, int sig, in handle_pending_signal() argument
1182 trace_user_handle_signal(cpu_env, sig); in handle_pending_signal()
1197 sig = gdb_handlesig(cpu, sig, NULL, &k->info, sizeof(k->info)); in handle_pending_signal()
1198 if (!sig) { in handle_pending_signal()
1202 sa = &sigact_table[sig - 1]; in handle_pending_signal()
1207 print_taken_signal(sig, &unswapped); in handle_pending_signal()
1212 if (sig == TARGET_SIGTSTP || sig == TARGET_SIGTTIN || sig == TARGET_SIGTTOU) { in handle_pending_signal()
1214 } else if (sig != TARGET_SIGCHLD && in handle_pending_signal()
1215 sig != TARGET_SIGURG && in handle_pending_signal()
1216 sig != TARGET_SIGWINCH && in handle_pending_signal()
1217 sig != TARGET_SIGCONT) { in handle_pending_signal()
1218 dump_core_and_abort(cpu_env, sig); in handle_pending_signal()
1223 dump_core_and_abort(cpu_env, sig); in handle_pending_signal()
1232 sigaddset(&set, target_to_host_signal(sig)); in handle_pending_signal()
1255 setup_rt_frame(sig, sa, &k->info, &target_old_set, cpu_env); in handle_pending_signal()
1257 setup_frame(sig, sa, &target_old_set, cpu_env); in handle_pending_signal()
1261 setup_rt_frame(sig, sa, &k->info, &target_old_set, cpu_env); in handle_pending_signal()
1272 int sig; in process_pending_signals() local
1282 sig = ts->sync_signal.pending; in process_pending_signals()
1283 if (sig) { in process_pending_signals()
1292 if (sigismember(&ts->signal_mask, target_to_host_signal_table[sig]) in process_pending_signals()
1293 || sigact_table[sig - 1]._sa_handler == TARGET_SIG_IGN) { in process_pending_signals()
1294 sigdelset(&ts->signal_mask, target_to_host_signal_table[sig]); in process_pending_signals()
1295 sigact_table[sig - 1]._sa_handler = TARGET_SIG_DFL; in process_pending_signals()
1298 handle_pending_signal(cpu_env, sig, &ts->sync_signal); in process_pending_signals()
1301 for (sig = 1; sig <= TARGET_NSIG; sig++) { in process_pending_signals()
1305 if (ts->sigtab[sig - 1].pending && in process_pending_signals()
1307 target_to_host_signal_table[sig]))) { in process_pending_signals()
1308 handle_pending_signal(cpu_env, sig, &ts->sigtab[sig - 1]); in process_pending_signals()