提交 cbf35978 编写于 作者: R Rich Felker

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.
上级 71a80c57
......@@ -7,6 +7,9 @@ extern "C" {
#include <bits/errno.h>
#ifdef __GNUC__
__attribute__((const))
#endif
extern int *__errno_location(void);
#define errno (*__errno_location())
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册