1 #ifndef __UCLIBC_COMPAT_H
2 #define __UCLIBC_COMPAT_H
10 #ifndef __UCLIBC_HAS_THREADS__
11 #define __UCLIBC_HAS_THREADS__
18 #include <bits/libc-lock.h>
20 #undef __UCLIBC_MUTEX_STATIC
21 #undef __UCLIBC_MUTEX_LOCK
22 #undef __UCLIBC_MUTEX_UNLOCK
23 #define __UCLIBC_MUTEX_STATIC(M,I) static pthread_mutex_t M = I
24 #define __UCLIBC_MUTEX_LOCK(M) pthread_mutex_lock(&(M))
25 #define __UCLIBC_MUTEX_UNLOCK(M) pthread_mutex_unlock(&(M))
30 #define _(...) __VA_ARGS__
31 #define internal_function
32 #define attribute_hidden
33 #define attribute_unused
34 #define attribute_noreturn
35 #define libc_hidden_def(...)
37 #ifndef libc_hidden_proto
38 #define libc_hidden_proto(name, attrs...)
41 #define __set_errno(_val) errno = _val
43 # define attribute_tls_model_ie __attribute__ ((tls_model ("initial-exec")))
45 # define __libc_tsd_define(CLASS, KEY) \
46 CLASS __thread void *__libc_tsd_##KEY attribute_tls_model_ie;
48 # define __libc_tsd_address(KEY) (&__libc_tsd_##KEY)
49 # define __libc_tsd_get(KEY) (__libc_tsd_##KEY)
50 # define __libc_tsd_set(KEY, VALUE) (__libc_tsd_##KEY = (VALUE))