DIRS=
ifeq ($(strip $(INCLUDE_THREADS)),true)
- DIRS+=linuxthreads linuxthreads_db
+ DIRS+=linuxthreads
+endif
+ifeq ($(strip $(DODEBUG)),true)
+ DIRS+=linuxthreads_db
endif
ALL_SUBDIRS = linuxthreads linuxthreads_db
#include "pthread.h"
#include "internals.h"
#include <stdio.h>
-extern int _errno;
-extern int _h_errno;
int * __errno_location()
{
- /* check, if the library is initilize */
- if (__pthread_initial_thread_bos != NULL)
- {
pthread_descr self = thread_self();
return THREAD_GETMEM (self, p_errnop);
- }
- return &_errno;
}
int * __h_errno_location()
{
- /* check, if the library is initilize */
- if (__pthread_initial_thread_bos != NULL)
- {
pthread_descr self = thread_self();
-
return THREAD_GETMEM (self, p_h_errnop);
- }
- return &_h_errno;
}
/* The functions contained here do nothing, they just return. */
+#include "internals.h"
+
void
__linuxthreads_create_event (void)
{
void __fresetlockfiles(void);
void __pthread_manager_adjust_prio(int thread_prio);
void __pthread_set_own_extricate_if(pthread_descr self, pthread_extricate_if *peif);
+void __pthread_initialize_minimal (void);
extern int __pthread_attr_setguardsize __P ((pthread_attr_t *__attr,
size_t __guardsize));
static void pthread_initialize(void) __attribute__((constructor));
+ /* Do some minimal initialization which has to be done during the
+ startup of the C library. */
+void __pthread_initialize_minimal(void)
+{
+ /* If we have special thread_self processing, initialize
+ * that for the main thread now. */
+#ifdef INIT_THREAD_SELF
+ INIT_THREAD_SELF(&__pthread_initial_thread, 0);
+#endif
+}
+
+
static void pthread_initialize(void)
{
struct sigaction sa;