#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.
#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;
}