head	1.65;
access;
symbols
	RELENG_6_4_0_RELEASE:1.53.2.2.6.1
	RELENG_6_4:1.53.2.2.0.6
	RELENG_6_4_BP:1.53.2.2
	RELENG_6_3_0_RELEASE:1.53.2.2
	RELENG_6_3:1.53.2.2.0.4
	RELENG_6_3_BP:1.53.2.2
	RELENG_6_2_0_RELEASE:1.53.2.2
	RELENG_6_2:1.53.2.2.0.2
	RELENG_6_2_BP:1.53.2.2
	RELENG_5_5_0_RELEASE:1.52.2.1
	RELENG_5_5:1.52.2.1.0.4
	RELENG_5_5_BP:1.52.2.1
	RELENG_6_1_0_RELEASE:1.53.2.1
	RELENG_6_1:1.53.2.1.0.4
	RELENG_6_1_BP:1.53.2.1
	RELENG_6_0_0_RELEASE:1.53.2.1
	RELENG_6_0:1.53.2.1.0.2
	RELENG_6_0_BP:1.53.2.1
	RELENG_6:1.53.0.2
	RELENG_6_BP:1.53
	RELENG_5_4_0_RELEASE:1.52.2.1
	RELENG_5_4:1.52.2.1.0.2
	RELENG_5_4_BP:1.52.2.1
	RELENG_5_3_0_RELEASE:1.52
	RELENG_5_3:1.52.0.4
	RELENG_5_3_BP:1.52
	RELENG_5:1.52.0.2
	RELENG_5_BP:1.52
	RELENG_5_2_1_RELEASE:1.49
	RELENG_5_2_0_RELEASE:1.49
	RELENG_5_2:1.49.0.2
	RELENG_5_2_BP:1.49
	RELENG_5_1_0_RELEASE:1.42
	RELENG_5_1:1.42.0.2
	RELENG_5_1_BP:1.42
	RELENG_5_0_0_RELEASE:1.35
	RELENG_5_0:1.35.0.2
	RELENG_5_0_BP:1.35
	old_RELENG_4_6_2_RELEASE:1.24.2.5
	old_RELENG_4_6_1_RELEASE:1.24.2.5
	old_RELENG_4_6_0_RELEASE:1.24.2.5
	old_RELENG_4_6:1.24.2.5.0.4
	old_RELENG_4_6_BP:1.24.2.5
	old_RELENG_4_5_0_RELEASE:1.24.2.5
	old_RELENG_4_5:1.24.2.5.0.2
	old_RELENG_4_5_BP:1.24.2.5
	old_RELENG_4_4_0_RELEASE:1.24.2.3
	old_RELENG_4_4:1.24.2.3.0.4
	old_RELENG_4_4_BP:1.24.2.3
	old_RELENG_4_3_0_RELEASE:1.24.2.3
	old_RELENG_4_3:1.24.2.3.0.2
	old_RELENG_4_3_BP:1.24.2.3
	old_RELENG_4_2_0_RELEASE:1.24.2.3
	old_RELENG_4_1_1_RELEASE:1.24.2.2
	old_PRE_SMPNG:1.27
	old_RELENG_4_1_0_RELEASE:1.24.2.1
	old_RELENG_3_5_0_RELEASE:1.14.2.6
	old_RELENG_4_0_0_RELEASE:1.24
	old_RELENG_4:1.24.0.2
	old_RELENG_4_BP:1.24
	old_RELENG_3_4_0_RELEASE:1.14.2.2
	old_RELENG_3_3_0_RELEASE:1.14.2.2
	old_RELENG_3_2_PAO:1.14.0.4
	old_RELENG_3_2_PAO_BP:1.14
	old_RELENG_3_2_0_RELEASE:1.14
	old_RELENG_3_1_0_RELEASE:1.14
	old_RELENG_3:1.14.0.2
	old_RELENG_3_BP:1.14
	old_RELENG_2_2_8_RELEASE:1.4.2.2
	old_RELENG_3_0_0_RELEASE:1.13
	old_RELENG_2_2_7_RELEASE:1.4.2.1
	old_RELENG_2_2_6_RELEASE:1.4.2.1
	old_RELENG_2_2_5_RELEASE:1.4.2.1
	old_RELENG_2_2_2_RELEASE:1.4
	old_RELENG_2_2_1_RELEASE:1.4
	old_RELENG_2_2_0_RELEASE:1.4
	old_RELENG_2_2:1.4.0.2
	old_RELENG_2_2_BP:1.4;
locks; strict;
comment	@# @;


1.65
date	2007.10.09.13.42.34;	author obrien;	state dead;
branches;
next	1.64;

1.64
date	2007.10.01.18.22.31;	author ru;	state Exp;
branches;
next	1.63;

1.63
date	2007.05.21.02.49.06;	author deischen;	state Exp;
branches;
next	1.62;

1.62
date	2007.05.18.12.25.48;	author ru;	state Exp;
branches;
next	1.61;

1.61
date	2007.05.17.04.54.35;	author deischen;	state Exp;
branches;
next	1.60;

1.60
date	2007.05.13.14.12.39;	author deischen;	state Exp;
branches;
next	1.59;

1.59
date	2006.08.22.07.51.07;	author ru;	state Exp;
branches;
next	1.58;

1.58
date	2006.04.12.19.42.20;	author ru;	state Exp;
branches;
next	1.57;

1.57
date	2006.03.29.05.38.19;	author des;	state Exp;
branches;
next	1.56;

1.56
date	2006.03.16.15.17.47;	author deischen;	state Exp;
branches;
next	1.55;

1.55
date	2006.03.13.00.59.50;	author deischen;	state Exp;
branches;
next	1.54;

1.54
date	2005.07.22.17.19.03;	author kensmith;	state Exp;
branches;
next	1.53;

1.53
date	2004.10.24.15.32.32;	author ru;	state Exp;
branches
	1.53.2.1;
next	1.52;

1.52
date	2004.08.16.03.27.28;	author davidxu;	state Exp;
branches
	1.52.2.1;
next	1.51;

1.51
date	2004.01.31.05.05.45;	author marcel;	state Exp;
branches;
next	1.50;

1.50
date	2004.01.30.12.13.17;	author deischen;	state Exp;
branches;
next	1.49;

1.49
date	2003.09.27.23.27.19;	author marcel;	state Exp;
branches;
next	1.48;

1.48
date	2003.09.02.19.37.11;	author kan;	state Exp;
branches;
next	1.47;

1.47
date	2003.07.17.23.02.29;	author davidxu;	state Exp;
branches;
next	1.46;

1.46
date	2003.07.02.20.51.30;	author ru;	state Exp;
branches;
next	1.45;

1.45
date	2003.07.01.15.37.35;	author ru;	state Exp;
branches;
next	1.44;

1.44
date	2003.07.01.15.07.01;	author ru;	state Exp;
branches;
next	1.43;

1.43
date	2003.06.23.04.28.30;	author marcel;	state Exp;
branches;
next	1.42;

1.42
date	2003.05.30.00.21.51;	author kan;	state Exp;
branches;
next	1.41;

1.41
date	2003.04.25.01.31.56;	author deischen;	state Exp;
branches;
next	1.40;

1.40
date	2003.04.23.21.48.29;	author deischen;	state Exp;
branches;
next	1.39;

1.39
date	2003.04.21.04.02.56;	author deischen;	state Exp;
branches;
next	1.38;

1.38
date	2003.04.18.07.09.42;	author deischen;	state Exp;
branches;
next	1.37;

1.37
date	2003.04.18.05.06.56;	author deischen;	state Exp;
branches;
next	1.36;

1.36
date	2003.04.18.05.04.15;	author deischen;	state Exp;
branches;
next	1.35;

1.35
date	2002.12.08.22.43.31;	author deischen;	state Exp;
branches;
next	1.34;

1.34
date	2002.09.28.00.25.31;	author peter;	state Exp;
branches;
next	1.33;

1.33
date	2002.09.16.19.29.18;	author mini;	state Exp;
branches;
next	1.32;

1.32
date	2002.09.16.08.45.29;	author mini;	state Exp;
branches;
next	1.31;

1.31
date	2002.04.15.20.22.28;	author obrien;	state Exp;
branches;
next	1.30;

1.30
date	2001.01.24.13.03.22;	author deischen;	state Exp;
branches;
next	1.29;

1.29
date	2000.11.14.02.46.23;	author obrien;	state Exp;
branches;
next	1.28;

1.28
date	2000.10.13.22.19.50;	author deischen;	state Exp;
branches;
next	1.27;

1.27
date	2000.08.07.16.51.55;	author jlemon;	state Exp;
branches;
next	1.26;

1.26
date	2000.07.05.16.21.42;	author jasone;	state Exp;
branches;
next	1.25;

1.25
date	2000.04.27.00.59.42;	author jasone;	state Exp;
branches;
next	1.24;

1.24
date	2000.01.27.23.06.56;	author jasone;	state Exp;
branches
	1.24.2.1;
next	1.23;

1.23
date	99.12.18.01.00.41;	author jasone;	state Exp;
branches;
next	1.22;

1.22
date	99.11.28.05.38.00;	author alfred;	state Exp;
branches;
next	1.21;

1.21
date	99.10.14.10.08.53;	author marcel;	state Exp;
branches;
next	1.20;

1.20
date	99.09.30.15.07.43;	author marcel;	state Exp;
branches;
next	1.19;

1.19
date	99.08.28.00.02.59;	author peter;	state Exp;
branches;
next	1.18;

1.18
date	99.07.06.00.25.31;	author jasone;	state Exp;
branches;
next	1.17;

1.17
date	99.07.05.00.38.12;	author jasone;	state Exp;
branches;
next	1.16;

1.16
date	99.07.05.00.35.14;	author jasone;	state Exp;
branches;
next	1.15;

1.15
date	99.06.20.08.32.37;	author jb;	state Exp;
branches;
next	1.14;

1.14
date	98.12.10.20.27.52;	author jb;	state Exp;
branches
	1.14.2.1;
next	1.13;

1.13
date	98.06.14.11.25.44;	author peter;	state Exp;
branches;
next	1.12;

1.12
date	98.06.12.02.21.27;	author jb;	state Exp;
branches;
next	1.11;

1.11
date	98.06.09.23.25.13;	author jb;	state Exp;
branches;
next	1.10;

1.10
date	98.06.01.02.12.15;	author jb;	state Exp;
branches;
next	1.9;

1.9
date	98.05.31.23.53.50;	author jb;	state Exp;
branches;
next	1.8;

1.8
date	98.03.28.11.49.02;	author dufault;	state Exp;
branches;
next	1.7;

1.7
date	98.03.09.05.09.43;	author jb;	state Exp;
branches;
next	1.6;

1.6
date	97.05.03.03.57.21;	author jb;	state Exp;
branches;
next	1.5;

1.5
date	97.02.05.23.24.38;	author julian;	state Exp;
branches;
next	1.4;

1.4
date	96.08.30.01.43.15;	author peter;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	96.08.20.08.20.35;	author julian;	state Exp;
branches;
next	1.2;

1.2
date	96.05.05.08.22.17;	author peter;	state Exp;
branches;
next	1.1;

1.1
date	96.01.22.00.21.56;	author julian;	state Exp;
branches;
next	;

1.53.2.1
date	2005.07.22.17.29.07;	author kensmith;	state Exp;
branches;
next	1.53.2.2;

1.53.2.2
date	2006.09.29.07.04.17;	author matteo;	state Exp;
branches
	1.53.2.2.6.1;
next	1.53.2.3;

1.53.2.3
date	2012.11.17.07.40.30;	author svnexp;	state Exp;
branches;
next	;

1.53.2.2.6.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.52.2.1
date	2005.02.13.07.23.13;	author obrien;	state Exp;
branches;
next	;

1.24.2.1
date	2000.07.18.01.57.20;	author jasone;	state Exp;
branches;
next	1.24.2.2;

1.24.2.2
date	2000.08.23.02.48.47;	author jhb;	state Exp;
branches;
next	1.24.2.3;

1.24.2.3
date	2000.11.09.23.45.57;	author deischen;	state Exp;
branches;
next	1.24.2.4;

1.24.2.4
date	2001.10.19.17.56.34;	author ru;	state Exp;
branches;
next	1.24.2.5;

1.24.2.5
date	2001.10.19.18.23.34;	author ru;	state Exp;
branches;
next	;

1.14.2.1
date	99.07.23.13.07.12;	author deischen;	state Exp;
branches;
next	1.14.2.2;

1.14.2.2
date	99.08.29.14.55.21;	author peter;	state Exp;
branches;
next	1.14.2.3;

1.14.2.3
date	2000.01.04.10.28.37;	author tg;	state Exp;
branches;
next	1.14.2.4;

1.14.2.4
date	2000.01.04.10.42.13;	author tg;	state Exp;
branches;
next	1.14.2.5;

1.14.2.5
date	2000.01.04.11.02.44;	author tg;	state Exp;
branches;
next	1.14.2.6;

1.14.2.6
date	2000.01.10.10.03.03;	author tg;	state Exp;
branches;
next	;

1.4.2.1
date	97.06.23.23.49.27;	author julian;	state Exp;
branches;
next	1.4.2.2;

1.4.2.2
date	98.11.04.08.42.05;	author tg;	state Exp;
branches;
next	1.4.2.3;

1.4.2.3
date	99.09.05.11.16.51;	author peter;	state Exp;
branches;
next	;


desc
@@


1.65
log
@Repo copy libpthreads to libkse.
This introduces the WITHOUT_LIBKSE nob,
and changes WITHOUT_LIBPTHREADS to mean with neither threading libs.
Approved by:	re(kensmith)
@
text
@# $FreeBSD: src/lib/libpthread/Makefile,v 1.64 2007/10/01 18:22:31 ru Exp $
#
# All library objects contain FreeBSD revision strings by default; they may be
# excluded as a space-saving measure.  To produce a library that does
# not contain these strings, add -DSTRIP_FBSDID (see <sys/cdefs.h>) to CFLAGS
# below.  Note, there are no IDs for syscall stubs whose sources are generated.
# To included legacy CSRG sccsid strings, add -DLIBC_SCCS and -DSYSLIBC_SCCS
# (for system call stubs) to CFLAGS below.  -DSYSLIBC_SCCS affects just the
# system call stubs.

.include <bsd.own.mk>

.if (${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no") && \
    ${SHLIBDIR} == "/usr/lib"
SHLIBDIR= /lib
.endif

LIB=kse
SHLIB_MAJOR= 3
CFLAGS+=-DPTHREAD_KERNEL
CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/thread \
	-I${.CURDIR}/../../include
CFLAGS+=-I${.CURDIR}/arch/${MACHINE_ARCH}/include
CFLAGS+=-I${.CURDIR}/sys
CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf
CFLAGS+=-I${.CURDIR}/../../libexec/rtld-elf/${MACHINE_ARCH}
CFLAGS+=-fno-builtin

# Uncomment this if you want libpthread to contain debug information for
# thread locking.
CFLAGS+=-D_LOCK_DEBUG
WARNS?=2

# Uncomment this if you want to build a 1:1 threading mode library
# however it is no longer strictly conformed to POSIX
# CFLAGS+=-DSYSTEM_SCOPE_ONLY

# Enable extra internal consistancy checks.
CFLAGS+=-D_PTHREADS_INVARIANTS -Wall

VERSION_MAP=${.CURDIR}/pthread.map

PRECIOUSLIB=

.include "${.CURDIR}/arch/${MACHINE_ARCH}/Makefile.inc"
.include "${.CURDIR}/support/Makefile.inc"
.include "${.CURDIR}/sys/Makefile.inc"
.include "${.CURDIR}/thread/Makefile.inc"

.if ${DEFAULT_THREAD_LIB} == "libpthread" || ${MK_LIBTHR} == "no"
SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a
.if !defined(NO_PIC)
SYMLINKS+=lib${LIB}.so ${LIBDIR}/libpthread.so
.endif
.if ${MK_PROFILE} != "no"
SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libpthread_p.a
.endif
.endif

.include <bsd.lib.mk>
@


1.64
log
@Always install libpthread.* symlinks if at least one of
the threading libraries is built.  This simplifies the
logic in makefiles that need to check if the pthreads
support is present.  It also fixes a bug where we would
build a threading library that we shouldn't have built:
for example, building with WITHOUT_LIBTHR and the default
value of DEFAULT_THREADING_LIB (libthr) would mistakenly
build the libthr library, but not install it.

Approved by:	re (kensmith)
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.63
log
@Bump library versions in preparation for 7.0.

Ok'd by:	kan
@
text
@d13 2
a14 1
.if ${DEFAULT_THREAD_LIB} == "libpthread" && ${SHLIBDIR} == "/usr/lib"
d50 1
a50 1
.if ${DEFAULT_THREAD_LIB} == "libpthread"
@


1.62
log
@Fix a logic bug I re-introduced in my patch I sent to Daniel
that would cause the selected shared threading library to be
overwritten with its 32-bit version on amd64.

PR:		amd64/112509
@
text
@d18 1
a18 1
SHLIB_MAJOR= 2
@


1.61
log
@Allow DEFAULT_THREAD_LIB to be set from /etc/src.conf.

Submitted by:	ru
@
text
@d13 1
a13 1
.if ${DEFAULT_THREAD_LIB} == "libpthread"
@


1.60
log
@Enable symbol versioning by default.  Use WITHOUT_SYMVER to disable it.
Warning, after symbol versioning is enabled, going back is not easy
(use WITHOUT_SYMVER at your own risk).

Change the default thread library to libthr.

There most likely still needs to be a version bump for at least the
thread libraries.  If necessary, this will happen later.
@
text
@d11 4
a14 2
.if defined(DEFAULT_THREAD_LIB) && (${DEFAULT_THREAD_LIB} == "libpthread")
SHLIBDIR?= /lib
a16 2
.include <bsd.own.mk>

@


1.59
log
@Remove alpha left-overs.
@
text
@d10 2
a11 4
.if ${MACHINE_ARCH} == "sparc64"
LIB=kse
.else
LIB=pthread
d14 4
a41 7
.if defined(SYMVER_ENABLED)
# Remove this if library version is bumped and LIBPTHREAD_1_0
# compatability hacks are removed (see thread/thr_private.h).
LDFLAGS+=-Wl,-zmuldefs
CFLAGS+=-DSYMBOL_VERSIONING
.endif

d49 10
@


1.58
log
@Install shared libpthread library into /lib; needed by some
/sbin programs.
@
text
@d10 1
a10 1
.if ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH} == "sparc64"
@


1.57
log
@Bring libpthread up to WARNS level 2.

Reviewed by:	deischen
@
text
@d14 1
@


1.56
log
@Suuply the name of the version map and let bsd.lib.mk supply
the link arguments.
@
text
@d28 1
a28 1
#CFLAGS+= -g
@


1.55
log
@Add compatibility symbol maps.  libpthread (.so.1 and .so.2)
used LIBTHREAD_1_0 as its version definition, but now needs
to define its symbols in the same namespace used by libc.
The compatibility hooks allows you to use libraries and
binaries built and linked to libpthread before libc was
built with symbol versioning.  The shims can be removed if
libpthread is given a version bump.

Reviewed by:	davidxu
@
text
@d34 4
a37 1
LDFLAGS= -Wl,--version-script=${.CURDIR}/pthread.map -Wl,-zmuldefs
a38 2
# enable extra internal consistancy checks
CFLAGS+=-D_PTHREADS_INVARIANTS -Wall
d40 3
@


1.54
log
@Bump the shared library version number of all libraries that have not
been bumped since RELENG_5.

Reviewed by:	ru
Approved by:	re (not needed for commit check but in principle...)
@
text
@d34 1
a34 1
LDFLAGS= -Wl,--version-script=${.CURDIR}/pthread.map
d38 3
@


1.53
log
@For variables that are only checked with defined(), don't provide
any fake value.
@
text
@d15 1
a15 1
SHLIB_MAJOR= 1
@


1.53.2.1
log
@Insta-MFC of the shared library version bump.  All shared libraries
whose version has not already been bumped since RELENG_5 are being
bumped.

Revisions of files being MFC-ed:

> Path						Revision
> src/gnu/lib/libdialog/Makefile		1.43
> src/gnu/lib/libg2c/Makefile			1.16
> src/gnu/lib/libobjc/Makefile			1.27
> src/gnu/lib/libreadline/Makefile.inc		1.12
> src/gnu/lib/libregex/Makefile			1.32
> src/gnu/lib/libstdc++/Makefile		1.56
> src/kerberos5/lib/Makefile.inc		1.7
> src/lib/Makefile.inc				1.3
> src/lib/libalias/Makefile			1.31
> src/lib/libarchive/Makefile			1.37
> src/lib/libbegemot/Makefile			1.3
> src/lib/libbluetooth/Makefile			1.2
> src/lib/libbsnmp/Makefile.inc			1.6
> src/lib/libbz2/Makefile			1.6
> src/lib/libc_r/Makefile			1.42
> src/lib/libcrypt/Makefile			1.36
> src/lib/libdevstat/Makefile			1.15
> src/lib/libdevstat/devstat.h			1.11
> src/lib/libedit/Makefile			1.29
> src/lib/libexpat/Makefile			1.5
> src/lib/libfetch/Makefile			1.45
> src/lib/libftpio/Makefile			1.14
> src/lib/libgpib/Makefile			1.2
> src/lib/libipsec/Makefile			1.17
> src/lib/libkiconv/Makefile			1.3
> src/lib/libmagic/Makefile			1.7
> src/lib/libmp/Makefile			1.10
> src/lib/libncp/Makefile			1.6
> src/lib/libncurses/Makefile			1.79
> src/lib/libnetgraph/Makefile			1.11
> src/lib/libngatm/Makefile			1.6
> src/lib/libopie/Makefile			1.21
> src/lib/libpam/Makefile.inc			1.17
> src/lib/libpthread/Makefile			1.54
> src/lib/libradius/Makefile			1.12
> src/lib/libsdp/Makefile			1.4
> src/lib/libsmb/Makefile			1.8
> src/lib/libtacplus/Makefile			1.7
> src/lib/libthr/Makefile			1.14
> src/lib/libthread_db/Makefile			1.6
> src/lib/libugidfw/Makefile			1.7
> src/lib/libusbhid/Makefile			1.10
> src/lib/libutil/Makefile			1.57
> src/lib/libvgl/Makefile			1.11
> src/lib/libwrap/Makefile			1.17
> src/lib/libypclnt/Makefile			1.13
> src/lib/msun/Makefile				1.72
> src/secure/lib/libcrypto/Makefile		1.74
> src/secure/lib/libssh/Makefile		1.35
> src/secure/lib/libssl/Makefile		1.22
> src/usr.sbin/bsnmpd/modules/Makefile.inc	1.10

Reviewed by:	ru
Approved by:	re (scottl)
@
text
@d15 1
a15 1
SHLIB_MAJOR= 2
@


1.53.2.2
log
@MFC rev. 1.58:
Install shared libpthread library into /lib; needed by some
/sbin programs.

PR:		bin/88404
Reviewed by:	ru@@
Approved by:	re@@ (kensmith@@)
@
text
@a13 1
SHLIBDIR?= /lib
@


1.53.2.3
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/6/lib/libpthread/Makefile 162770 2006-09-29 07:04:17Z matteo $
@


1.53.2.2.6.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.52
log
@1. Add macro DTV_OFFSET to calculate dtv offset in tcb.
2. Export symbols needed by debugger.
@
text
@d39 1
a39 1
PRECIOUSLIB=	yes
@


1.52.2.1
log
@MFC: For variables that are only checked with defined(), don't provide
     any fake value.
@
text
@d39 1
a39 1
PRECIOUSLIB=
@


1.51
log
@Now that libpthread is the default threading library, remove the
compatibility link from libc_r to libpthread (previously a link
from libc_r to libkse).
@
text
@d22 1
@


1.50
log
@Change libkse back to libpthread and make it the default
thread library for i386, amd64, and ia64.  For alpha
and sparc64 the library is not changed and remains libkse,
and links are installed so that libpthread -> libc_r.

The gcc -pthread option will be changed in a separate
commit so that it links to -lpthread instead of -lc_r.

Approved by:	re@@
@
text
@a44 12
.if !defined(NOLIBC_R)
.if ${MACHINE_ARCH} == "ia64"
SYMLINKS+=lib${LIB}.a ${LIBDIR}/libc_r.a
.if !defined(NOPIC)
SYMLINKS+=lib${LIB}.so ${SHLIBDIR}/libc_r.so
.endif
.if !defined(NOPROFILE)
SYMLINKS+=lib${LIB}_p.a ${LIBDIR}/libc_r_p.a
.endif
.endif
.endif

@


1.49
log
@Relink libc_r.a, libc_r.so and libc_r_p.so from libthr to libkse.
On ia64, where there's no libc_r at all, libkse is now the default
thread library by virtue of these links.

The reasons for this change are:
1. libkse is slated to become the default thread library anyway,
2. active development and maintenance is only present for libkse,
3. GNOME and KDE, both in the process of being supported on ia64,
   work better with KSE; even on ia64.
@
text
@d10 1
d12 3
@


1.48
log
@Rethink the way thr_libc.So is generated. Relying on GCC to extract
only needed symbols from libc_pic is not working on sparc64.

Requested by: jake
@
text
@d41 12
@


1.47
log
@o Eliminate upcall for PTHREAD_SYSTEM_SCOPE thread, now it
  is system bound thread and when it is blocked, no upcall is generated.

o Add ability to libkse to allow it run in pure 1:1 threading mode,
  defining SYSTEM_SCOPE_ONLY in Makefile can turn on this option.

o Eliminate code for installing dummy signal handler for sigwait call.

o Add hash table to find thread.

Reviewed by: deischen
@
text
@a41 6

# Can't put thr_support.c in SRCS but want it in .depend.
${DEPENDFILE}: thr_support.c

# LIBC_PIC is defined only after <bsd.lib.mk> is included.
thr_libc.So: ${LIBC_PIC}
@


1.46
log
@Take thr_support.c out of SRCS so that it does not end up in libraries.
Record the missing dependency of thr_libc.So on the libc_pic.a library.

OK'ed by:	kan
@
text
@d25 4
@


1.45
log
@Unbreak "make checkdpadd".
@
text
@d38 6
@


1.44
log
@Axe AINC.

Submitted by:	bde
@
text
@d25 1
a25 1
LDADD+= -Wl,--version-script=${.CURDIR}/pthread.map
@


1.43
log
@Move the machine specific files from sys/Makefile.inc and put them
in a machine specific makefile. While here, sort the sub-directories
in Makefile and remove _atomic_lock.S from all makefiles.
@
text
@a29 1
AINC=	-I${.CURDIR}/../libc/${MACHINE_ARCH} -I${.CURDIR}/thread
@


1.42
log
@Attempt to eliminate PLT relocations from rwlock aquire/release
path, making them suitable for direct use by the dynamic loader.

Register libpthread-specific locking API with rtld on startup.

This still has some rough edges with signals which should be
addresses later.

Approved by:	re (scottl)
@
text
@d33 3
a36 2
.include "${.CURDIR}/sys/Makefile.inc"
.include "${.CURDIR}/support/Makefile.inc"
@


1.41
log
@Remove the %gs restoring hack (already commented out).
Don't install man pages.

Temporarily (again) rename the library to libkse.  It will be put back
to libpthread after more wide-spread testing.
@
text
@d17 2
d25 2
d35 1
@


1.40
log
@Remove the i386-specific hack (well, we only run on i386 anyways)
to always set %gs when resuming a thread.

Install this library as libpthread instead of libkse.
@
text
@d10 1
a10 1
LIB=pthread
a22 4
#.if ${MACHINE_ARCH} == "i386"
#CFLAGS+=-DGS_HACK
#.endif

a28 1
#.include "${.CURDIR}/man/Makefile.inc"
@


1.39
log
@Add an i386-specifc hack to always set %gs.  There still seems
to be instances where the kernel doesn't  properly save and/or
restore it.

Use noupcall and nocompleted flags in the KSE mailbox.  These
require kernel changes to work which will be committed sometime
later.  Things still work without the changes.

Remove the general kse entry function and use two different
functions -- one for scope system threads and one for scope
process threads.  The scope system function is not yet enabled
and we use the same function for all threads at the moment.

Keep a copy of the KSE stack for the case that a KSE runs
a scope system thread and uses the same stack as the thread
(no upcalls are generated, so a separate stack isn't needed).
This isn't enabled yet.

Use a separate field for the KSE waiting flag.  It isn't
correct to use the mailbox flags field.

The following fixes were provided by David Xu:

  o Initialize condition variable locks with thread versions
    of the low-level locking functions instead of the kse versions.

  o Enable threading before creating the first thread instead
    of after.

  o Don't enter critical regions when trying to malloc/free
    or call functions that malloc/free.

  o Take the scheduling lock when inheriting thread attributes.

  o Check the attribute's stack pointer instead of the
    attributes stack size for null when allocating a
    thread's stack.

  o Add a kseg reinit function so we don't have to destroy and
    then recreate the same lock.

  o Check the return value of kse_create() and return an
    appropriate error if it fails.

  o Don't forget to destroy a thread's locks when freeing it.

  o Examine the correct flags word for checking to see if
    a thread is in a synchronization queue.

Things should now work on an SMP kernel.
@
text
@d10 1
a10 1
LIB=kse
d23 3
a25 3
.if ${MACHINE_ARCH} == "i386"
CFLAGS+=-DGS_HACK
.endif
@


1.38
log
@Sorry folks; I accidentally committed a patch from what I was working
on a couple of days ago.  This should be the most recent changes.

Noticed by:	davidxu
@
text
@d20 6
a25 1
#CFLAGS+=-D_LOCK_DEBUG -g
@


1.37
log
@Comment out the addition of -g to CFLAGS.  This snuck in from
my local version.
@
text
@d28 1
a28 1
.include "${.CURDIR}/man/Makefile.inc"
@


1.36
log
@Revamp libpthread so that it has a chance of working in an SMP
environment.  This includes support for multiple KSEs and KSEGs.

The ability to create more than 1 KSE via pthread_setconcurrency()
is in the works as well as support for PTHREAD_SCOPE_SYSTEM threads.
Those should come shortly.

There are still some known issues which davidxu and I are working
on, but it'll make it easier for us by committing what we have.

This library now passes all of the ACE tests that libc_r passes
with the exception of one.  It also seems to work OK with KDE
including konqueror, kwrite, etc.  I haven't been able to get
mozilla to run due to lack of java plugin, so I'd be interested
to see how it works with that.

Reviewed by:	davidxu
@
text
@d20 1
a20 1
CFLAGS+=-D_LOCK_DEBUG -g
@


1.35
log
@For now, build and install this as libkse instead of libpthread.
This will avoid any accidental use of an experimental library.

Suggested by:	rwatson
Approved by:	re (jhb)
@
text
@d12 1
a12 1
CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE 
d15 2
d20 1
a20 1
CFLAGS+=-D_LOCK_DEBUG
d23 1
a23 1
CFLAGS+=-D_PTHREADS_INVARIANTS
@


1.34
log
@Zap now-unused SHLIB_MINOR
@
text
@d10 2
a11 2
LIB=pthread
SHLIB_MAJOR= 5
@


1.33
log
@Mechanically change all libc_r references to libpthread.
@
text
@a11 1
SHLIB_MINOR= 0
@


1.32
log
@Make the changes needed for libpthread to compile in its new home.
The new libpthread will provide POSIX threading support using KSE.
These files were previously repo-copied from src/lib/libc_r.

Reviewed by:	deischen
Approved by:	-arch
@
text
@d17 1
a17 1
# Uncomment this if you want libc_r to contain debug information for
@


1.31
log
@Sync SCM ID comments with libc.
@
text
@d10 1
a10 1
LIB=c_r
d14 1
a14 1
CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}/uthread \
d24 1
a24 1
AINC=	-I${.CURDIR}/../libc/${MACHINE_ARCH} -I${.CURDIR}/uthread
d28 1
a28 1
.include "${.CURDIR}/uthread/Makefile.inc"
@


1.30
log
@Add weak definitions for wrapped system calls.  In general:

	_foo - wrapped system call
	foo - weak definition to _foo

and for cancellation points:

	_foo - wrapped system call
	__foo - enter cancellation point, call _foo(), leave
	        cancellation point
	foo - weak definition to __foo

Change use of global _thread_run to call a function to get the
currently running thread.

Make all pthread_foo functions weak definitions to _pthread_foo,
where _pthread_foo is the implementation.  This allows an application
to provide its own pthread functions.

Provide slightly different versions of pthread_mutex_lock and
pthread_mutex_init so that we can tell the difference between
a libc mutex and an application mutex.  Threads holding mutexes
internal to libc should never be allowed to exit, call signal
handlers, or cancel.

Approved by:	-arch
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.29 2000/11/14 02:46:23 obrien Exp $
d3 1
a3 1
# All library objects contain rcsid strings by default; they may be
d5 5
a9 3
# not contain these strings, delete -DLIBC_RCS and -DSYSLIBC_RCS
# from CFLAGS below.  To remove these strings from just the system call
# stubs, remove just -DSYSLIBC_RCS from CFLAGS.
d13 3
a15 3
CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS -I${.CURDIR}/../libc/include
CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE -I${.CURDIR}/uthread
CFLAGS+=-I${.CURDIR}/../../include
@


1.29
log
@Bump the shared lib version.  There seems to have been an incompatible
change committed to RELENG_4 where a bump there is now necessary.
We've got to go before RELENG_4 does.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.28 2000/10/13 22:19:50 deischen Exp $
a24 17
#
# This is a list of syscalls that are renamed as _thread_sys_{syscall}
# so that libc_r can provide replacement functions.
#
HIDDEN_SYSCALLS= aio_suspend.o accept.o bind.o close.o connect.o dup.o dup2.o \
	execve.o fchflags.o fchmod.o fchown.o fcntl.o \
	flock.o fpathconf.o fstat.o fstatfs.o fsync.o getdirentries.o \
	getlogin.o getpeername.o getsockname.o getsockopt.o ioctl.o \
	kevent.o listen.o \
	msync.o nanosleep.o nfssvc.o open.o poll.o read.o readv.o recvfrom.o \
	recvmsg.o sched_yield.o select.o sendfile.o sendmsg.o sendto.o \
	setsockopt.o shutdown.o sigaction.o sigaltstack.o \
	signanosleep.o sigpending.o sigprocmask.o sigreturn.o sigsetmask.o \
	sigsuspend.o socket.o \
	socketpair.o wait4.o write.o writev.o

.include "${.CURDIR}/../libc/Makefile.inc"
@


1.28
log
@Enable _PTHREADS_INVARIANTS until the recent libc_r changes are
shaken out.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.27 2000/08/07 16:51:55 jlemon Exp $
d9 1
a9 1
SHLIB_MAJOR= 4
@


1.27
log
@Add wrapper for kevent() syscall

Noted as missing by: nicolas.leonard@@animaths.com
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.26 2000/07/05 16:21:42 jasone Exp $
d20 1
a20 1
# CFLAGS+=-D_PTHREADS_INVARIANTS
@


1.26
log
@Remove DEBUG_FLAGS=-g3, which never should have been committed.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.25 2000/04/27 00:59:42 jasone Exp $
d32 2
a33 1
	getlogin.o getpeername.o getsockname.o getsockopt.o ioctl.o listen.o \
@


1.25
log
@Add a wrapper for the sendfile() system call.

PR:		bin/17366
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.24 2000/01/27 23:06:56 jasone Exp $
a17 2

DEBUG_FLAGS=-g3
@


1.24
log
@Simplify sytem call renaming.  Instead of _foo() <-- _libc_foo <-- foo(),
just use _foo() <-- foo().  In the case of a libpthread that doesn't do
call conversion (such as linuxthreads and our upcoming libpthread), this
is adequate.  In the case of libc_r, we still need three names, which are
now _thread_sys_foo() <-- _foo() <-- foo().

Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(),
nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo().

Remove all internal libc usage of: creat(), pause(), sleep(), system(),
tcdrain(), wait(), and waitpid().

Make thread cancellation fully POSIX-compliant.

Suggested by:	deischen
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.23 1999/12/18 01:00:41 jasone Exp $
d19 2
d36 1
a36 1
	recvmsg.o sched_yield.o select.o sendmsg.o sendto.o \
@


1.24.2.1
log
@MFC: Add a sendfile() wrapper, so that calls to sendfile() do not block the
entire process.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.24 2000/01/27 23:06:56 jasone Exp $
d34 1
a34 1
	recvmsg.o sched_yield.o select.o sendfile.o sendmsg.o sendto.o \
@


1.24.2.2
log
@MFC: Add wrapper for kevent() syscall

Approved by:	jlemon (in concept)
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.24.2.1 2000/07/18 01:57:20 jasone Exp $
d32 1
a32 2
	getlogin.o getpeername.o getsockname.o getsockopt.o ioctl.o \
	kevent.o listen.o \
@


1.24.2.3
log
@MFC: bring in signal handling changes, bug fixes, performance
     enhancements, and other good stuff.  gdb thread changes to
     follow later tonight.

Approved by:	jkh
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.24.2.2 2000/08/23 02:48:47 jhb Exp $
d20 1
a20 1
CFLAGS+=-D_PTHREADS_INVARIANTS
@


1.24.2.4
log
@We don't provide a wrapper for nfssvc(2), and signanosleep(2) was
removed yet in 1998.
@
text
@d1 1
a1 1
# $FreeBSD$
d34 1
a34 1
	msync.o nanosleep.o open.o poll.o read.o readv.o recvfrom.o \
d37 1
a37 1
	sigpending.o sigprocmask.o sigreturn.o sigsetmask.o \
@


1.24.2.5
log
@libc_r doesn't provide a wrapper for sigreturn(2).
(This change isn't applicable to -CURRENT which doesn't hide syscalls.)
@
text
@d37 1
a37 1
	sigpending.o sigprocmask.o sigsetmask.o \
@


1.23
log
@Fix some minor POSIX/SUSv2 compliance nits.

PR:		kern/11982
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.22 1999/11/28 05:38:00 alfred Exp $
d29 1
a29 1
HIDDEN_SYSCALLS= accept.o bind.o close.o connect.o dup.o dup2.o \
@


1.22
log
@add pthread_cancel, obtained from OpenBSD.

eischen (Daniel Eischen) added wrappers to protect against cancled
threads orphaning internal resources.

the cancelability code is still a bit fuzzy but works for test
programs of my own, OpenBSD's and some examples from ORA's books.

add readdir_r to both libc and libc_r

add some 'const' attributes to function parameters

Reviewed by: eischen, jasone
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.21 1999/10/14 10:08:53 marcel Exp $
d13 1
@


1.21
log
@Add sigsuspend.o and sigpending.o to HIDDEN_SYSCALLS as well.

Pointed out by: jdp
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.20 1999/09/30 15:07:43 marcel Exp $
d18 3
d31 2
a32 2
	getpeername.o getsockname.o getsockopt.o ioctl.o listen.o \
	nanosleep.o nfssvc.o open.o poll.o read.o readv.o recvfrom.o \
d35 2
a36 1
	signanosleep.o sigpending.o sigprocmask.o sigsuspend.o socket.o \
@


1.20
log
@Add sigprocmask to HIDDEN_SYSCALLS. This renames the syscall to
_thread_sys_sisprocmask in libc_r. This solves the undefined symbol...

Reported by: Kenneth Wayne Culver
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.19 1999/08/28 00:02:59 peter Exp $
d32 2
a33 2
	signanosleep.o sigprocmask.o socket.o socketpair.o wait4.o \
	write.o writev.o
@


1.19
log
@$Id$ -> $FreeBSD$
@
text
@d1 1
a1 1
# $FreeBSD$
d32 2
a33 1
	signanosleep.o socket.o socketpair.o wait4.o write.o writev.o
@


1.18
log
@Always use growable thread stacks on the i386.  The VM_STACK kernel option
must be made default for the alpha before growable thread stacks are
enabled for the alpha.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.17 1999/07/05 00:38:12 jasone Exp $
@


1.17
log
@Disable growable stacks by default, as advertised.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.16 1999/07/05 00:35:14 jasone Exp $
a16 3

# Uncomment this if you want libc_r to use growable stacks.
#CFLAGS+=-D_PTHREAD_GSTACK
@


1.16
log
@Use growable stacks for thread stacks that are the default stack size.

Cache discarded default thread stacks for use in subsequent thread creations.

Create a red zone at the end of each stack (including the initial thread
stack), with the hope of causing a segfault if a stack overflows.

To activate these modifications, add -D_PTHREAD_GSTACK to CFLAGS in
src/lib/libc_r/Makefile.  Since the modifications depend on the VM_STACK
kernel option, I'm not sure how to safely use growable stacks by default.

Testing, as well as algorithmic and stylistic comments are welcome.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.15 1999/06/20 08:32:37 jb Exp $
d19 1
a19 1
CFLAGS+= -D_PTHREAD_GSTACK
@


1.15
log
@Remove -DNOPOLL from the compilation flags now that there is a poll wrapper
in libc_r.

Bump the library version number (the scheduler now uses a poll syscall
instead of select).
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.14 1998/12/10 20:27:52 jb Exp $
d16 4
a19 1
#CFLAGS+=-D_LOCK_DEBUG
@


1.14
log
@Don't hide mknod, it doesn't need a wrapper and never has had one.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.13 1998/06/14 11:25:44 peter Exp $
d9 1
a9 1
SHLIB_MAJOR= 3
d12 1
a12 1
CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE -DNOPOLL -I${.CURDIR}/uthread
d16 1
a16 1
# CFLAGS+=-D_LOCK_DEBUG
@


1.14.2.1
log
@MFC: removed -DNOPOLL.  Note that unlike -current, the libc_r library
version remains at 3.  If you are building dynamically linked apps
that now want to use poll, keep in mind that they will not be usable
with previous versions of libc_r.so.3 (which lack the wrapped poll()).
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.15 1999/06/20 08:32:37 jb Exp $
d12 1
a12 1
CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE -I${.CURDIR}/uthread
d16 1
a16 1
#CFLAGS+=-D_LOCK_DEBUG
@


1.14.2.2
log
@$Id$ -> $FreeBSD$
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.14.2.3
log
@MFC: make pthread_rwlockattr_setpshared POSIX compliant.

Reviewed by:	deischen
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.14.2.2 1999/08/29 14:55:21 peter Exp $
d9 1
a9 1
SHLIB_MAJOR= 4
a12 1
CFLAGS+=-I${.CURDIR}/../../include
@


1.14.2.4
log
@MFC: Cancellation functions.

Reviewed by:	deischen
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.14.2.3 2000/01/04 10:28:37 tg Exp $
a18 3
# enable extra internal consistancy checks
# CFLAGS+=-D_PTHREADS_INVARIANTS

d29 2
a30 2
	getlogin.o getpeername.o getsockname.o getsockopt.o ioctl.o listen.o \
	msync.o nanosleep.o nfssvc.o open.o poll.o read.o readv.o recvfrom.o \
d33 1
a33 2
	signanosleep.o sigpending.o sigprocmask.o sigreturn.o sigsetmask.o \
	sigsuspend.o socket.o \
@


1.14.2.5
log
@MFC: Fix signal handling.

Reviewed by:	deischen

Fix some botches I introduced in the last commits.
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.14.2.4 2000/01/04 10:42:13 tg Exp $
a37 1
        socketpair.o wait4.o write.o writev.o
@


1.14.2.6
log
@MFC: Use growable stacks.

Reviewed by:	deischen
@
text
@d1 1
a1 1
# $FreeBSD: src/lib/libc_r/Makefile,v 1.14.2.5 2000/01/04 11:02:44 tg Exp $
d17 1
a17 1
CFLAGS+=-D_LOCK_DEBUG
d38 1
a38 1
	socketpair.o wait4.o write.o writev.o
@


1.13
log
@Don't compile in the use of poll() when building libc_r.  This isn't
so much a "fix", rather a bandaid to buy time to fix it properly
within the thread engine.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.12 1998/06/12 02:21:27 jb Exp $
d29 1
a29 1
	mknod.o nanosleep.o nfssvc.o open.o poll.o read.o readv.o recvfrom.o \
@


1.12
log
@Add poll to the list of hidden syscalls so that it gets renamed. This
propagates a bug (that there is no poll wrapper in libc_r), but it
prevents GNU configure scripts from trying to use it in preference
to select. libc_r really needs to change it's wait interface to use
poll instead of select because poll is more a superset of select that
the other way around.

This should allow the Roxen web server to work out-of-the-box. It's
configuration intercae is kinda neat. The code isn't. Shiver. 8-)
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.11 1998/06/09 23:25:13 jb Exp $
d12 1
a12 1
CFLAGS+=-DPTHREAD_KERNEL -D_THREAD_SAFE -I${.CURDIR}/uthread
@


1.11
log
@Add a commented out CFLAGS entry that can be uncommented to compile thread
lock debug into libc_r. I don't know if this is the best place to document
this, but at least it is recorded somewhere. 8-)
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.10 1998/06/01 02:12:15 jb Exp $
d29 1
a29 1
	mknod.o nanosleep.o nfssvc.o open.o read.o readv.o recvfrom.o \
@


1.10
log
@send and recv are wrappered in libc, so they shouldn't appear here.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.9 1998/05/31 23:53:50 jb Exp $
d13 5
@


1.9
log
@Remove some syscalls that should have been renamed (libc_r doesn't need
to wrapper them) and add a couple that should have been there.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.8 1998/03/28 11:49:02 dufault Exp $
d24 2
a25 2
	mknod.o nanosleep.o nfssvc.o open.o read.o readv.o recv.o recvfrom.o \
	recvmsg.o sched_yield.o select.o send.o sendmsg.o sendto.o \
@


1.8
log
@Finish _POSIX_PRIORITY_SCHEDULING.  Needs P1003_1B and
_KPOSIX_PRIORITY_SCHEDULING options to work.  Changes:

Change all "posix4" to "p1003_1b".  Misnamed files are left
as "posix4" until I'm told if I can simply delete them and add
new ones;

Add _POSIX_PRIORITY_SCHEDULING system calls for FreeBSD and Linux;

Add man pages for _POSIX_PRIORITY_SCHEDULING system calls;

Add options to LINT;

Minor fixes to P1003_1B code during testing.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.7 1998/03/09 05:09:43 jb Exp $
d21 1
a21 1
	execve.o fchdir.o fchflags.o fchmod.o fchown.o fcntl.o \
d24 4
a27 4
	mkfifo.o mknod.o nanosleep.o nfssvc.o open.o read.o readv.o \
	recvfrom.o recvmsg.o sched_yield.o select.o sendmsg.o sendto.o \
	setsockopt.o shutdown.o sigaction.o sigaltstack.o signanosleep.o \
	socket.o socketpair.o wait4.o write.o writev.o
@


1.7
log
@Add lib/libc/include as an directory to search for header files.

Change MACHINE references to MACHINE_ARCH.

Declare the names of the syscalls that need to be renamed to allow
for the functions that libc_r provides replacements for. This list
used to be in lib/libc/sys/Makefile.inc, but has been moved here
to keep that makefile tidy and remove the temptation for people to
add things to the list without adding a libc_r replacement function.
@
text
@d1 1
a1 1
#	$Id: Makefile,v 1.6 1997/05/03 03:57:21 jb Exp $
d25 3
a27 3
	recvfrom.o recvmsg.o select.o sendmsg.o sendto.o setsockopt.o \
	shutdown.o sigaction.o sigaltstack.o signanosleep.o socket.o \
	socketpair.o wait4.o write.o writev.o
@


1.6
log
@Use libc makefiles from now on instead of duplicating them in libc_r.

Added Id strings too. It's useful to know who last made a change.
@
text
@d1 1
a1 1
#	$Id$
d11 1
a11 1
CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS
d13 1
a13 1
AINC=	-I${.CURDIR}/../libc/${MACHINE} -I${.CURDIR}/uthread
d15 13
@


1.5
log
@Submitted by:	 John Birrell
uthreads update from the author.
@
text
@d1 1
a1 1
#	@@(#)Makefile	8.2 (Berkeley) 2/3/94
d16 1
a16 5
.include "${.CURDIR}/db/Makefile.inc"
.include "${.CURDIR}/compat-43/Makefile.inc"
.include "${.CURDIR}/gen/Makefile.inc"
.include "${.CURDIR}/gmon/Makefile.inc"
.include "${.CURDIR}/locale/Makefile.inc"
d18 1
a18 8
.include "${.CURDIR}/net/Makefile.inc"
.include "${.CURDIR}/nls/Makefile.inc"
.include "${.CURDIR}/quad/Makefile.inc"
.include "${.CURDIR}/regex/Makefile.inc"
.include "${.CURDIR}/stdio/Makefile.inc"
.include "${.CURDIR}/stdlib/Makefile.inc"
.include "${.CURDIR}/stdtime/Makefile.inc"
.include "${.CURDIR}/string/Makefile.inc"
a19 8
.include "${.CURDIR}/rpc/Makefile.inc"
.include "${.CURDIR}/uthread/Makefile.inc"
.include "${.CURDIR}/xdr/Makefile.inc"
.if !defined(NO_YP_LIBC)
CFLAGS+= -DYP
.include "${.CURDIR}/yp/Makefile.inc"
.endif
.include "${.CURDIR}/${MACHINE}/sys/Makefile.inc"
@


1.4
log
@Don't create/install libc_r_pic.a
@
text
@a13 1
CLEANFILES+=tags
a38 9

beforeinstall: tags
	${INSTALL} ${COPY} -o bin -g bin -m 444 tags /var/db/libc_r.tags

tags: ${SRCS}
	ctags ${.ALLSRC:M*.c}
	egrep -o "^ENTRY(.*)|^FUNC(.*)|^SYSCALL(.*)" ${.ALLSRC:M*.s} | \
	    sed "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
	    >> tags; sort -o tags tags
@


1.4.2.1
log
@part of YAMFC
cleanup libc_r from 2.2 family
@
text
@a1 1
#	$Id: Makefile,v 1.6 1997/05/03 03:57:21 jb Exp $
d14 1
d17 5
a21 1
.include "${.CURDIR}/../libc/Makefile.inc"
d23 10
d34 15
a48 1
.include "${.CURDIR}/sys/Makefile.inc"
@


1.4.2.2
log
@As theatened two weeks ago: merge the major changes from -current's pthread
implementation. This includes file locking based on FILE *, signal fixes,
read/write-locks, better POSIX compliance and better performance. Not included
are changes relating to realtime scheduling.

Famous last words: I've now built the world several times with these changes,
so they shouldn't break anything.
@
text
@d2 1
a2 1
#	$Id: Makefile,v 1.4.2.1 1997/06/23 23:49:27 julian Exp $
d12 1
a12 1
CFLAGS+=-DLIBC_RCS -DSYSLIBC_RCS -I${.CURDIR}/../libc/include
d14 1
a14 6

# Uncomment this if you want libc_r to contain debug information for
# thread locking.
# CFLAGS+=-D_LOCK_DEBUG

AINC=	-I${.CURDIR}/../libc/${MACHINE}
a15 13

#
# This is a list of syscalls that are renamed as _thread_sys_{syscall}
# so that libc_r can provide replacement functions.
#
HIDDEN_SYSCALLS= accept.o bind.o close.o connect.o dup.o dup2.o \
	execve.o fchflags.o fchmod.o fchown.o fcntl.o \
	flock.o fpathconf.o fstat.o fstatfs.o fsync.o getdirentries.o \
	getpeername.o getsockname.o getsockopt.o ioctl.o listen.o \
	mknod.o nfssvc.o open.o poll.o read.o readv.o recvfrom.o \
	recvmsg.o sched_yield.o select.o sendmsg.o sendto.o \
	setsockopt.o shutdown.o sigaction.o sigaltstack.o \
	socket.o socketpair.o wait4.o write.o writev.o
@


1.4.2.3
log
@$Id$ -> $FreeBSD$
@
text
@d2 1
a2 1
# $FreeBSD$
@


1.3
log
@Submitted by: John Birrell <cimaxp1!jb@@werple.net.au>

Here are the diffs for libc_r to get it one step closer to P1003.1c
These make most of the thread/mutex/condvar structures opaque to the
user. There are three functions which have been renamed with _np
suffixes because they are extensions to P1003.1c (I did them for JAVA,
which needs to suspend/resume threads and also start threads suspended).

I've created a new header (pthread_np.h) for the non-POSIX stuff.

The egrep tags stuff in /usr/src/lib/libc_r/Makefile that I uncommented
doesn't work. I think its best to delete it. I don't think libc_r needs
tags anyway, 'cause most of the source is in libc which does have tags.

also:

Here's the first batch of man pages for the thread functions.
The diff to /usr/src/lib/libc_r/Makefile removes some stuff that was
inherited from /usr/src/lib/libc/Makefile that should only be done with
libc.

also:

I should have sent this diff with the pthread(3) man page.
It allows people to type

make -DWANT_LIBC_R world

to get libc_r built with the rest of the world. I put this in the
pthread(3) man page.  The default is still not to build libc_r.


also:
The diff attached adds a pthread(3) man page to /usr/src/share/man/man3.
The idea is that without libc_r installed, this man page will give people
enough info to know that they have to build libc_r.
@
text
@a14 1
INSTALL_PIC_ARCHIVE=	yes
@


1.2
log
@Sync libc_r with libc changes..
@
text
@d23 1
d42 2
a43 18
KQSRCS=	adddi3.c anddi3.c ashldi3.c ashrdi3.c cmpdi2.c divdi3.c iordi3.c \
	lshldi3.c lshrdi3.c moddi3.c muldi3.c negdi2.c notdi2.c qdivrem.c \
	subdi3.c ucmpdi2.c udivdi3.c umoddi3.c xordi3.c
KSRCS=	bcmp.c ffs.c index.c mcount.c rindex.c strcat.c strcmp.c strcpy.c \
	strlen.c strncpy.c

libkern: libkern.gen libkern.${MACHINE}

libkern.gen: ${KQSRCS} ${KSRCS}
	cp -p ${.CURDIR}/quad/quad.h ${.ALLSRC} /sys/libkern

libkern.${MACHINE}:: ${KMSRCS}
.if defined(KMSRCS) && !empty(KMSRCS)
	cp -p ${.ALLSRC} /sys/libkern/${MACHINE}
.endif

#beforeinstall: tags
#	${INSTALL} ${COPY} -o bin -g bin -m 444 tags /var/db/libc.tags
@


1.1
log
@Reviewed by:	 julian
Submitted by:	 john birrel

One version of the pthreads library
another will follow with differnt actions under some cases..
not QUITE complete
@
text
@d9 2
a10 2
SHLIB_MAJOR= 2
SHLIB_MINOR= 2
@
