MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / raise

Function raise

system/lib/libc/raise.c:57–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55};
56
57int raise(int sig) {
58 if (__sig_is_blocked(sig)) {
59 sigaddset(&__sig_pending, sig);
60 return 0;
61 }
62 if (__sig_actions[sig].sa_flags & SA_SIGINFO) {
63 siginfo_t t = {0};
64 __sig_actions[sig].sa_sigaction(sig, &t, NULL);
65 } else {
66 sighandler_t handler = __sig_actions[sig].sa_handler;
67 if (handler == SIG_DFL) {
68 handler = default_actions[sig];
69 if (handler) {
70 handler(sig);
71 }
72 } else if (handler != SIG_IGN) {
73 // Avoid a direct call to the handler, and instead call via JS so we can
74 // avoid strict signature checking.
75 // https://github.com/emscripten-core/posixtestsuite/issues/6
76 __call_sighandler(handler, sig);
77 }
78 }
79 return 0;
80}

Callers 11

killFunction · 0.70
raise_pending_signalsFunction · 0.70
mainFunction · 0.50
test_raise_sigusr1Function · 0.50
test_sigpendingFunction · 0.50
test_sigwaitinfoFunction · 0.50
mainFunction · 0.50
proxied_raiseFunction · 0.50
pthread_killFunction · 0.50
pthread_killFunction · 0.50
LLVM_LIBC_FUNCTIONFunction · 0.50

Calls 4

__sig_is_blockedFunction · 0.85
sigaddsetFunction · 0.85
handlerFunction · 0.85
__call_sighandlerFunction · 0.85

Tested by 5

mainFunction · 0.40
test_raise_sigusr1Function · 0.40
test_sigpendingFunction · 0.40
test_sigwaitinfoFunction · 0.40
mainFunction · 0.40