svn commit: trunk/uClibc/libc/sysdeps/linux/common/bits

Peter S. Mazinger ps.m at gmx.net
Thu Dec 29 10:18:23 UTC 2005


On Wed, 28 Dec 2005 vapier at uclibc.org wrote:

> Author: vapier
> Date: 2005-12-28 23:06:08 -0800 (Wed, 28 Dec 2005)
> New Revision: 13006
> 
> Log:
> hide the internal libc pthread_mutex funcs
> 
> Modified:
>    trunk/uClibc/libc/sysdeps/linux/common/bits/uClibc_pthread.h

attribute_hidden is a problem if it becomes visible in userspace

We have 2 options:
a. don't use attribute_hidden (use instead __attribute__ ....)
b. I opted for this
change 
#ifdef _LIBC
to
#if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc)

that will assure that apps defining _LIBC for some weird reason won't fail 
using this header

Peter
> 
> 
> Changeset:
> Modified: trunk/uClibc/libc/sysdeps/linux/common/bits/uClibc_pthread.h
> ===================================================================
> --- trunk/uClibc/libc/sysdeps/linux/common/bits/uClibc_pthread.h	2005-12-29 07:05:08 UTC (rev 13005)
> +++ trunk/uClibc/libc/sysdeps/linux/common/bits/uClibc_pthread.h	2005-12-29 07:06:08 UTC (rev 13006)
> @@ -16,7 +16,7 @@
>   *  02111-1307 USA.
>   */
>  
> -/* Supply prototypes for the (weak) thread functions used by the
> +/* Supply prototypes for the internal thread functions used by the
>   * uClibc library code.
>   */
>  
> @@ -24,17 +24,14 @@
>  #define _UCLIBC_PTHREAD_H
>  
>  #ifndef _PTHREAD_H
> -#error Always include <pthread.h> rather than <bits/uClibc_pthread.h>
> +# error "Always include <pthread.h> rather than <bits/uClibc_pthread.h>"
>  #endif
>  
>  extern int __pthread_mutex_init (pthread_mutex_t *__restrict __mutex,
>  								 __const pthread_mutexattr_t *__restrict
> -								 __mutex_attr) __THROW;
> +								 __mutex_attr) attribute_hidden;
> +extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex) attribute_hidden;
> +extern int __pthread_mutex_lock (pthread_mutex_t *__mutex) attribute_hidden;
> +extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex) attribute_hidden;
>  
> -extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex) __THROW;
> -
> -extern int __pthread_mutex_lock (pthread_mutex_t *__mutex) __THROW;
> -
> -extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex) __THROW;
> -
>  #endif
> 
> _______________________________________________
> uClibc-cvs mailing list
> uClibc-cvs at uclibc.org
> http://busybox.net/cgi-bin/mailman/listinfo/uclibc-cvs
> 
> 

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2




More information about the uClibc-cvs mailing list