summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-06-11 23:34:40 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-06-10 22:15:14 +0000
commit2c02d0057c93bfa6db4b30d8646baeb55d076062 (patch)
treeaeb8ab061f8c6ab737bc1fc07a2aebf55b4ef900 /libc
parentab66d360bc6f543b6c26400067e50db3134798e1 (diff)
parentb27a840f4b520bfa095db99b0a2e5205634b0003 (diff)
downloadbionic-2c02d0057c93bfa6db4b30d8646baeb55d076062.zip
bionic-2c02d0057c93bfa6db4b30d8646baeb55d076062.tar.gz
bionic-2c02d0057c93bfa6db4b30d8646baeb55d076062.tar.bz2
Merge "Add __pure2 to a few more functions, most notably gettid and pthread_self."
Diffstat (limited to 'libc')
-rw-r--r--libc/include/errno.h2
-rw-r--r--libc/include/pthread.h2
-rw-r--r--libc/include/stdlib.h6
-rw-r--r--libc/include/unistd.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/libc/include/errno.h b/libc/include/errno.h
index 2e5ce5f..1a36b7a 100644
--- a/libc/include/errno.h
+++ b/libc/include/errno.h
@@ -41,7 +41,7 @@ __BEGIN_DECLS
#endif
/* internal function returning the address of the thread-specific errno */
-extern volatile int* __errno(void);
+extern volatile int* __errno(void) __pure2;
/* a macro expanding to the errno l-value */
#define errno (*__errno())
diff --git a/libc/include/pthread.h b/libc/include/pthread.h
index 5c9b626..29caafc 100644
--- a/libc/include/pthread.h
+++ b/libc/include/pthread.h
@@ -226,7 +226,7 @@ int pthread_rwlock_trywrlock(pthread_rwlock_t*) __nonnull((1));
int pthread_rwlock_unlock(pthread_rwlock_t *rwlock) __nonnull((1));
int pthread_rwlock_wrlock(pthread_rwlock_t*) __nonnull((1));
-pthread_t pthread_self(void);
+pthread_t pthread_self(void) __pure2;
int pthread_setname_np(pthread_t, const char*) __nonnull((2));
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 483aaf0..0f862c3 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -138,21 +138,21 @@ typedef struct {
int rem;
} div_t;
-extern div_t div(int, int);
+extern div_t div(int, int) __pure2;
typedef struct {
long int quot;
long int rem;
} ldiv_t;
-extern ldiv_t ldiv(long, long);
+extern ldiv_t ldiv(long, long) __pure2;
typedef struct {
long long int quot;
long long int rem;
} lldiv_t;
-extern lldiv_t lldiv(long long, long long);
+extern lldiv_t lldiv(long long, long long) __pure2;
/* BSD compatibility. */
extern const char* getprogname(void);
diff --git a/libc/include/unistd.h b/libc/include/unistd.h
index b4982cb..ee6d7b1 100644
--- a/libc/include/unistd.h
+++ b/libc/include/unistd.h
@@ -54,7 +54,7 @@ extern __noreturn void _exit(int);
extern pid_t fork(void);
extern pid_t vfork(void);
extern pid_t getpid(void);
-extern pid_t gettid(void);
+extern pid_t gettid(void) __pure2;
extern pid_t getpgid(pid_t);
extern int setpgid(pid_t, pid_t);
extern pid_t getppid(void);