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

Unified Diff: src/trusted/service_runtime/nacl_tls.h

Issue 12218089: Remove nacl_user[] array lookup from syscall code path on x86-64 and MIPS (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_tls.h
diff --git a/src/trusted/service_runtime/nacl_tls.h b/src/trusted/service_runtime/nacl_tls.h
index c5db924a3b404aeddc2568d79fe1041b887df2ee..64ba4d7d6ca8590097f2f5e4e767bb7a23b2abf0 100644
--- a/src/trusted/service_runtime/nacl_tls.h
+++ b/src/trusted/service_runtime/nacl_tls.h
@@ -52,19 +52,13 @@ void NaClTlsFree(struct NaClAppThread *natp);
/*
* Called in thread bootup code, to set TLS/TSD when the thread ID is not
* saved in a reserved register (e.g., %gs in NaCl x86-32).
- *
- * No-op for x86-32 NaCl classic.
*/
-void NaClTlsSetIdx(uint32_t tls_idx);
+void NaClTlsSetCurrentThread(struct NaClAppThread *natp);
/*
- * Gets the current thread's index value as set by NaClTlsSetIdx().
- * Only implemented for x86-64 and ARM, since these are the only sandboxes
- * where we use the host OS's TLS facility.
- * Returns NACL_TLS_INDEX_INVALID if NaClTlsSetIdx() has not been
- * called on this thread.
+ * Get the current thread as set by NaClTlsSetCurrentThread().
*/
-uint32_t NaClTlsGetIdx(void);
+struct NaClAppThread *NaClTlsGetCurrentThread(void);
void NaClTlsSetTlsValue1(struct NaClAppThread *natp, uint32_t value);
void NaClTlsSetTlsValue2(struct NaClAppThread *natp, uint32_t value);
@@ -79,14 +73,4 @@ uint32_t NaClTlsGetTlsValue2(struct NaClAppThread *natp);
uint32_t NaClGetThreadIdx(struct NaClAppThread *natp);
-#if NACL_OSX
-/*
- * OSX does not have TLS and we emulate it on the trusted side using TSD.
- */
-extern pthread_key_t nacl_thread_info_key;
-extern uint32_t nacl_thread_index_tls_offset;
-
-#endif
-
-
#endif /* SERVICE_RUNTIME_NACL_THREAD_H__ */

Powered by Google App Engine
This is Rietveld 408576698