summaryrefslogtreecommitdiff
path: root/pthread
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-04-21 22:07:49 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-04-21 22:07:49 +0000
commit51feb14bff6b4aa70e2f13a54e26a6b270de3e4d (patch)
tree239bdac248d9900665c6d3531c6c37c2eee9df02 /pthread
parentdb7bf9590dc08a72de9a9c46db7937188156fa2e (diff)
Rename pthread functions to be used for forwarding
Libc will need to be able to call them, so they need to have a different name. * pthread/pt-exit.c (pthread_exit): Rename with __ prefix and add strong alias. * pthread/pt-self.c (pthread_self): Likewise. * pthread/pt-setcancelstate.c (pthread_setcancelstate): Likewise * pthread/pt-setcanceltype.c (pthread_setcanceltype): Likewise * sysdeps/generic/pt-attr-destroy.c (pthread_attr_destroy): Likewise * sysdeps/generic/pt-attr-getdetachstate.c (pthread_attr_getdetachstate): Likewise * sysdeps/generic/pt-attr-getinheritsched.c (pthread_attr_getinheritsched): Likewise * sysdeps/generic/pt-attr-getschedparam.c (pthread_attr_getschedparam): Likewise * sysdeps/generic/pt-attr-getschedpolicy.c (pthread_attr_getschedpolicy): Likewise * sysdeps/generic/pt-attr-getscope.c (pthread_attr_getscope): Likewise * sysdeps/generic/pt-attr-init.c (pthread_attr_init): Likewise * sysdeps/generic/pt-attr-setdetachstate.c (pthread_attr_setdetachstate): Likewise * sysdeps/generic/pt-attr-setinheritsched.c (pthread_attr_setinheritsched): Likewise * sysdeps/generic/pt-attr-setschedparam.c (pthread_attr_setschedparam): Likewise * sysdeps/generic/pt-attr-setschedpolicy.c (pthread_attr_setschedpolicy): Likewise * sysdeps/generic/pt-attr-setscope.c (pthread_attr_setscope): Likewise * sysdeps/generic/pt-cond-brdcast.c (pthread_cond_broadcast): Likewise * sysdeps/generic/pt-cond-destroy.c (pthread_cond_destroy): Likewise * sysdeps/generic/pt-cond-init.c (pthread_cond_init): Likewise * sysdeps/generic/pt-cond-signal.c (pthread_cond_signal): Likewise * sysdeps/generic/pt-cond-timedwait.c (pthread_cond_timedwait): Likewise * sysdeps/generic/pt-cond-wait.c (pthread_cond_wait): Likewise * sysdeps/generic/pt-condattr-destroy.c (pthread_condattr_destroy): Likewise * sysdeps/generic/pt-condattr-init.c (pthread_condattr_init): Likewise * sysdeps/generic/pt-equal.c (pthread_equal): Likewise * sysdeps/generic/pt-getschedparam.c (pthread_getschedparam): Likewise * sysdeps/generic/pt-setschedparam.c (pthread_setschedparam): Likewise
Diffstat (limited to 'pthread')
-rw-r--r--pthread/pt-exit.c4
-rw-r--r--pthread/pt-self.c4
-rw-r--r--pthread/pt-setcancelstate.c4
-rw-r--r--pthread/pt-setcanceltype.c4
4 files changed, 12 insertions, 4 deletions
diff --git a/pthread/pt-exit.c b/pthread/pt-exit.c
index c01efda..53a0427 100644
--- a/pthread/pt-exit.c
+++ b/pthread/pt-exit.c
@@ -30,7 +30,7 @@
/* Terminate the current thread and make STATUS available to any
thread that might join it. */
void
-pthread_exit (void *status)
+__pthread_exit (void *status)
{
struct __pthread *self = _pthread_self ();
struct __pthread_cancelation_handler **handlers;
@@ -120,3 +120,5 @@ pthread_exit (void *status)
/* NOTREACHED */
abort ();
}
+
+strong_alias (__pthread_exit, pthread_exit);
diff --git a/pthread/pt-self.c b/pthread/pt-self.c
index 4976864..deb57c0 100644
--- a/pthread/pt-self.c
+++ b/pthread/pt-self.c
@@ -23,10 +23,12 @@
/* Return the thread ID of the calling thread. */
pthread_t
-pthread_self (void)
+__pthread_self (void)
{
struct __pthread *self = _pthread_self ();
assert (self);
return self->thread;
}
+
+strong_alias (__pthread_self, pthread_self);
diff --git a/pthread/pt-setcancelstate.c b/pthread/pt-setcancelstate.c
index e2d8183..38550ee 100644
--- a/pthread/pt-setcancelstate.c
+++ b/pthread/pt-setcancelstate.c
@@ -22,7 +22,7 @@
#include <pt-internal.h>
int
-pthread_setcancelstate (int state, int *oldstate)
+__pthread_setcancelstate (int state, int *oldstate)
{
struct __pthread *p = _pthread_self ();
@@ -41,3 +41,5 @@ pthread_setcancelstate (int state, int *oldstate)
return 0;
}
+
+strong_alias (__pthread_setcancelstate, pthread_setcancelstate);
diff --git a/pthread/pt-setcanceltype.c b/pthread/pt-setcanceltype.c
index 3ce4259..7226a3a 100644
--- a/pthread/pt-setcanceltype.c
+++ b/pthread/pt-setcanceltype.c
@@ -22,7 +22,7 @@
#include <pt-internal.h>
int
-pthread_setcanceltype (int type, int *oldtype)
+__pthread_setcanceltype (int type, int *oldtype)
{
struct __pthread *p = _pthread_self ();
@@ -41,3 +41,5 @@ pthread_setcanceltype (int type, int *oldtype)
return 0;
}
+
+strong_alias (__pthread_setcanceltype, pthread_setcanceltype);