Use TLS_SLOT_THREAD_ID macro in vfork.S
No functional change intended.
Bug: none
Test: bionic unit tests
Change-Id: I7ee0a2b3f0e3807abe88bfa34ef3cd56c150a8f6
diff --git a/libc/arch-x86/bionic/vfork.S b/libc/arch-x86/bionic/vfork.S
index 79d7899..24ede3d 100644
--- a/libc/arch-x86/bionic/vfork.S
+++ b/libc/arch-x86/bionic/vfork.S
@@ -27,6 +27,7 @@
*/
#include <private/bionic_asm.h>
+#include <private/bionic_asm_tls.h>
// This custom code preserves the return address across the system call.
@@ -38,7 +39,7 @@
// __get_tls()[TLS_SLOT_THREAD_ID]->cached_pid_ = 0
movl %gs:0, %eax
- movl 4(%eax), %eax
+ movl (TLS_SLOT_THREAD_ID * 4)(%eax), %eax
movl $0, 12(%eax)
movl $__NR_vfork, %eax