1 #ifndef __UCLIBC_COMPAT_H
2 #define __UCLIBC_COMPAT_H
10 #ifndef __UCLIBC_HAS_THREADS__
11 #define __UCLIBC_HAS_THREADS__
17 #undef __UCLIBC_MUTEX_STATIC
18 #undef __UCLIBC_MUTEX_LOCK
19 #undef __UCLIBC_MUTEX_UNLOCK
20 #define __UCLIBC_MUTEX_STATIC(M,I) static pthread_mutex_t M = I
21 #define __UCLIBC_MUTEX_LOCK(M) pthread_mutex_lock(&(M))
22 #define __UCLIBC_MUTEX_UNLOCK(M) pthread_mutex_unlock(&(M))
26 #define _(...) __VA_ARGS__
27 #define internal_function
28 #define attribute_hidden
29 #define attribute_unused
30 #define attribute_noreturn
31 #define libc_hidden_def(...)
33 #ifndef libc_hidden_proto
34 #define libc_hidden_proto(name, attrs...)
37 #define __set_errno(_val) errno = _val
39 # define attribute_tls_model_ie __attribute__ ((tls_model ("initial-exec")))
41 # define __libc_tsd_define(CLASS, KEY) \
42 CLASS __thread void *__libc_tsd_##KEY attribute_tls_model_ie;
44 # define __libc_tsd_address(KEY) (&__libc_tsd_##KEY)
45 # define __libc_tsd_get(KEY) (__libc_tsd_##KEY)
46 # define __libc_tsd_set(KEY, VALUE) (__libc_tsd_##KEY = (VALUE))