浏览代码

"optimize" arm __pthread_self

actually this is just to avoid gcc being stupid and refusing to inline
the function version, even when the size cost is essentially identical
whether it's inlined or not.
Rich Felker 13 年之前
父节点
当前提交
d5bde7babb
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      arch/arm/pthread_arch.h

+ 1 - 4
arch/arm/pthread_arch.h

@@ -1,7 +1,4 @@
-static inline struct pthread *__pthread_self()
-{
-	return ((void *(*)(void))0xffff0fe0)();
-}
+#define __pthread_self ((pthread_t (*)(void))0xffff0fe0)
 
 #define CANCEL_REG_SP 16
 #define CANCEL_REG_IP 18