summaryrefslogtreecommitdiff
path: root/lib/libpthread
AgeCommit message (Collapse)Author
2007-10-09Repo copy libpthreads to libkse.David E. O'Brien
This introduces the WITHOUT_LIBKSE nob, and changes WITHOUT_LIBPTHREADS to mean with neither threading libs. Approved by: re(kensmith) Notes: svn path=/head/; revision=172492
2007-10-09Repo copy libpthreads to libkse.David E. O'Brien
This introduces the WITHOUT_LIBKSE nob, and changes WITHOUT_LIBPTHREADS to mean with neither threading libs. Approved by: re(kensmith) Notes: svn path=/head/; revision=172491
2007-10-01Always install libpthread.* symlinks if at least one ofRuslan Ermilov
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) Notes: svn path=/head/; revision=172403
2007-05-21Bump library versions in preparation for 7.0.Daniel Eischen
Ok'd by: kan Notes: svn path=/head/; revision=169807
2007-05-18Fix a logic bug I re-introduced in my patch I sent to DanielRuslan Ermilov
that would cause the selected shared threading library to be overwritten with its 32-bit version on amd64. PR: amd64/112509 Notes: svn path=/head/; revision=169669
2007-05-17Allow DEFAULT_THREAD_LIB to be set from /etc/src.conf.Daniel Eischen
Submitted by: ru Notes: svn path=/head/; revision=169648
2007-05-13Enable symbol versioning by default. Use WITHOUT_SYMVER to disable it.Daniel Eischen
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. Notes: svn path=/head/; revision=169524
2007-04-29Catch up with the renaming of the private version namespace.Daniel Eischen
Notes: svn path=/head/; revision=169094
2007-04-29Use C comments since we now preprocess these files with CPP.Daniel Eischen
Notes: svn path=/head/; revision=169092
2007-04-23Add a reference and lock the target thread when setting its name.Daniel Eischen
Submitted by: davidxu (via libthr) Notes: svn path=/head/; revision=168964
2007-03-05Oops, fix a typo in the last commit :-/Brian Somers
Notes: svn path=/head/; revision=167244
2007-03-05In the NOTYET code path when a process forks, the remainingBrian Somers
child thread goes back to system scope rather than process scope. This allows an ensuing exec() to actually work. This change was made a year ago here, but I "forgot" to commit it :( Approved by: deischen MFC after: 3 weeks Notes: svn path=/head/; revision=167241
2007-01-12Remove 3rd clause, renumber, ok per emailWarner Losh
Notes: svn path=/head/; revision=165967
2006-12-18Clean bound and non-bound pthread structures consistently beforePeter Edwards
they become candidates for reuse. Without this fix, some of the state from a thread structure's previous incarnation could interfere with its new one. Specifically, a non-bound thread started as "suspended" (see pthread_attr_setcreatesuspend_np()) might not get scheduled at all when resumed, as the "active" flag would be set spuriously. Reviewed by: deischen@, davidxu@ MFC after: 1 week Notes: svn path=/head/; revision=165334
2006-11-28If a thread was detached, return EINVAL instead, the error codeDavid Xu
is also returned by pthread_detach() if a thread was already detached, the error code was already documented: > [EINVAL] The implementation has detected that the value speci- > fied by thread does not refer to a joinable thread. Notes: svn path=/head/; revision=164715
2006-09-01Stylize:Marcel Moolenaar
o avoid using a global register variable. o redefine struct ia64_tp as a union. We don't have to get to the fields themselves. We just need it to be of the right size with the right alignment. Notes: svn path=/head/; revision=161841
2006-09-01The ucontext is 16-byte aligned, which means that struct tcb isMarcel Moolenaar
16-byte aligned. Consequently, struct tcb is a multiple of 16 bytes in size. We need to make sure there's no padding after struct ppc32_tp. We do this by explicitly adding the necessary padding in front of it. Notes: svn path=/head/; revision=161830
2006-09-01Stylize. Introduce ppc_{get|set}_tp() and ppc_{get|set}_tcb() toMarcel Moolenaar
abstract the magic that happens when deriving one or the other. Notes: svn path=/head/; revision=161828
2006-09-01Implement TLS.Marcel Moolenaar
Notes: svn path=/head/; revision=161802
2006-08-22Remove alpha left-overs.Ruslan Ermilov
Notes: svn path=/head/; revision=161526
2006-06-09o Remove a cruft prevented libpthread sigaction(2) wrapper toMaxim Konovalov
do its work for SIGINFO. Always install libpthread signal handler wrapper for SIGINFO even if user SIG_IGN's or SIG_DFL's it. SIGINFO has a special meaning for libpthread: when LIBPTHREAD_DEBUG enviroment variable defined it is used for dumping an information about threads to /tmp/. Reported by: mi Reviewed by: deischen MFC after: 2 weeks Notes: svn path=/head/; revision=159462
2006-05-17Export offsets of thread signal pending set and signal mask for debugger.David Xu
Notes: svn path=/head/; revision=158679
2006-05-07In order to let new binutils can compile it, replace movl withDavid Xu
movw for segment saving and restoring. Submitted by: Diego 'Flameeyes' Petteno flameeyes at gentoo dot org Notes: svn path=/head/; revision=158348
2006-04-13Unexpand TAILQ_FIRST(foo) == NULL to TAILQ_EMPTY.Xin LI
Ok'ed by: davidxu Notes: svn path=/head/; revision=157700
2006-04-12Install shared libpthread library into /lib; needed by someRuslan Ermilov
/sbin programs. Notes: svn path=/head/; revision=157694
2006-03-29Bring libpthread up to WARNS level 2.Dag-Erling Smørgrav
Reviewed by: deischen Notes: svn path=/head/; revision=157243
2006-03-28Fix prototype mismatch and use of un-namespaced pthread functions.Dag-Erling Smørgrav
Notes: svn path=/head/; revision=157235
2006-03-28Use the correct type for and argument. Recent changes to namespace.hDaniel Eischen
exposed this bug. Reported by: kris Notes: svn path=/head/; revision=157228
2006-03-16Suuply the name of the version map and let bsd.lib.mk supplyDaniel Eischen
the link arguments. Notes: svn path=/head/; revision=156774
2006-03-13Add compatibility symbol maps. libpthread (.so.1 and .so.2)Daniel Eischen
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 Notes: svn path=/head/; revision=156611
2006-03-06Only catch SIGINFO (for dumping thread states) when LIBPTHREAD_DEBUGDaniel Eischen
is defined in the environment. Requested by: jmg & a few others Notes: svn path=/head/; revision=156330
2006-03-05Add some more pthread stubs so that librt can use them.Daniel Eischen
The thread jump table has been resorted, so you need to keep libc, libpthread, and libthr in sync. Submitted by: xu Notes: svn path=/head/; revision=156319
2006-02-24Fix a race condition introduced when redzones were added. Use anDaniel Eischen
atomic operation to return and adjust the stack. Submitted by: luoqi Notes: svn path=/head/; revision=155990
2006-02-23Eliminate a race condition in timed waits (cv, mutex, and sleeps).Daniel Eischen
MFC Candidate. PR: 93592 Notes: svn path=/head/; revision=155962
2006-02-16Don't forget to initialize a tailq before using it.Daniel Eischen
MFC candidate Noticed by: luoqi Notes: svn path=/head/; revision=155745
2006-01-13Increase the number of spinlocks, since libc's malloc implementation isJason Evans
about to significantly increase the number of spinlocks used. Approved by: markm (mentor) Notes: svn path=/head/; revision=154288
2006-01-12In preparation for a new malloc implementation:Jason Evans
* Add posix_memalign(). * Move calloc() from calloc.c to malloc.c. Add a calloc() implementation in rtld-elf in order to make the loader happy (even though calloc() isn't used in rtld-elf). * Add _malloc_prefork() and _malloc_postfork(), and use them instead of directly manipulating __malloc_lock. Approved by: phk, markm (mentor) Notes: svn path=/head/; revision=154248
2006-01-03For the ``#ifdef NOTYET'' code that allows calling non-async-safeBrian Somers
functions in the child after a fork() from a threaded process, use __sys_setprocmask() rather than setprocmask() to keep our signal handling sane. Without this fix, signals are essentially ignored in said child and things such as protection violations result in an endless busy loop. Reviewed by: deischen Notes: svn path=/head/; revision=153989
2005-11-19o Include <sys/time.h>Marcel Moolenaar
o Make this ILP32/LP64 clean: cast pointers to long o Code conditional upon DEBUG must also be conditional upon _LIBC_R_ Notes: svn path=/head/; revision=152599
2005-11-19o Include <string.h>Marcel Moolenaar
o Make this ILP32/LP64 clean: cast pointers to long. Notes: svn path=/head/; revision=152598
2005-11-19Fix typo: s/_LIBC_R/_LIBC_R_/Marcel Moolenaar
Notes: svn path=/head/; revision=152597
2005-10-24Include files thr_condattr_pshared.c and thr_mattr_pshare.c.David Xu
Notes: svn path=/head/; revision=151616
2005-10-24Export following functions:David Xu
_pthread_condattr_getpshared _pthread_condattr_setpshared _pthread_mutexattr_getpshared _pthread_mutexattr_setpshared pthread_condattr_getpshared pthread_condattr_setpshared pthread_mutexattr_getpshared pthread_mutexattr_setpshared Notes: svn path=/head/; revision=151615
2005-10-24Add functions pthread_mutexattr_setpshared and pthread_mutexattr_getpshared.David Xu
Notes: svn path=/head/; revision=151612
2005-10-24Add function pthread_condattr_setpshared and pthread_condattr_getpshared.David Xu
Notes: svn path=/head/; revision=151611
2005-09-24Modify the code path of the ifdef NOTYET part of _kse_single_thread():Brian Somers
o Don't reinitialise the atfork() handler list in the child. We are meant to call the child handler, and on subsequent fork()s should call all three functions as normal. o Don't reinitialise the thread specific keyed data in the child after a fork. Applications may require this for context. o Reinitialise curthread->tlflags after removing ourselves from (and reinitialising) the various internal thread lists. o Reinitialise __malloc_lock in the child after fork() (to balance our explicitly taking the lock prior to the fork()). With these changes, it is possible to enable the NOTYET code in thr_kern.c to allow the use of non-async-safe functions after fork()ing from a threaded program. Reviewed by: Daniel Eischen <deischen@freebsd.org> [_malloc_lock reinitialisation has since been moved to avoid polluting the !NOTYET code] Notes: svn path=/head/; revision=150499
2005-09-01Include needed headers that were obtained through <pthread.h>. Sort headersStefan Farfeleder
while here. Notes: svn path=/head/; revision=149691
2005-08-30Allocate a thread's tcb last so it is easier to handle failures toDaniel Eischen
malloc() siginfo. PR: 85468 Notes: svn path=/head/; revision=149617
2005-08-29Handle failure to malloc() part of the thread structure.Daniel Eischen
PR: 83457 Notes: svn path=/head/; revision=149579
2005-08-29Don't attempt to initialize the rtld lock if it can't be malloc()'d.Daniel Eischen
PR: 83452 Notes: svn path=/head/; revision=149578