summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/Makefile112
-rw-r--r--libpthread/linuxthreads/ChangeLog1257
-rw-r--r--libpthread/linuxthreads/Changes73
-rw-r--r--libpthread/linuxthreads/FAQ.html1039
-rw-r--r--libpthread/linuxthreads/LICENSE501
-rw-r--r--libpthread/linuxthreads/Makefile59
-rw-r--r--libpthread/linuxthreads/README166
-rw-r--r--libpthread/linuxthreads/README.Xfree3.2352
-rw-r--r--libpthread/linuxthreads/Versions121
-rw-r--r--libpthread/linuxthreads/attr.c214
-rw-r--r--libpthread/linuxthreads/cancel.c171
-rw-r--r--libpthread/linuxthreads/condvar.c417
-rw-r--r--libpthread/linuxthreads/configure5
-rw-r--r--libpthread/linuxthreads/debug.h50
-rw-r--r--libpthread/linuxthreads/errno.c34
-rw-r--r--libpthread/linuxthreads/events.c35
-rw-r--r--libpthread/linuxthreads/internals.h480
-rw-r--r--libpthread/linuxthreads/join.c213
-rw-r--r--libpthread/linuxthreads/linuxthreads.texi1428
-rw-r--r--libpthread/linuxthreads/lockfile.c88
-rw-r--r--libpthread/linuxthreads/manager.c786
-rw-r--r--libpthread/linuxthreads/mutex.c201
-rw-r--r--libpthread/linuxthreads/no-tsd.c33
-rw-r--r--libpthread/linuxthreads/oldsemaphore.c235
-rw-r--r--libpthread/linuxthreads/pt-machine.c22
-rw-r--r--libpthread/linuxthreads/ptfork.c107
-rw-r--r--libpthread/linuxthreads/pthread.c876
-rw-r--r--libpthread/linuxthreads/ptlongjmp.c55
-rw-r--r--libpthread/linuxthreads/queue.h61
-rw-r--r--libpthread/linuxthreads/restart.h27
-rw-r--r--libpthread/linuxthreads/rwlock.c486
-rw-r--r--libpthread/linuxthreads/semaphore.c209
-rw-r--r--libpthread/linuxthreads/semaphore.h80
-rw-r--r--libpthread/linuxthreads/signals.c239
-rw-r--r--libpthread/linuxthreads/specific.c179
-rw-r--r--libpthread/linuxthreads/spinlock.c195
-rw-r--r--libpthread/linuxthreads/spinlock.h102
-rw-r--r--libpthread/linuxthreads/sysdeps/alpha/pt-machine.h108
-rw-r--r--libpthread/linuxthreads/sysdeps/alpha/sigcontextinfo.h25
-rw-r--r--libpthread/linuxthreads/sysdeps/arm/bits/armsigctx.h73
-rw-r--r--libpthread/linuxthreads/sysdeps/arm/pt-machine.h48
-rw-r--r--libpthread/linuxthreads/sysdeps/i386/i686/pt-machine.h67
-rw-r--r--libpthread/linuxthreads/sysdeps/i386/pt-machine.h99
-rw-r--r--libpthread/linuxthreads/sysdeps/i386/sigcontextinfo.h24
-rw-r--r--libpthread/linuxthreads/sysdeps/i386/useldt.h170
-rw-r--r--libpthread/linuxthreads/sysdeps/m68k/pt-machine.h62
-rw-r--r--libpthread/linuxthreads/sysdeps/m68k/sigcontextinfo.h26
-rw-r--r--libpthread/linuxthreads/sysdeps/mips/pt-machine.h90
-rw-r--r--libpthread/linuxthreads/sysdeps/mips/sigcontextinfo.h27
-rw-r--r--libpthread/linuxthreads/sysdeps/powerpc/pt-machine.h69
-rw-r--r--libpthread/linuxthreads/sysdeps/powerpc/sigcontextinfo.h27
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/bits/libc-lock.h214
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/bits/libc-tsd.h44
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/bits/pthreadtypes.h122
-rw-r--r--libpthread/linuxthreads/sysdeps/pthread/bits/stdio-lock.h39
-rw-r--r--libpthread/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h66
-rw-r--r--libpthread/linuxthreads/sysdeps/sparc/sparc32/sigcontextinfo.h29
-rw-r--r--libpthread/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h77
-rw-r--r--libpthread/linuxthreads/sysdeps/sparc/sparc64/sigcontextinfo.h32
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/bits/local_lim.h55
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h110
-rw-r--r--libpthread/linuxthreads/sysdeps/unix/sysv/linux/bits/sigthread.h37
-rw-r--r--libpthread/linuxthreads/testrtsig.h40
-rw-r--r--libpthread/linuxthreads/weaks.c120
-rw-r--r--libpthread/linuxthreads/wrapsyscall.c178
-rw-r--r--libpthread/linuxthreads_db/ChangeLog208
-rw-r--r--libpthread/linuxthreads_db/Makefile68
-rw-r--r--libpthread/linuxthreads_db/Versions15
-rw-r--r--libpthread/linuxthreads_db/proc_service.h70
-rw-r--r--libpthread/linuxthreads_db/td_init.c32
-rw-r--r--libpthread/linuxthreads_db/td_log.c32
-rw-r--r--libpthread/linuxthreads_db/td_ta_clear_event.c53
-rw-r--r--libpthread/linuxthreads_db/td_ta_delete.c58
-rw-r--r--libpthread/linuxthreads_db/td_ta_enable_stats.c35
-rw-r--r--libpthread/linuxthreads_db/td_ta_event_addr.c75
-rw-r--r--libpthread/linuxthreads_db/td_ta_event_getmsg.c128
-rw-r--r--libpthread/linuxthreads_db/td_ta_get_nthreads.c44
-rw-r--r--libpthread/linuxthreads_db/td_ta_get_ph.c36
-rw-r--r--libpthread/linuxthreads_db/td_ta_get_stats.c35
-rw-r--r--libpthread/linuxthreads_db/td_ta_map_id2thr.c63
-rw-r--r--libpthread/linuxthreads_db/td_ta_map_lwp2thr.c81
-rw-r--r--libpthread/linuxthreads_db/td_ta_new.c154
-rw-r--r--libpthread/linuxthreads_db/td_ta_reset_stats.c35
-rw-r--r--libpthread/linuxthreads_db/td_ta_set_event.c53
-rw-r--r--libpthread/linuxthreads_db/td_ta_setconcurrency.c35
-rw-r--r--libpthread/linuxthreads_db/td_ta_thr_iter.c143
-rw-r--r--libpthread/linuxthreads_db/td_ta_tsd_iter.c56
-rw-r--r--libpthread/linuxthreads_db/td_thr_clear_event.c57
-rw-r--r--libpthread/linuxthreads_db/td_thr_dbresume.c30
-rw-r--r--libpthread/linuxthreads_db/td_thr_dbsuspend.c30
-rw-r--r--libpthread/linuxthreads_db/td_thr_event_enable.c41
-rw-r--r--libpthread/linuxthreads_db/td_thr_event_getmsg.c60
-rw-r--r--libpthread/linuxthreads_db/td_thr_get_info.c75
-rw-r--r--libpthread/linuxthreads_db/td_thr_getfpregs.c44
-rw-r--r--libpthread/linuxthreads_db/td_thr_getgregs.c44
-rw-r--r--libpthread/linuxthreads_db/td_thr_getxregs.c30
-rw-r--r--libpthread/linuxthreads_db/td_thr_getxregsize.c30
-rw-r--r--libpthread/linuxthreads_db/td_thr_set_event.c57
-rw-r--r--libpthread/linuxthreads_db/td_thr_setfpregs.c42
-rw-r--r--libpthread/linuxthreads_db/td_thr_setgregs.c42
-rw-r--r--libpthread/linuxthreads_db/td_thr_setprio.c30
-rw-r--r--libpthread/linuxthreads_db/td_thr_setsigpending.c31
-rw-r--r--libpthread/linuxthreads_db/td_thr_setxregs.c30
-rw-r--r--libpthread/linuxthreads_db/td_thr_sigsetmask.c30
-rw-r--r--libpthread/linuxthreads_db/td_thr_tsd.c76
-rw-r--r--libpthread/linuxthreads_db/td_thr_validate.c51
-rw-r--r--libpthread/linuxthreads_db/thread_db.h436
-rw-r--r--libpthread/linuxthreads_db/thread_dbP.h83
-rw-r--r--libpthread/pthread.c2
109 files changed, 15617 insertions, 29 deletions
diff --git a/libpthread/Makefile b/libpthread/Makefile
index 66414ecbc..4dad83985 100644
--- a/libpthread/Makefile
+++ b/libpthread/Makefile
@@ -1,7 +1,6 @@
-# Makefile for uClibc
+# Makefile for uClibc's pthread library
#
-# Copyright (C) 2000 by by Lineo, inc. and Erik Andersen
-# Copyright (C) 2000, 2001 by Erik Andersen <andersee@debian.org>
+# Copyright (C) 2002 Erik Andersen <andersen@uclibc.org>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Library General Public License as published by the Free
@@ -16,30 +15,49 @@
# You should have received a copy of the GNU Library General Public License
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Derived in part from the Linux-8086 C library, the GNU C Library, and several
-# other sundry sources. Files within this library are copyright by their
-# respective copyright holders.
TOPDIR=../
include $(TOPDIR)Rules.mak
+#Adjust the soname version to avoid namespace collisions with glibc's libpthread
+PT_VERSION=$(MAJOR_VERSION).$(MINOR_VERSION)
+
LIBPTHREAD=libpthread.a
LIBPTHREAD_SHARED=libpthread.so
-LIBPTHREAD_SHARED_FULLNAME=libpthread-$(MAJOR_VERSION).$(MINOR_VERSION).so
+LIBPTHREAD_SHARED_FULLNAME=libpthread-$(PT_VERSION).so
+
+LIBTHREAD_DB=libthread_db.a
+LIBTHREAD_DB_SHARED=libthread_db.so
+LIBTHREAD_DB_SHARED_FULLNAME=libthread_db-$(PT_VERSION).so
-CSRC = pthread.c
-OBJS=$(patsubst %.c,%.o, $(CSRC))
+DIRS=
+ifeq ($(strip $(INCLUDE_THREADS)),true)
+ DIRS+=linuxthreads
+ifeq ($(strip $(DODEBUG)),true)
+ DIRS+=linuxthreads_db
+endif
+endif
-all: $(OBJS) $(LIBPTHREAD)
+ALL_SUBDIRS = linuxthreads linuxthreads_db
-$(LIBPTHREAD): ar-target
+all: $(LIBPTHREAD) $(LIBTHREAD_DB)
+
+$(LIBPTHREAD): subdirs
+ @if [ -f $(LIBPTHREAD) ] ; then \
+ set -e; \
+ install -d $(TOPDIR)lib; \
+ rm -f $(TOPDIR)lib/$(LIBPTHREAD); \
+ install -m 644 $(LIBPTHREAD) $(TOPDIR)lib; \
+ fi;
+
+$(LIBTHREAD_DB): subdirs
+ @if [ -f $(LIBTHREAD_DB) ] ; then \
+ set -e; \
+ install -d $(TOPDIR)lib; \
+ rm -f $(TOPDIR)lib/$(LIBTHREAD_DB); \
+ install -m 644 $(LIBTHREAD_DB) $(TOPDIR)lib; \
+ fi;
-ar-target: $(OBJS)
- $(AR) $(ARFLAGS) $(LIBPTHREAD) $(OBJS)
- install -d $(TOPDIR)lib
- rm -f $(TOPDIR)lib/$(LIBPTHREAD)
- install -m 644 $(LIBPTHREAD) $(TOPDIR)lib
$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -c $< -o $@
@@ -48,15 +66,53 @@ $(OBJS): %.o : %.c
$(OBJ): Makefile
shared: all
- $(LD) $(LDFLAGS) -soname=$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) \
- -o $(LIBPTHREAD_SHARED_FULLNAME) --whole-archive $(LIBPTHREAD) \
- --no-whole-archive -L$(TOPDIR)/lib -lc;
- install -d $(TOPDIR)lib
- rm -f $(TOPDIR)lib/$(LIBPTHREAD_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBPTHREAD_SHARED).$(MAJOR_VERSION)
- install -m 644 $(LIBPTHREAD_SHARED_FULLNAME) $(TOPDIR)lib;
- (cd $(TOPDIR)lib && ln -sf $(LIBPTHREAD_SHARED_FULLNAME) $(LIBPTHREAD_SHARED));
- (cd $(TOPDIR)lib && ln -sf $(LIBPTHREAD_SHARED_FULLNAME) $(LIBPTHREAD_SHARED).$(MAJOR_VERSION));
-
-clean:
- rm -f *.[oa] *~ core $(LIBPTHREAD_SHARED)* $(LIBPTHREAD_SHARED_FULLNAME)*
+ if [ -f $(LIBPTHREAD) ] ; then \
+ set -e; \
+ $(LD) $(LDFLAGS) -soname=$(LIBPTHREAD_SHARED).$(PT_VERSION) \
+ -o $(LIBPTHREAD_SHARED_FULLNAME) --whole-archive $(LIBPTHREAD) \
+ --no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
+ -L$(TOPDIR)/lib -lc; \
+ install -d $(TOPDIR)lib; \
+ rm -f $(TOPDIR)lib/$(LIBPTHREAD_SHARED_FULLNAME) \
+ $(TOPDIR)lib/$(LIBPTHREAD_SHARED).$(PT_VERSION); \
+ install -m 644 $(LIBPTHREAD_SHARED_FULLNAME) $(TOPDIR)lib; \
+ (cd $(TOPDIR)lib && ln -sf $(LIBPTHREAD_SHARED_FULLNAME) \
+ $(LIBPTHREAD_SHARED)); \
+ (cd $(TOPDIR)lib && ln -sf $(LIBPTHREAD_SHARED_FULLNAME) \
+ $(LIBPTHREAD_SHARED).$(PT_VERSION)); \
+ fi;
+ if [ -f $(LIBTHREAD_DB) ] ; then \
+ set -e; \
+ $(LD) $(LDFLAGS) -soname=$(LIBTHREAD_DB_SHARED).$(PT_VERSION) \
+ -o $(LIBTHREAD_DB_SHARED_FULLNAME) --whole-archive $(LIBTHREAD_DB) \
+ --no-whole-archive $(TOPDIR)/libc/misc/internals/interp.o \
+ -L$(TOPDIR)/lib -lc; \
+ install -d $(TOPDIR)lib; \
+ rm -f $(TOPDIR)lib/$(LIBTHREAD_DB_SHARED_FULLNAME) \
+ $(TOPDIR)lib/$(LIBTHREAD_DB_SHARED).$(PT_VERSION); \
+ install -m 644 $(LIBTHREAD_DB_SHARED_FULLNAME) $(TOPDIR)lib; \
+ (cd $(TOPDIR)lib && ln -sf $(LIBTHREAD_DB_SHARED_FULLNAME) \
+ $(LIBTHREAD_DB_SHARED)); \
+ (cd $(TOPDIR)lib && ln -sf $(LIBTHREAD_DB_SHARED_FULLNAME) \
+ $(LIBTHREAD_DB_SHARED).$(PT_VERSION)); \
+ fi;
+
+tags:
+ ctags -R
+
+subdirs: $(patsubst %, _dir_%, $(DIRS))
+subdirs_clean: $(patsubst %, _dirclean_%, $(ALL_SUBDIRS))
+
+$(patsubst %, _dir_%, $(DIRS)) : dummy
+ $(MAKE) -C $(patsubst _dir_%, %, $@)
+
+$(patsubst %, _dirclean_%, $(ALL_SUBDIRS)) : dummy
+ $(MAKE) -C $(patsubst _dirclean_%, %, $@) clean
+
+clean: subdirs_clean
+ rm -f *.[oa] *~ core $(LIBPTHREAD) $(LIBPTHREAD_SHARED_FULLNAME) \
+ $(LIBTHREAD_DB) $(LIBTHREAD_DB_SHARED_FULLNAME)
+
+.PHONY: dummy
+
diff --git a/libpthread/linuxthreads/ChangeLog b/libpthread/linuxthreads/ChangeLog
new file mode 100644
index 000000000..0025b87c0
--- /dev/null
+++ b/libpthread/linuxthreads/ChangeLog
@@ -0,0 +1,1257 @@
+2000-02-22 Ulrich Drepper <drepper@redhat.com>
+
+ * semaphore.h (SEM_FAILED): Use 0 not NULL.
+
+2000-02-14 Ulrich Drepper <drepper@redhat.com>
+
+ * condvar.c (pthread_cond_timedwait_relative_old): Tight loop with
+ nanosl