summaryrefslogtreecommitdiff
path: root/include/pthread.h
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-06-06 20:12:42 -0400
committerRich Felker <dalias@aerifal.cx>2011-06-06 20:12:42 -0400
commitcbf35978a9870fb1f5c73a852c986d4fcca6c2d4 (patch)
treec7a9371d2ca441203a07cd689a671d6a2e98ca8b /include/pthread.h
parent71a80c5767aa4e6b7cbc2b58feef3cfca76e29fe (diff)
downloadmusl-cbf35978a9870fb1f5c73a852c986d4fcca6c2d4.tar.gz
musl-cbf35978a9870fb1f5c73a852c986d4fcca6c2d4.tar.bz2
musl-cbf35978a9870fb1f5c73a852c986d4fcca6c2d4.tar.xz
musl-cbf35978a9870fb1f5c73a852c986d4fcca6c2d4.zip
use __attribute__((const)) for errno and pthread_self if __GNUC__ is defined
this is not too ugly and should result in significant code size and performance improvements for many programs.
Diffstat (limited to 'include/pthread.h')
-rw-r--r--include/pthread.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/pthread.h b/include/pthread.h
index 5d97ebf6..a0af20fe 100644
--- a/include/pthread.h
+++ b/include/pthread.h
@@ -76,6 +76,9 @@ int pthread_detach(pthread_t);
void pthread_exit(void *);
int pthread_join(pthread_t, void **);
+#ifdef __GNUC__
+__attribute__((const))
+#endif
pthread_t pthread_self(void);
int pthread_equal(pthread_t, pthread_t);