=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: ntdll: Set TPIDRURW to TEB on thread init for ARM.

Alexandre Julliard julliard at winehq.org
Thu Feb 7 14:07:24 CST 2013


Module: wine
Branch: master
Commit: b288f7be1860c6373555b3d412fe849a656fe165
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=b288f7be1860c6373555b3d412fe849a656fe165

Author: André Hentschel <nerv at dawncrow.de>
Date:   Wed Feb  6 22:00:59 2013 +0100

ntdll: Set TPIDRURW to TEB on thread init for ARM.

---

 dlls/ntdll/signal_arm.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/dlls/ntdll/signal_arm.c b/dlls/ntdll/signal_arm.c
index 5ad4016..6abd76b 100644
--- a/dlls/ntdll/signal_arm.c
+++ b/dlls/ntdll/signal_arm.c
@@ -832,6 +832,21 @@ void signal_free_thread( TEB *teb )
     NtFreeVirtualMemory( NtCurrentProcess(), (void **)&teb, &size, MEM_RELEASE );
 }
 
+/**********************************************************************
+ *      set_tpidrurw
+ *
+ * Win32/ARM applications expect the TEB pointer to be in the TPIDRURW register.
+ */
+#ifdef __ARM_ARCH_7A__
+extern void set_tpidrurw( TEB *teb );
+__ASM_GLOBAL_FUNC( set_tpidrurw,
+                   "mcr p15, 0, r0, c13, c0, 2\n\t" /* TEB -> TPIDRURW */
+                   "blx lr" )
+#else
+void set_tpidrurw( TEB *teb )
+{
+}
+#endif
 
 /**********************************************************************
  *		signal_init_thread
@@ -845,6 +860,7 @@ void signal_init_thread( TEB *teb )
         pthread_key_create( &teb_key, NULL );
         init_done = 1;
     }
+    set_tpidrurw( teb );
     pthread_setspecific( teb_key, teb );
 }
 




More information about the wine-cvs mailing list