]> git.saurik.com Git - apple/libc.git/blobdiff - pthreads/pthread_internals.h
Libc-498.1.5.tar.gz
[apple/libc.git] / pthreads / pthread_internals.h
index cce2e480e28146fc4388e8d17e0bf156cd66f67f..a0549d6bae8061f0bc49013f3303667ffb52a288 100644 (file)
@@ -367,7 +367,7 @@ extern struct __pthread_workqueue_pool __pthread_workqueue_pool_head;        /*
 
 #include "pthread.h"
 
-#if defined(__i386__) || defined(__ppc64__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__ppc64__) || defined(__x86_64__) || defined(__arm__)
 /*
  * Inside libSystem, we can use r13 or %gs directly to get access to the
  * thread-specific data area. The current thread is in the first slot.
@@ -381,6 +381,9 @@ _pthread_self_direct(void)
 #elif defined(__ppc64__)
        register const pthread_t __pthread_self asm ("r13");
        ret = __pthread_self;
+#elif defined(__arm__)
+       register const pthread_t __pthread_self asm ("r9");
+       ret = __pthread_self;
 #endif
        return ret;
 }