summaryrefslogtreecommitdiff
path: root/lib/libpthread
Commit message (Collapse)AuthorAgeFilesLines
...
* - Prefix MUTEX_TYPE_MAX with PTHREAD_ to avoid namespace pollution.Stefan Farfeleder2005-08-192-3/+3
| | | | | | | | | - Remove the macros MUTEX_TYPE_FAST and MUTEX_TYPE_COUNTING_FAST. OK'ed by: deischen Notes: svn path=/head/; revision=149298
* Add usleep to the map files.Daniel Eischen2005-08-031-0/+2
| | | | | | | Noticed by: davidxu Notes: svn path=/head/; revision=148662
* Add a cancellation point for usleep().Daniel Eischen2005-08-031-1/+16
| | | | Notes: svn path=/head/; revision=148660
* Remove an unused variable.Daniel Eischen2005-07-291-1/+0
| | | | Notes: svn path=/head/; revision=148544
* Catch up with the atomic_FOO_ptr() changes and silence a few warnings.Daniel Eischen2005-07-291-7/+14
| | | | Notes: svn path=/head/; revision=148542
* Bump the shared library version number of all libraries that have notKen Smith2005-07-221-1/+1
| | | | | | | | | | been bumped since RELENG_5. Reviewed by: ru Approved by: re (not needed for commit check but in principle...) Notes: svn path=/head/; revision=148297
* Clean out the leftovers from the i386_set_gsbase() TLS conversion.Peter Wemm2005-06-292-51/+8
| | | | | | | | | | | Like on libthr, there is an i386_set_gsbase() stub implementation here to avoid libc.so.5 issues. This should likely be a weak symbol and I expect this will be fixed soon. Approved by: re Notes: svn path=/head/; revision=147673
* Fix off-by-one nanosecond in macro TIMESPEC_ADD.David Xu2005-06-221-1/+1
| | | | | | | | | Reviewed by: deischen Approved by: re (dwhite) MFC after : 4 days Notes: svn path=/head/; revision=147533
* Add a missing END() to quiet a warning.John Baldwin2005-05-311-0/+1
| | | | Notes: svn path=/head/; revision=146832
* Remove the special _amd64_set_gsbase() code for #ifdef COMPAT_32BIT, nowPeter Wemm2005-04-262-10/+0
| | | | | | | | that the amd64 kernel implements i386_get/set_gsbase(). All the rest of the ldt backwards compat code should go away soon. Notes: svn path=/head/; revision=145569
* Use the i386_set_gsbase() syscall if it is implemented in the kernel.Peter Wemm2005-04-142-16/+41
| | | | | | | | This is a little hairy here because the allocation and usage of this functionality is split into two places in libpthread. Notes: svn path=/head/; revision=145039
* Use the new atomic_cmpset_32().Olivier Houchard2005-04-071-15/+0
| | | | Notes: svn path=/head/; revision=144765
* Eliminate plt relocation for kse_switchin.David Xu2005-03-212-0/+2
| | | | Notes: svn path=/head/; revision=143946
* Change the spin lock logic to a reasonable one. We should spin whenXin LI2005-02-271-1/+1
| | | | | | | | | | | | the lock is held by other thread, but not when nobody owns it. According to deischen@, this part of code will never be hit in our threads library, since it does not use locks without wait/wakeup functions. Spotted by: mingyanguo via ChinaUnix.net forum Reviewed by: deischen Notes: svn path=/head/; revision=142670
* Bring in a more healthy version of the libpthread for arm, which usesOlivier Houchard2005-02-264-4/+12
| | | | | | | ARM_TP_ADDRESS. Notes: svn path=/head/; revision=142571
* Somewhere along the line, tick accumulation for SA threads wasDaniel Eischen2005-02-181-1/+1
| | | | | | | | | | changed to use the statclock. Make sure we calculate the value of a tick correctly in userland. Noticed by: Kazuaki Oda <kaakun at highway dot ne dot jp> Notes: svn path=/head/; revision=142047
* Set the default guardsize and stacksize in the default threadDaniel Eischen2005-02-151-0/+2
| | | | | | | attribute when the library is initialized. Notes: svn path=/head/; revision=141949
* Increase the default stacksizes:Daniel Eischen2005-02-134-9/+22
| | | | | | | | | 32-bit 64-bit main thread 2MB 4MB other threads 1MB 2MB Notes: svn path=/head/; revision=141822
* Don't panic when sigsuspend is interrupted by a cancellation.Daniel Eischen2004-12-191-2/+7
| | | | | | | PR: 75273 Notes: svn path=/head/; revision=139052
* Use a generic way to back threads out of wait queues when handlingDaniel Eischen2004-12-1817-347/+412
| | | | | | | | | | | | | | | | | | | | | | | | | | | | signals instead of having more intricate knowledge of thread state within signal handling. Simplify signal code because of above (by David Xu). Use macros for libpthread usage of pthread_cleanup_push() and pthread_cleanup_pop(). This removes some instances of malloc() and free() from the semaphore and pthread_once() implementations. When single threaded and forking(), make sure that the current thread's signal mask is inherited by the forked thread. Use private mutexes for libc and libpthread. Signals are deferred while threads hold private mutexes. This fix also breaks www/linuxpluginwrapper; a patch that fixes it is at http://people.freebsd.org/~deischen/kse/linuxpluginwrapper.diff Fix race condition in condition variables where handling a signal (pthread_kill() or kill()) may not see a wakeup (pthread_cond_signal() or pthread_cond_broadcast()). In collaboration with: davidxu Notes: svn path=/head/; revision=139023
* i386_set_ldt() is not available when running 32 bit binaries on amd64Peter Wemm2004-11-062-0/+13
| | | | | | | | kernels. Use the recently exposed direct-set routines instead. This is only activated for when we compile i386 support libraries on amd64. Notes: svn path=/head/; revision=137295
* Cosmetic tweaks to reduce diffs to the i386 counterpart.Peter Wemm2004-11-061-2/+3
| | | | Notes: svn path=/head/; revision=137294
* Partial support of KSE for arm.Olivier Houchard2004-11-054-59/+66
| | | | Notes: svn path=/head/; revision=137283
* Save cancelflags in signal frame, this fixes a problem thatDavid Xu2004-11-012-0/+3
| | | | | | | | | | a thread in pthread_cond_wait handled a signal can no longer be canceled. Reviewed by: deischen Notes: svn path=/head/; revision=137105
* Make pthread_mutex_trylock(3) return EBUSY on failure, as all softwareBrian Feldman2004-10-311-8/+1
| | | | | | | | | | | | packages expect and seems to be most correct according to the slightly- ambiguous standards. MFC after: 1 month Corroborated by: POSIX <http://tinyurl.com/4uvub> Reviewed by: silence on threads@ Notes: svn path=/head/; revision=137095
* For variables that are only checked with defined(), don't provideRuslan Ermilov2004-10-241-1/+1
| | | | | | | any fake value. Notes: svn path=/head/; revision=136910
* Check unhandled signals before thread marks itself as DEAD,David Xu2004-10-231-1/+14
| | | | | | | | this reduces chances of signal losting problem found by Peter Holm <peter@holm.cc> Notes: svn path=/head/; revision=136847
* 1. Move thread list flags into new separate member, and atomicallyDavid Xu2004-10-235-24/+45
| | | | | | | | | | | | | | put DEAD thread on GC list, this closes a race between pthread_join and thr_cleanup. 2. Introduce a mutex to protect tcb initialization, tls allocation and deallocation code in rtld seems no lock protection or it is broken, under stress testing, memory is corrupted. Reviewed by: deischen patch partly provided by: deischen Notes: svn path=/head/; revision=136846
* Decrease reference count if we won't use the thread, this avoids memoryDavid Xu2004-10-211-0/+4
| | | | | | | leak under some cases. Notes: svn path=/head/; revision=136735
* if system scope thread didn't set timeout, don't call clock_gettime syscallDavid Xu2004-10-081-8/+9
| | | | | | | | | before and after sleeping. Reviewed by: deischen Notes: svn path=/head/; revision=136286
* Use PTHREAD_SCOPE_SYSTEM to decide what should be done.David Xu2004-10-071-3/+2
| | | | Notes: svn path=/head/; revision=136227
* Follow kernel change, restore signal mask correctly by using a commandDavid Xu2004-10-071-21/+17
| | | | | | | of kse_thr_interrupt. Notes: svn path=/head/; revision=136223
* Allocate red zone and stack space together and then split red zone fromDavid Xu2004-10-061-7/+17
| | | | | | | | allocated space, orignal code left red zone unallocated, but those space can be allocated by user code, and result was providing no protection. Notes: svn path=/head/; revision=136190
* Add a wrapper for execve(). The exec'd process must be started withDaniel Eischen2004-09-263-0/+71
| | | | | | | | | | | | | | | | | the signal mask and pending signals of the calling thread. These are stored in userland in libpthread. There is a small race condition in this patch which could cause problems if a signal arrives after setting the (kernel) signal mask and before exec'ing. The thread's set of pending signals also are not yet installed in the exec'd process. Both of these will be corrected with the addition of a special syscall. Reported & Tested by: Joost Bekkers <joost at jodocus dot org> Reviewed by: julian, davidxu Notes: svn path=/head/; revision=135809
* _tcb_ctor takes two args.Olivier Houchard2004-09-242-2/+2
| | | | Notes: svn path=/head/; revision=135735
* Make sure we don't call _thr_start_sig_daemon() when SYSTEM_SCOPE_ONLY is ↵Suleiman Souhlal2004-09-241-2/+3
| | | | | | | | | defined. This makes libpthread usable on powerpc. Approved by: grehan (mentor), deischen Notes: svn path=/head/; revision=135714
* Add missing brackets. It was committed from wrong tree.David Xu2004-08-261-1/+1
| | | | Notes: svn path=/head/; revision=134326
* gcc -O2 cleanup. tested for a long time.David Xu2004-08-252-4/+4
| | | | | | | Reviewed by: deischen Notes: svn path=/head/; revision=134319
* Pull debug symbols in for statically linked binary.David Xu2004-08-211-0/+4
| | | | | | | Reviewed by: desichen Notes: svn path=/head/; revision=134115
* Fix compile, s/tp_dtv/tp_tdv/g.David Xu2004-08-164-4/+4
| | | | Notes: svn path=/head/; revision=133857
* Bring PPC up to date with latest TLS changes.Peter Grehan2004-08-162-3/+3
| | | | Notes: svn path=/head/; revision=133806
* 1. Add macro DTV_OFFSET to calculate dtv offset in tcb.David Xu2004-08-1610-3/+30
| | | | | | | 2. Export symbols needed by debugger. Notes: svn path=/head/; revision=133801
* Add a file to collection all symbols will be needed by debugger.David Xu2004-08-161-0/+60
| | | | Notes: svn path=/head/; revision=133800
* Add TLS support for i386 and amd64.Doug Rabson2004-08-1511-34/+43
| | | | Notes: svn path=/head/; revision=133756
* As long as we have a knob to force system scope threads, why not haveDaniel Eischen2004-08-124-8/+13
| | | | | | | | | | | | | | | | a knob to force process scope threads. If the environment variable LIBPTHREAD_PROCESS_SCOPE is set, force all threads to be process scope threads regardless of how the application creates them. If LIBPTHREAD_SYSTEM_SCOPE is set (forcing system scope threads), it overrides LIBPTHREAD_PROCESS_SCOPE. $ # To force system scope threads $ LIBPTHREAD_SYSTEM_SCOPE=anything threaded_app $ # To force process scope threads $ LIBPTHREAD_PROCESS_SCOPE=anything threaded_app Notes: svn path=/head/; revision=133563
* Check debugger suspending flag for system scope thread.David Xu2004-08-081-3/+7
| | | | | | | Reviewed by: deischen Notes: svn path=/head/; revision=133344
* Add a way to force 1:1 mode for libpthread. To do this, defineDaniel Eischen2004-08-075-42/+41
| | | | | | | | | | | | | | LIBPTHREAD_SYSTEM_SCOPE in the environment. You can still force libpthread to be built in strictly 1:1 by adding -DSYSTEM_SCOPE_ONLY to CFLAGS. This is kept for archs that don't yet support M:N mode. Requested by: rwatson Reviewed by: davidxu Notes: svn path=/head/; revision=133269
* s/TMDF_DONOTRUNUSER/TMDF_SUSPEND/gDavid Xu2004-08-033-4/+4
| | | | | | | Dicussed with: deischen Notes: svn path=/head/; revision=133047
* Save context in kernel fashion, so it can be restored byDavid Xu2004-07-311-2/+5
| | | | | | | kse_switchin syscall. Notes: svn path=/head/; revision=132928
* Remove unused field.David Xu2004-07-311-1/+0
| | | | Notes: svn path=/head/; revision=132927