diff options
author | Bernd Schmidt <bernds_cb1@t-online.de> | 2007-11-22 16:55:08 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds_cb1@t-online.de> | 2007-11-22 16:55:08 +0000 |
commit | acadc5664e7f056e27c95d88522a573c1ed5cc49 (patch) | |
tree | 8ab6bd479cbcf9c44f6acd9ff57f4a2c29179475 /libpthread/linuxthreads.old/attr.c | |
parent | 90f1927f14e9cdbae37981af728af8e727838069 (diff) |
Add hidden symbols for a number of pthread functions, and use them to ensure
that all entries in the __pthread_functions point to functions within
libpthread, not identically-named functions in libc.
Diffstat (limited to 'libpthread/linuxthreads.old/attr.c')
-rw-r--r-- | libpthread/linuxthreads.old/attr.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/libpthread/linuxthreads.old/attr.c b/libpthread/linuxthreads.old/attr.c index 9deeee0ef..30294afe4 100644 --- a/libpthread/linuxthreads.old/attr.c +++ b/libpthread/linuxthreads.old/attr.c @@ -25,6 +25,19 @@ #include "pthread.h" #include "internals.h" +libpthread_hidden_proto(pthread_attr_destroy) +libpthread_hidden_proto(pthread_attr_init) +libpthread_hidden_proto(pthread_attr_getdetachstate) +libpthread_hidden_proto(pthread_attr_setdetachstate) +libpthread_hidden_proto(pthread_attr_getinheritsched) +libpthread_hidden_proto(pthread_attr_setinheritsched) +libpthread_hidden_proto(pthread_attr_setschedparam) +libpthread_hidden_proto(pthread_attr_getschedparam) +libpthread_hidden_proto(pthread_attr_getschedpolicy) +libpthread_hidden_proto(pthread_attr_setschedpolicy) +libpthread_hidden_proto(pthread_attr_getscope) +libpthread_hidden_proto(pthread_attr_setscope) + /* NOTE: With uClibc I don't think we need this versioning stuff. * Therefore, define the function pthread_attr_init() here using * a strong symbol. */ @@ -45,6 +58,7 @@ int pthread_attr_init(pthread_attr_t *attr) attr->__stacksize = STACK_SIZE - ps; return 0; } +libpthread_hidden_def(pthread_attr_init) /* uClibc: leave out this for now. */ #if DO_PTHREAD_VERSIONING_WITH_UCLIBC @@ -70,6 +84,8 @@ int pthread_attr_destroy(pthread_attr_t *attr attribute_unused) { return 0; } +libpthread_hidden_def(pthread_attr_destroy) + int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) { @@ -79,12 +95,14 @@ int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate) attr->__detachstate = detachstate; return 0; } +libpthread_hidden_def(pthread_attr_setdetachstate) int pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate) { *detachstate = attr->__detachstate; return 0; } +libpthread_hidden_def(pthread_attr_getdetachstate) int pthread_attr_setschedparam(pthread_attr_t *attr, const struct sched_param *param) @@ -97,6 +115,7 @@ int pthread_attr_setschedparam(pthread_attr_t *attr, memcpy (&attr->__schedparam, param, sizeof (struct sched_param)); return 0; } +libpthread_hidden_def(pthread_attr_setschedparam) int pthread_attr_getschedparam(const pthread_attr_t *attr, struct sched_param *param) @@ -104,6 +123,7 @@ int pthread_attr_getschedparam(const pthread_attr_t *attr, memcpy (param, &attr->__schedparam, sizeof (struct sched_param)); return 0; } +libpthread_hidden_def(pthread_attr_getschedparam) int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) { @@ -112,12 +132,14 @@ int pthread_attr_setschedpolicy(pthread_attr_t *attr, int policy) attr->__schedpolicy = policy; return 0; } +libpthread_hidden_def(pthread_attr_setschedpolicy) int pthread_attr_getschedpolicy(const pthread_attr_t *attr, int *policy) { *policy = attr->__schedpolicy; return 0; } +libpthread_hidden_def(pthread_attr_getschedpolicy) int pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit) { @@ -126,12 +148,14 @@ int pthread_attr_setinheritsched(pthread_attr_t *attr, int inherit) attr->__inheritsched = inherit; return 0; } +libpthread_hidden_def(pthread_attr_setinheritsched) int pthread_attr_getinheritsched(const pthread_attr_t *attr, int *inherit) { *inherit = attr->__inheritsched; return 0; } +libpthread_hidden_def(pthread_attr_getinheritsched) int pthread_attr_setscope(pthread_attr_t *attr, int scope) { @@ -145,12 +169,14 @@ int pthread_attr_setscope(pthread_attr_t *attr, int scope) return EINVAL; } } +libpthread_hidden_def(pthread_attr_setscope) int pthread_attr_getscope(const pthread_attr_t *attr, int *scope) { *scope = attr->__scope; return 0; } +libpthread_hidden_def(pthread_attr_getscope) int __pthread_attr_setguardsize(pthread_attr_t *attr, size_t guardsize) { |