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

Unified Diff: src/trusted/service_runtime/nacl_app_thread.c

Issue 12207165: Mac x86_64: Mach exception support (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 7 years, 10 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
Index: src/trusted/service_runtime/nacl_app_thread.c
===================================================================
--- src/trusted/service_runtime/nacl_app_thread.c (revision 10790)
+++ src/trusted/service_runtime/nacl_app_thread.c (working copy)
@@ -23,7 +23,11 @@
#include "native_client/src/trusted/service_runtime/nacl_stack_safety.h"
#include "native_client/src/trusted/service_runtime/nacl_syscall_common.h"
+#if NACL_OSX
Mark Seaborn 2013/02/14 00:37:54 I'd be inclined to put this #if into the header so
+#include "native_client/src/trusted/service_runtime/osx/mach_thread_map.h"
+#endif
+
void WINAPI NaClAppThreadLauncher(void *state) {
struct NaClAppThread *natp = (struct NaClAppThread *) state;
uint32_t thread_idx;
@@ -43,6 +47,8 @@
nacl_user[thread_idx] = &natp->user;
#if NACL_WINDOWS
nacl_thread_ids[thread_idx] = GetCurrentThreadId();
+#elif NACL_OSX
+ SetCurrentMachThreadForNaClThreadIndex(thread_idx);
#endif
/*
@@ -122,6 +128,8 @@
nacl_user[thread_idx] = NULL;
#if NACL_WINDOWS
nacl_thread_ids[thread_idx] = 0;
+#elif NACL_OSX
+ ClearMachThreadForNaClThreadIndex(thread_idx);
#endif
NaClLog(3, " removing thread from thread table\n");

Powered by Google App Engine
This is Rietveld 408576698