LCLHDRS :=
libpthread-routines := \
- pt-init-specific \
- pt-alloc \
pt-create \
pt-getattr \
- pt-dealloc \
pt-detach \
pt-exit \
pt-initialize \
forward \
htlfreeres \
libc_pthread_init \
+ pt-alloc \
pt-attr \
pt-attr-destroy \
pt-attr-getdetachstate \
pt-condattr-init \
pt-condattr-setclock \
pt-condattr-setpshared \
+ pt-dealloc \
pt-destroy-specific \
pt-getconcurrency \
pt-getschedparam \
pt-getspecific \
+ pt-init-specific \
pt-key-create \
pt-key-delete \
pt-mutex-checklocked \
__pthread_cleanup_stack;
__pthread_total;
___pthread_self;
+ __pthread_alloc;
__pthread_block;
__pthread_block_intr;
__pthread_init_thread;
+ __pthread_init_static_tls;
__pthread_default_attr;
__pthread_attr_init;
__pthread_attr_getstacksize;
__pthread_attr_setstacksize;
__pthread_attr_setstackaddr;
__pthread_attr_setstack;
+ __pthread_dealloc;
+ __pthread_dealloc_finish;
__pthread_setcancelstate;
__pthread_cond_broadcast;
__pthread_cond_destroy;
__pthread_destroy_specific;
__pthread_getspecific;
__pthread_key_delete;
+ __pthread_max_threads;
__pthread_mutex_checklocked;
__pthread_mutex_destroy;
__pthread_mutex_init;
#include <string.h>
#include <pt-internal.h>
+#include <ldsodefs.h>
/* This braindamage is necessary because the standard says that some
of the threads functions "shall fail" if "No thread could be found
/* The size of the thread ID lookup table. */
int __pthread_max_threads;
+libc_hidden_data_def (__pthread_max_threads)
/* List of thread structures corresponding to free thread IDs. */
struct __pthread *__pthread_free_threads;
*pthread = new;
return 0;
}
+libc_hidden_def (__pthread_alloc)
void
attribute_hidden
}
__libc_rwlock_unlock (GL (dl_pthread_threads_lock));
}
+libc_hidden_def (__pthread_init_static_tls)
#include <pt-internal.h>
#include <atomic.h>
+#include <ldsodefs.h>
/* List of thread structures corresponding to free thread IDs. */
extern struct __pthread *__pthread_free_threads;
__pthread_enqueue (&__pthread_free_threads, pthread);
__pthread_mutex_unlock (&__pthread_free_threads_lock);
}
+libc_hidden_def (__pthread_dealloc)
/* Confirm deallocation of the thread structure for PTHREAD. */
void
which reads this variable. */
pthread->terminated = TRUE;
}
+libc_hidden_def (__pthread_dealloc_finish)
/* The size of the thread ID lookup table. */
extern int __pthread_max_threads;
+libc_hidden_proto (__pthread_max_threads)
#define __pthread_getid(thread) \
({ struct __pthread *__t = NULL; \
/* Allocate a new thread structure and a pthread thread ID (but not a
kernel thread or a stack). THREAD has one reference. */
extern int __pthread_alloc (struct __pthread **thread);
+libc_hidden_proto (__pthread_alloc)
/* Deallocate the content of the thread structure. This is the dual of
__pthread_alloc (N.B. it does not call __pthread_stack_dealloc nor
to call __pthread_dealloc_finish when it is really finished with using
THREAD. */
extern void __pthread_dealloc (struct __pthread *thread);
+libc_hidden_proto (__pthread_dealloc)
/* Confirm deallocating the thread structure. Before calling this
the structure will not be reused yet. */
extern void __pthread_dealloc_finish (struct __pthread *pthread);
-
+libc_hidden_proto (__pthread_dealloc_finish)
/* Allocate a stack of size STACKSIZE. The stack base shall be
returned in *STACKADDR. */
#include <stdlib.h>
#include <pt-internal.h>
+#include <string.h>
+
error_t
__pthread_init_specific (struct __pthread *thread)
/* Attribute to indicate thread creation was issued from C11 thrd_create. */
#define ATTR_C11_THREAD ((void*)(uintptr_t)-1)
-extern void __pthread_init_static_tls (struct link_map *) attribute_hidden;
+extern void __pthread_init_static_tls (struct link_map *);
+libc_hidden_proto (__pthread_init_static_tls)
/* These represent the interface used by glibc itself. */