History log of /freebsd-10.1-release/lib/libkse/Makefile
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 234412 18-Apr-2012 pluknet

Fix typo in ".PATH"


# 209118 12-Jun-2010 imp

Merge from tbemd:

Convert from using MACHINE_ARCH to MACHINE_CPUARCH. Hoist path statement
up into the top Makefile rather than repeating it on every arch Makefile.


# 203918 15-Feb-2010 ru

Though these libraries are disconnected from the build and don't
currently build, they should be kept. [1]

Unbreak their makefiles by removing the support for the long gone
DEFAULT_THREAD_LIB knob. (Allows the tools/make_libdeps.sh script
to succeed.)

According to: davidxu and deischen [1]
MFC after: 3 days


# 195767 19-Jul-2009 kensmith

Bump the version of all non-symbol-versioned shared libraries in
preparation for 8.0-RELEASE. Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.

Reviewed by: kib
Approved by: re (rwatson)


# 188583 13-Feb-2009 jkim

Honor WITHOUT_INSTALLLIB in some places.


# 176056 06-Feb-2008 des

Previous commit had a typo that resulted in symbol versioning being
(silently) disabled for libkse...

Pointy hat to: des


# 176055 06-Feb-2008 des

Give libkse the same treatment as libthr re. symbol versioning.

MFC after: 2 weeks


# 174112 30-Nov-2007 deischen

WARNS=3'ify.


# 174092 29-Nov-2007 brooks

To reduce the impact of possible removal of the syscalls required by
libkse in FreeBSD 8.0, do not build or install static versions of libkse
(i.e. libkse*.a) in the default case. Static versions will be built and
installed if libthr is not built or if libkse is the default threading
library.

Discussed on: freebsd-arch
MFC after: 3 days


# 173766 20-Nov-2007 jb

These are the things that the tinderbox has problems with because it
doesn't use the default CFLAGS which contain -fno-strict-aliasing.

Until the code is cleaned up, just add -fno-strict-aliasing to the
CFLAGS of these for the tinderboxes' sake, allowing the rest of the
tree to have -Werror enabled again.


# 172505 10-Oct-2007 obrien

For 7.0 make the shared lib "version" '3'.
Approved by: re(kensmith)


# 172491 09-Oct-2007 obrien

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)


# 172403 01-Oct-2007 ru

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)


# 169807 21-May-2007 deischen

Bump library versions in preparation for 7.0.

Ok'd by: kan


# 169669 18-May-2007 ru

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


# 169648 17-May-2007 deischen

Allow DEFAULT_THREAD_LIB to be set from /etc/src.conf.

Submitted by: ru


# 169524 13-May-2007 deischen

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.


# 161526 22-Aug-2006 ru

Remove alpha left-overs.


# 157694 12-Apr-2006 ru

Install shared libpthread library into /lib; needed by some
/sbin programs.


# 157243 29-Mar-2006 des

Bring libpthread up to WARNS level 2.

Reviewed by: deischen


# 156774 16-Mar-2006 deischen

Suuply the name of the version map and let bsd.lib.mk supply
the link arguments.


# 156611 12-Mar-2006 deischen

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


# 148297 22-Jul-2005 kensmith

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...)


# 136910 24-Oct-2004 ru

For variables that are only checked with defined(), don't provide
any fake value.


# 133801 16-Aug-2004 davidxu

1. Add macro DTV_OFFSET to calculate dtv offset in tcb.
2. Export symbols needed by debugger.


# 125258 31-Jan-2004 marcel

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).


# 125230 30-Jan-2004 deischen

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@


# 120533 27-Sep-2003 marcel

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.


# 119693 02-Sep-2003 kan

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


# 117706 17-Jul-2003 davidxu

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


# 117178 02-Jul-2003 ru

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


# 117125 01-Jul-2003 ru

Unbreak "make checkdpadd".


# 117120 01-Jul-2003 ru

Axe AINC.

Submitted by: bde


# 116705 23-Jun-2003 marcel

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.


# 115399 29-May-2003 kan

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)


# 113996 24-Apr-2003 deischen

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.


# 113943 23-Apr-2003 deischen

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.


# 113786 21-Apr-2003 deischen

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.


# 113661 18-Apr-2003 deischen

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


# 113659 18-Apr-2003 deischen

Comment out the addition of -g to CFLAGS. This snuck in from
my local version.


# 113658 18-Apr-2003 deischen

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


# 107687 08-Dec-2002 deischen

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)


# 104073 27-Sep-2002 peter

Zap now-unused SHLIB_MINOR


# 103412 16-Sep-2002 mini

Mechanically change all libc_r references to libpthread.


# 103388 16-Sep-2002 mini

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


# 94797 15-Apr-2002 obrien

Sync SCM ID comments with libc.


# 71581 24-Jan-2001 deischen

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


# 68699 14-Nov-2000 obrien

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.


# 67099 13-Oct-2000 deischen

Enable _PTHREADS_INVARIANTS until the recent libc_r changes are
shaken out.


# 64346 07-Aug-2000 jlemon

Add wrapper for kevent() syscall

Noted as missing by: nicolas.leonard@animaths.com


# 62641 05-Jul-2000 jasone

Remove DEBUG_FLAGS=-g3, which never should have been committed.


# 59671 26-Apr-2000 jasone

Add a wrapper for the sendfile() system call.

PR: bin/17366


# 56698 27-Jan-2000 jasone

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


# 54757 17-Dec-1999 jasone

Fix some minor POSIX/SUSv2 compliance nits.

PR: kern/11982


# 53812 28-Nov-1999 alfred

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


# 52233 14-Oct-1999 marcel

Add sigsuspend.o and sigpending.o to HIDDEN_SYSCALLS as well.

Pointed out by: jdp


# 51818 30-Sep-1999 marcel

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


# 50476 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 48609 05-Jul-1999 jasone

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.


# 48570 04-Jul-1999 jasone

Disable growable stacks by default, as advertised.


# 48569 04-Jul-1999 jasone

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.


# 48047 20-Jun-1999 jb

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).


# 41660 10-Dec-1998 jb

Don't hide mknod, it doesn't need a wrapper and never has had one.


# 36967 14-Jun-1998 peter

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.


# 36905 12-Jun-1998 jb

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-)


# 36831 09-Jun-1998 jb

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-)


# 36552 01-Jun-1998 jb

send and recv are wrappered in libc, so they shouldn't appear here.


# 36551 31-May-1998 jb

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.


# 34925 28-Mar-1998 dufault

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.


# 34366 09-Mar-1998 jb

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.


# 25402 03-May-1997 jb

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.


# 22315 05-Feb-1997 julian

Submitted by: John Birrell
uthreads update from the author.


# 17928 29-Aug-1996 peter

Don't create/install libc_r_pic.a


# 17706 20-Aug-1996 julian

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.


# 15635 05-May-1996 peter

Sync libc_r with libc changes..


# 13546 21-Jan-1996 julian

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