Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Unified Diff: src/trusted/service_runtime/posix/nacl_signal.c

Issue 10392005: Thread suspension: Implement for Linux (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Comment about docs Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/trusted/service_runtime/nacl_syscall_hook.c ('k') | src/trusted/service_runtime/sel_ldr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/trusted/service_runtime/posix/nacl_signal.c
diff --git a/src/trusted/service_runtime/posix/nacl_signal.c b/src/trusted/service_runtime/posix/nacl_signal.c
index d266c539f950162d43af0ef0abac0953fd58fcb4..214a3d08f35245de36ffed28e605c29c8d95d35c 100644
--- a/src/trusted/service_runtime/posix/nacl_signal.c
+++ b/src/trusted/service_runtime/posix/nacl_signal.c
@@ -46,6 +46,7 @@
static int s_Signals[] = {
#if NACL_LINUX
SIGSTKFLT,
+ NACL_THREAD_SUSPEND_SIGNAL,
#endif
SIGINT, SIGQUIT, SIGILL, SIGTRAP, SIGBUS, SIGFPE, SIGSEGV
};
@@ -316,6 +317,13 @@ static void SignalCatch(int sig, siginfo_t *info, void *uc) {
}
#endif
+#if NACL_LINUX
+ if (sig == NACL_THREAD_SUSPEND_SIGNAL) {
+ NaClSuspendSignalHandler();
+ return;
+ }
+#endif
+
if (is_untrusted && sig == SIGSEGV) {
if (DispatchToUntrustedHandler(natp, &sigCtx)) {
NaClSignalContextToHandler(uc, &sigCtx);
« no previous file with comments | « src/trusted/service_runtime/nacl_syscall_hook.c ('k') | src/trusted/service_runtime/sel_ldr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698