summaryrefslogtreecommitdiffstats
path: root/lib/libthr
Commit message (Collapse)AuthorAgeFilesLines
* Sort function names.davidxu2005-10-041-2/+2
|
* Add function pthread_timedjoin_np, the function is similar with pthread_joindavidxu2005-10-042-9/+51
| | | | | except the function will return ETIMEDOUT if target thread does not exit before specified absolute time passes.
* Include needed headers that were obtained through <pthread.h>. Sort headersstefanf2005-09-013-1/+4
| | | | while here.
* - Prefix MUTEX_TYPE_MAX with PTHREAD_ to avoid namespace pollution.stefanf2005-08-192-3/+3
| | | | | | - Remove the macros MUTEX_TYPE_FAST and MUTEX_TYPE_COUNTING_FAST. OK'ed by: deischen
* Add usleep to the map files.deischen2005-08-031-0/+2
| | | | Noticed by: davidxu
* Add a cancellation point for usleep().deischen2005-08-031-0/+19
| | | | | While here, fix sleep() so that it is also a cancellation point (a missing weak reference prevented that).
* Cast to uintptr_t to avoid compiler warning, it was broken bydavidxu2005-07-281-6/+12
| | | | the recent atomic_ptr() change.
* Bump the shared library version number of all libraries that have notkensmith2005-07-221-1/+1
| | | | | | | been bumped since RELENG_5. Reviewed by: ru Approved by: re (not needed for commit check but in principle...)
* Fix off-by-one nanosecond bug in macro TIMESPEC_ADD.davidxu2005-06-221-1/+1
| | | | | | Reviewed by: deischen Approved by: re (dwhite) MFC after : 4 days
* Markup fixes.ru2005-06-161-2/+5
| | | | Approved by: re
* Remove incorrect BUGS entry: libthr does support process-scope threadrwatson2005-06-151-5/+0
| | | | | | | | scheduling. MFC after: 1 week Submitted by: davidxu Approved by: re (scottl)
* Add a stub libthr(3) man page to document what it is and why, as well asrwatson2005-06-112-0/+74
| | | | | | | | | to point at libmap.conf(5). This will help answer questions about what and why it is, although not in great detail. Approved by: re (scottl) MFC after: 1 week MFC note: When MFC'd, don't MFC mention of work not yet MFC'd.
* Remove COMPAT_32BIT, it is no longer needed.davidxu2005-04-271-5/+0
|
* Remove unused variable.davidxu2005-04-231-1/+0
|
* Now libthr only uses GDT based tls on i386. using LDT can only increasedavidxu2005-04-232-53/+3
| | | | clock cycles and has 8191 threads limitation.
* Use thr_new syscall to create a new thread, obscure context operationsdavidxu2005-04-233-24/+39
| | | | is no longer needed.
* Add i386_get_gsbase, i386_set_gsbase since old libc doesn't have thedavidxu2005-04-231-0/+14
| | | | functions, otherwise user ports have to be rebuilt.
* Adapt the libpthread patch for using i386_set_gsbase() to libthr.peter2005-04-142-16/+41
|
* Conditionally report initial thread event.davidxu2005-04-121-1/+2
|
* Add missing event reporting code.davidxu2005-04-121-0/+65
|
* Add debugger event reporting support, current only TD_CREATE and TD_DEATHdavidxu2005-04-129-16/+64
| | | | events are reported.
* Use the new atomic_cmpset_32().cognet2005-04-072-20/+0
|
* Adjust hash function for smaller pthread structure size.davidxu2005-04-071-1/+1
|
* Remove unique id field which is no longer used by debugger.davidxu2005-04-063-15/+2
|
* Remove debug symbol from installed library, one can alwaysdavidxu2005-04-061-1/+1
| | | | use compiled version in libthr directory.
* Pass exact number of threads.davidxu2005-04-041-1/+1
|
* Export pthread_condattr_getclock, pthread_condattr_setclock.davidxu2005-04-031-0/+2
|
* Import my recent 1:1 threading working. some features improved includes:davidxu2005-04-0277-4641/+7200
| | | | | | | | | | | | | | | | 1. fast simple type mutex. 2. __thread tls works. 3. asynchronous cancellation works ( using signal ). 4. thread synchronization is fully based on umtx, mainly, condition variable and other synchronization objects were rewritten by using umtx directly. those objects can be shared between processes via shared memory, it has to change ABI which does not happen yet. 5. default stack size is increased to 1M on 32 bits platform, 2M for 64 bits platform. As the result, some mysql super-smack benchmarks show performance is improved massivly. Okayed by: jeff, mtm, rwatson, scottl
* Increase the default stacksizes:marcus2005-03-063-15/+31
| | | | | | | | | 32-bit 64-bit main thread 2 MB 4 MB other threads 1 MB 2 MB Approved by: mtm Adapted from: libpthread
* Fix inverted #ifdef that I added. Who had the pointy hat last?peter2004-12-061-1/+1
| | | | Submitted by: kan
* Don't include sys/user.h merely for its side-effect of recursivelydas2004-11-273-2/+5
| | | | including other headers.
* Use the recently exposed fs/gs set functions when compiling libthr topeter2004-11-061-0/+12
| | | | | | | run as a 32 bit support library for an amd64 kernel. 32 bit consumers of libthr have zero chance of running on an amd64 kernel since we don't implement the i386_set_ldt() family of functions. Note that this commit doesn't make it actually work, it just removes one more obstacle.
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* 1. Now that it's a thread's state is changed from within the kernel, wheremtm2004-10-132-4/+10
| | | | | | | | | | | | | | no userland locks are heald, the dead thread lock can no longer protect access to it. Therefore, instead of using an if (!dead)...else clause after walking the active threads list test the thread pointer before deciding not to walk the dead threads list. If the thread pointer is null it means it was not found in the active threads list and the dead threads list should be checked. 2. Do not free the stack of a thread that is not marked dead. This is the 2nd and final part of eliminating the race to free a thread's stack. MFC after: 3 days
* Remove a reference to a non-existent syscall: _thr_exit(). Themtm2004-10-081-4/+1
| | | | actual name is thr_exit(). How this ever worked is beyond me.
* Close a race between a thread exiting and the freeing of it's stack.mtm2004-10-061-3/+2
| | | | | | | | | After some discussion the best option seems to be to signal the thread's death from within the kernel. This requires that thr_exit() take an argument. Discussed with: davidxu, deischen, marcel MFC after: 3 days
* Remove vestiges of libthr's signal mangling past. This fixes that lastmtm2004-09-221-14/+1
| | | | known problem with mysql on libthr: not being able to kill mysqld.
* The SUSv3 function say that the affected functions MAY FAIL, if themtm2004-09-221-27/+6
| | | | | | | | | | | | specified mutex is invalid. In spec parlance 'MAY FAIL' means it's up to the implementor. So, remove the check for NULL pointers for two reasons: 1. A mutex may be invalid without necessarily being NULL. 2. If the pointer to the mutex is NULL core-dumping in the vicinity of the problem is much much much better than failing in some other part of the code (especially when the application doesn't check the return value of the function that you oh so helpfully set to EINVAL).
* Implement cancellation points in libc interfaces, as specified by POSIX.mtm2004-09-162-0/+314
|
* Adjust code to support AMD64, on AMD64, thread needs to set fsbase bydavidxu2004-08-193-7/+31
| | | | | itself before it can execute any other code, so new thread should be created with all signals are masked until after fsbase is set.
* Add AMD64 support code.davidxu2004-08-192-0/+106
|
* Add rtld-elf to the include path for the rtld to pthread TLS interface.dfr2004-08-151-0/+1
|
* Add TLS support for libthr on i386.dfr2004-08-152-74/+29
|
* o Assertions to catch that stuff that shouldn't happen is not happening.mtm2004-07-303-20/+19
| | | | | | | | | | o In the rwlock code: move a duplicated check inside an if..else to after the if...else clause. o When initializing a static rwlock move the initialization check inside the lock. o In thr_setschedparam.c: When breaking out of the trylock...retry if busy loop make sure to reset the mtx pointer to null if the mutex is nolonger in a queue.
* Define _libthr_debug for use by libthread_db.marcel2004-07-181-0/+9
|
* Record the offset of thr_id in the thread structure. Required formarcel2004-07-041-0/+1
| | | | debugging.
* Change the thread ID (thr_id_t) used for 1:1 threading from being amarcel2004-07-024-19/+9
| | | | | | | | | | | | | | | | | | | | pointer to the corresponding struct thread to the thread ID (lwpid_t) assigned to that thread. The primary reason for this change is that libthr now internally uses the same ID as the debugger and the kernel when referencing to a kernel thread. This allows us to implement the support for debugging without additional translations and/or mappings. To preserve the ABI, the 1:1 threading syscalls, including the umtx locking API have not been changed to work on a lwpid_t. Instead the 1:1 threading syscalls operate on long and the umtx locking API has not been changed except for the contested bit. Previously this was the least significant bit. Now it's the most significant bit. Since the contested bit should not be tested by userland, this change is not expected to be visible. Just to be sure, UMTX_CONTESTED has been removed from <sys/umtx.h>. Reviewed by: mtm@ ABI preservation tested on: i386, ia64
* When a thread is created suspended have libthr suspend it explicitlymtm2004-06-301-10/+3
| | | | instead of asking the kernel to do it when we create the thread.
* Implement pthread_atfork in libthr. This is mostly from deichen'smtm2004-06-275-0/+133
| | | | | | work in libpthread. Submitted by: Dan Nelson <dnelson@allantgroup.com>
* In the case that the global thread list is being re-initialized aftermtm2004-06-271-4/+4
| | | | | | a fork, make sure that the current thread isn't detached and freed. As a consequence the thread should be inserted into the head of the active list only once (in the beginning).
OpenPOWER on IntegriCloud