|
Remove nacl_user[] array lookup from syscall code path on x86-64 and MIPS
Replace the nacl_thread_index/gNaClThreadIdx TLS variable with a TLS
variable that points to the NaClThreadContext directly.
This saves a memory access in the syscall code path.
This also reduces the number of cases in which we rely on thread
indexes.
Replace NaCl{Get,Set}TlsIdx() with NaCl{Get,Set}CurrentThread().
Add a cleanup step in NaClAppThreadTeardown() to unset the TLS
variable.
BUG=https://code.google.com/p/nativeclient/issues/detail?id=3280
TEST=run_hello_world_test
Committed: https://src.chromium.org/viewvc/native_client?view=rev&revision=10849
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+82 lines, -114 lines) |
Patch |
 |
M |
src/trusted/service_runtime/arch/arm/nacl_tls.c
|
View
|
|
2 chunks |
+9 lines, -11 lines |
0 comments
|
Download
|
 |
M |
src/trusted/service_runtime/arch/mips/nacl_syscall.S
|
View
|
|
1 chunk |
+4 lines, -13 lines |
0 comments
|
Download
|
 |
M |
src/trusted/service_runtime/arch/mips/nacl_tls.c
|
View
|
|
2 chunks |
+9 lines, -11 lines |
2 comments
|
Download
|
 |
M |
src/trusted/service_runtime/arch/x86_32/nacl_tls_32.c
|
View
|
|
3 chunks |
+8 lines, -8 lines |
0 comments
|
Download
|
 |
M |
src/trusted/service_runtime/arch/x86_64/nacl_syscall_64.S
|
View
|
|
5 chunks |
+14 lines, -19 lines |
0 comments
|
Download
|
 |
M |
src/trusted/service_runtime/arch/x86_64/nacl_tls_64.c
|
View
|
|
6 chunks |
+24 lines, -20 lines |
0 comments
|
Download
|
 |
M |
src/trusted/service_runtime/linux/thread_suspension.c
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
src/trusted/service_runtime/nacl_app_thread.c
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
src/trusted/service_runtime/nacl_signal_common.c
|
View
|
|
3 chunks |
+7 lines, -9 lines |
0 comments
|
Download
|
 |
M |
src/trusted/service_runtime/nacl_tls.h
|
View
|
|
2 chunks |
+3 lines, -19 lines |
0 comments
|
Download
|
 |
M |
tests/thread_capture/arch/x86_64/thread_capture_test_injection.c
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 3 (0 generated)
|