summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/linuxthreads.old/forward.c8
-rw-r--r--libpthread/linuxthreads.old/internals.h6
-rw-r--r--libpthread/linuxthreads.old/lockfile.c12
-rw-r--r--libpthread/linuxthreads.old/mutex.c37
4 files changed, 33 insertions, 30 deletions
diff --git a/libpthread/linuxthreads.old/forward.c b/libpthread/linuxthreads.old/forward.c
index b6ff3d65b..87101a15b 100644
--- a/libpthread/linuxthreads.old/forward.c
+++ b/libpthread/linuxthreads.old/forward.c
@@ -120,16 +120,16 @@ FORWARD (pthread_mutex_destroy, (pthread_mutex_t *mutex), (mutex), 0)
FORWARD (pthread_mutex_init,
(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutexattr),
(mutex, mutexattr), 0)
-hidden_strong_alias(pthread_mutex_init, __pthread_mutex_init)
+strong_alias(pthread_mutex_init, __pthread_mutex_init)
FORWARD (pthread_mutex_lock, (pthread_mutex_t *mutex), (mutex), 0)
-hidden_strong_alias(pthread_mutex_lock, __pthread_mutex_lock)
+strong_alias(pthread_mutex_lock, __pthread_mutex_lock)
FORWARD (pthread_mutex_trylock, (pthread_mutex_t *mutex), (mutex), 0)
-hidden_strong_alias(pthread_mutex_trylock, __pthread_mutex_trylock)
+strong_alias(pthread_mutex_trylock, __pthread_mutex_trylock)
FORWARD (pthread_mutex_unlock, (pthread_mutex_t *mutex), (mutex), 0)
-hidden_strong_alias(pthread_mutex_unlock, __pthread_mutex_unlock)
+strong_alias(pthread_mutex_unlock, __pthread_mutex_unlock)
FORWARD2 (pthread_self, pthread_t, (void), (), return 0)
diff --git a/libpthread/linuxthreads.old/internals.h b/libpthread/linuxthreads.old/internals.h
index 54a80c09b..87ff1c194 100644
--- a/libpthread/linuxthreads.old/internals.h
+++ b/libpthread/linuxthreads.old/internals.h
@@ -509,6 +509,12 @@ extern __typeof(read) __libc_read;
extern __typeof(waitpid) __libc_waitpid;
extern __typeof(write) __libc_write;
+extern __typeof(pthread_mutex_init) __pthread_mutex_init attribute_hidden;
+extern __typeof(pthread_mutex_destroy) __pthread_mutex_destroy attribute_hidden;
+extern __typeof(pthread_mutex_lock) __pthread_mutex_lock attribute_hidden;
+extern __typeof(pthread_mutex_trylock) __pthread_mutex_trylock attribute_hidden;
+extern __typeof(pthread_mutex_unlock) __pthread_mutex_attribute_hidden;
+
/* Prototypes for some of the new semaphore functions. */
extern int __new_sem_post (sem_t * sem);
diff --git a/libpthread/linuxthreads.old/lockfile.c b/libpthread/linuxthreads.old/lockfile.c
index 48131bb4a..453a7e936 100644
--- a/libpthread/linuxthreads.old/lockfile.c
+++ b/libpthread/linuxthreads.old/lockfile.c
@@ -20,9 +20,9 @@
#include <stdio.h>
#include <pthread.h>
-libpthread_hidden_proto(pthread_mutexattr_init)
-libpthread_hidden_proto(pthread_mutexattr_settype)
-libpthread_hidden_proto(pthread_mutexattr_destroy)
+extern __typeof(pthread_mutexattr_init) __pthread_mutexattr_init attribute_hidden;
+extern __typeof(pthread_mutexattr_settype) __pthread_mutexattr_settype attribute_hidden;
+extern __typeof(pthread_mutexattr_destroy) __pthread_mutexattr_destroy attribute_hidden;
/* Note: glibc puts flockfile, funlockfile, and ftrylockfile in both
* libc and libpthread. In uClibc, they are now in libc only. */
@@ -33,11 +33,11 @@ __fresetlockfiles (void)
FILE *fp;
pthread_mutexattr_t attr;
- pthread_mutexattr_init(&attr);
- pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+ __pthread_mutexattr_init(&attr);
+ __pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
for (fp = _stdio_openlist; fp != NULL; fp = fp->__nextopen)
__pthread_mutex_init(&fp->__lock, &attr);
- pthread_mutexattr_destroy(&attr);
+ __pthread_mutexattr_destroy(&attr);
}
diff --git a/libpthread/linuxthreads.old/mutex.c b/libpthread/linuxthreads.old/mutex.c
index 5858874ec..8d26b8a87 100644
--- a/libpthread/linuxthreads.old/mutex.c
+++ b/libpthread/linuxthreads.old/mutex.c
@@ -24,7 +24,7 @@
#include "queue.h"
#include "restart.h"
-int pthread_mutex_init(pthread_mutex_t * mutex,
+int attribute_hidden __pthread_mutex_init(pthread_mutex_t * mutex,
const pthread_mutexattr_t * mutex_attr)
{
__pthread_init_lock(&mutex->__m_lock);
@@ -34,9 +34,9 @@ int pthread_mutex_init(pthread_mutex_t * mutex,
mutex->__m_owner = NULL;
return 0;
}
-hidden_strong_alias (pthread_mutex_init, __pthread_mutex_init)
+strong_alias (__pthread_mutex_init, pthread_mutex_init)
-int pthread_mutex_destroy(pthread_mutex_t * mutex)
+int attribute_hidden __pthread_mutex_destroy(pthread_mutex_t * mutex)
{
switch (mutex->__m_kind) {
case PTHREAD_MUTEX_ADAPTIVE_NP:
@@ -53,9 +53,9 @@ int pthread_mutex_destroy(pthread_mutex_t * mutex)
return EINVAL;
}
}
-hidden_strong_alias (pthread_mutex_destroy, __pthread_mutex_destroy)
+strong_alias (__pthread_mutex_destroy, pthread_mutex_destroy)
-int pthread_mutex_trylock(pthread_mutex_t * mutex)
+int attribute_hidden __pthread_mutex_trylock(pthread_mutex_t * mutex)
{
pthread_descr self;
int retcode;
@@ -89,9 +89,9 @@ int pthread_mutex_trylock(pthread_mutex_t * mutex)
return EINVAL;
}
}
-hidden_strong_alias (pthread_mutex_trylock, __pthread_mutex_trylock)
+strong_alias (__pthread_mutex_trylock, pthread_mutex_trylock)
-int pthread_mutex_lock(pthread_mutex_t * mutex)
+int attribute_hidden __pthread_mutex_lock(pthread_mutex_t * mutex)
{
pthread_descr self;
@@ -122,7 +122,7 @@ int pthread_mutex_lock(pthread_mutex_t * mutex)
return EINVAL;
}
}
-hidden_strong_alias (pthread_mutex_lock, __pthread_mutex_lock)
+strong_alias (__pthread_mutex_lock, pthread_mutex_lock)
int pthread_mutex_timedlock (pthread_mutex_t *mutex,
const struct timespec *abstime)
@@ -167,7 +167,7 @@ int pthread_mutex_timedlock (pthread_mutex_t *mutex,
}
}
-int pthread_mutex_unlock(pthread_mutex_t * mutex)
+int attribute_hidden __pthread_mutex_unlock(pthread_mutex_t * mutex)
{
switch (mutex->__m_kind) {
case PTHREAD_MUTEX_ADAPTIVE_NP:
@@ -196,25 +196,22 @@ int pthread_mutex_unlock(pthread_mutex_t * mutex)
return EINVAL;
}
}
-hidden_strong_alias (pthread_mutex_unlock, __pthread_mutex_unlock)
+strong_alias (__pthread_mutex_unlock, pthread_mutex_unlock)
-libpthread_hidden_proto(pthread_mutexattr_init)
-int pthread_mutexattr_init(pthread_mutexattr_t *attr)
+int attribute_hidden __pthread_mutexattr_init(pthread_mutexattr_t *attr)
{
attr->__mutexkind = PTHREAD_MUTEX_TIMED_NP;
return 0;
}
-libpthread_hidden_def(pthread_mutexattr_init)
+strong_alias(__pthread_mutexattr_init,pthread_mutexattr_init)
-libpthread_hidden_proto(pthread_mutexattr_destroy)
-int pthread_mutexattr_destroy(pthread_mutexattr_t *attr attribute_unused)
+int attribute_hidden __pthread_mutexattr_destroy(pthread_mutexattr_t *attr attribute_unused)
{
return 0;
}
-libpthread_hidden_def(pthread_mutexattr_destroy)
+strong_alias(__pthread_mutexattr_destroy,pthread_mutexattr_destroy)
-libpthread_hidden_proto(pthread_mutexattr_settype)
-int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind)
+int attribute_hidden __pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind)
{
if (kind != PTHREAD_MUTEX_ADAPTIVE_NP
&& kind != PTHREAD_MUTEX_RECURSIVE_NP
@@ -224,8 +221,8 @@ int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int kind)
attr->__mutexkind = kind;
return 0;
}
-libpthread_hidden_def(pthread_mutexattr_settype)
-strong_alias (pthread_mutexattr_settype, __pthread_mutexattr_setkind_np)
+strong_alias(__pthread_mutexattr_settype,pthread_mutexattr_settype)
+strong_alias (__pthread_mutexattr_settype, __pthread_mutexattr_setkind_np)
weak_alias (__pthread_mutexattr_setkind_np, pthread_mutexattr_setkind_np)
int __pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *kind)