summaryrefslogtreecommitdiffstats
path: root/lib/libkse
Commit message (Collapse)AuthorAgeFilesLines
* Merge from tbemd:imp2010-06-138-17/+7
| | | | | Convert from using MACHINE_ARCH to MACHINE_CPUARCH. Hoist path statement up into the top Makefile rather than repeating it on every arch Makefile.
* Though these libraries are disconnected from the build and don'tru2010-02-151-20/+0
| | | | | | | | | | | 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
* Bump the version of all non-symbol-versioned shared libraries inkensmith2009-07-191-1/+1
| | | | | | | | 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)
* Honor WITHOUT_INSTALLLIB in some places.jkim2009-02-131-0/+2
|
* Call the fcntl compatiblity wrapper from the thread library fcntl wrappersdfr2008-05-301-1/+2
| | | | | | so that they get the benefit of the (limited) forward ABI compatibility. MFC after: 1 week
* Fix some "in in" typos in comments.brueffer2008-03-261-1/+1
| | | | | | | PR: 121490 Submitted by: Anatoly Borodin <anatoly.borodin@gmail.com> Approved by: rwatson (mentor), jkoshy MFC after: 3 days
* Add missing #includedes2008-02-061-0/+1
| | | | | | Spotted by: tinderbox Submitted by: Pietro Cerutti <gahr@gahr.ch> Pointy hat to: des
* Add pthread_mutex_isowned_np() here as well; libthr and libkse are supposeddes2008-02-062-0/+15
| | | | | | to have identical functionality. MFC after: 2 weeks
* Previous commit had a typo that resulted in symbol versioning beingdes2008-02-061-1/+1
| | | | | | (silently) disabled for libkse... Pointy hat to: des
* Give libkse the same treatment as libthr re. symbol versioning.des2008-02-062-8/+2
| | | | MFC after: 2 weeks
* When reinitializing a lockuser, don't assume that the lock is indeischen2008-01-311-7/+15
| | | | | | | | | use. If it is in use, use the watched request, otherwise use the lockuser's own request. Only allocate a lockuser request if both requests are null. PR: 119920 Tested by (6.x): Landon Fuller <landonf -at- bikemonkey -dot- org>
* Remove hacks to allow libkse to export its symbols in the LIBTHREAD_1_0deischen2007-12-16102-481/+0
| | | | | version namespace which was needed before the library version was bumped.
* Set the tcb (thread control block) in the child process after a fork.deischen2007-12-061-0/+13
| | | | | | | | | | This protects against a race with an upcall in the parent during the fork which can clobber the parent's tcb before the vm space is copied in the child. The child then gets a corrupted tcb that is either null or that points to another thread that doesn't exist in the child (after a fork, only the fork()ing thread exists in the child). Reported by: Arno J. Klaassen (arno at heho / snv / jussieu / fr)
* For un-prototyped static inline functions declared in pthread_md.h onrwatson2007-12-012-3/+3
| | | | | | ia64, powerpc, and sparc64, use ANSI function headers and specifically indicate the lack of arguments with 'void'. Otherwise, warnings are generated at WARNS=3, leading to a compile failure with -Werror.
* WARNS=3'ify.deischen2007-11-30120-159/+532
|
* Initialize the current thread and signal locks so that sigaction()deischen2007-11-301-5/+16
| | | | | | will work after a fork(). WARNS=3'ify.
* To reduce the impact of possible removal of the syscalls required bybrooks2007-11-291-3/+6
| | | | | | | | | | 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
* Fix pointer dereferencing problems in _pthread_mutex_init_calloc_cb() thatjasone2007-11-281-1/+2
| | | | were obscured by pseudo-opaque pthreads API pointer casting.
* Add _pthread_mutex_init_calloc_cb() to libthr and libkse, so that malloc(3)jasone2007-11-278-22/+46
| | | | | (part of libc) can use pthreads mutexes without causing infinite recursion during initialization.
* Move the added code in revision 1.26 into function pthread_key_create,davidxu2007-11-261-6/+6
| | | | it should be there.
* These are the things that the tinderbox has problems with because itjb2007-11-201-0/+1
| | | | | | | | 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.
* MFlibthr:davidxu2007-11-191-1/+5
| | | | In _pthread_key_create() ensure that libkse is initialized.
* Add a new "non-portable" mutex type, PTHREAD_MUTEX_ADAPTIVE_NP. Thiskris2007-10-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | is also implemented in glibc and is used by a number of existing applications (mysql, firefox, etc). This mutex type is a default mutex with the additional property that it spins briefly when attempting to acquire a contested lock, doing trylock operations in userland before entering the kernel to block if eventually unsuccessful. The expectation is that applications requesting this mutex type know that the mutex is likely to be only held for very brief periods, so it is faster to spin in userland and probably succeed in acquiring the mutex, than to enter the kernel and sleep, only to be woken up almost immediately. This can help significantly in certain cases when pthread mutexes are heavily contended and held for brief durations (such as mysql). Spin up to 200 times before entering the kernel, which represents only a few us on modern CPUs. No performance degradation was observed with this value and it is sufficient to avoid a large performance drop in mysql performance in the heavily contended pthread mutex case. The libkse implementation is a NOP. Reviewed by: jeff MFC after: 3 days
* For 7.0 make the shared lib "version" '3'.obrien2007-10-101-1/+1
| | | | Approved by: re(kensmith)
* Repo copy libpthreads to libkse.obrien2007-10-099-5/+380
| | | | | | This introduces the WITHOUT_LIBKSE nob, and changes WITHOUT_LIBPTHREADS to mean with neither threading libs. Approved by: re(kensmith)
* Always install libpthread.* symlinks if at least one ofru2007-10-011-2/+3
| | | | | | | | | | | | 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)
* Bump library versions in preparation for 7.0.deischen2007-05-211-1/+1
| | | | Ok'd by: kan
* Fix a logic bug I re-introduced in my patch I sent to Danielru2007-05-181-1/+1
| | | | | | | that would cause the selected shared threading library to be overwritten with its 32-bit version on amd64. PR: amd64/112509
* Allow DEFAULT_THREAD_LIB to be set from /etc/src.conf.deischen2007-05-171-4/+4
| | | | Submitted by: ru
* Enable symbol versioning by default. Use WITHOUT_SYMVER to disable it.deischen2007-05-132-12/+17
| | | | | | | | | | 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.
* Catch up with the renaming of the private version namespace.deischen2007-04-291-1/+1
|
* Add a reference and lock the target thread when setting its name.deischen2007-04-231-5/+24
| | | | Submitted by: davidxu (via libthr)
* Oops, fix a typo in the last commit :-/brian2007-03-051-1/+1
|
* In the NOTYET code path when a process forks, the remainingbrian2007-03-051-7/+4
| | | | | | | | | | | 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
* Remove 3rd clause, renumber, ok per emailimp2007-01-1257-228/+57
|
* Clean bound and non-bound pthread structures consistently beforepeadar2006-12-181-4/+5
| | | | | | | | | | | | 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
* If a thread was detached, return EINVAL instead, the error codedavidxu2006-11-281-1/+1
| | | | | | | | 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.
* Stylize:marcel2006-09-012-35/+51
| | | | | | | 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.
* The ucontext is 16-byte aligned, which means that struct tcb ismarcel2006-09-011-0/+1
| | | | | | | 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.
* Stylize. Introduce ppc_{get|set}_tp() and ppc_{get|set}_tcb() tomarcel2006-09-012-29/+59
| | | | abstract the magic that happens when deriving one or the other.
* Implement TLS.marcel2006-09-014-50/+61
|
* Remove alpha left-overs.ru2006-08-221-1/+1
|
* o Remove a cruft prevented libpthread sigaction(2) wrapper tomaxim2006-06-093-7/+18
| | | | | | | | | | | | | 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
* Export offsets of thread signal pending set and signal mask for debugger.davidxu2006-05-171-0/+2
|
* In order to let new binutils can compile it, replace movl withdavidxu2006-05-071-9/+9
| | | | | | movw for segment saving and restoring. Submitted by: Diego 'Flameeyes' Petteno flameeyes at gentoo dot org
* Unexpand TAILQ_FIRST(foo) == NULL to TAILQ_EMPTY.delphij2006-04-132-5/+5
| | | | Ok'ed by: davidxu
* Install shared libpthread library into /lib; needed by someru2006-04-121-0/+1
| | | | /sbin programs.
* Bring libpthread up to WARNS level 2.des2006-03-293-8/+16
| | | | Reviewed by: deischen
* Fix prototype mismatch and use of un-namespaced pthread functions.des2006-03-281-11/+7
|
* Use the correct type for and argument. Recent changes to namespace.hdeischen2006-03-281-1/+1
| | | | | | exposed this bug. Reported by: kris
OpenPOWER on IntegriCloud