summaryrefslogtreecommitdiffstats
path: root/lib/librthread/rthread_np.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* make fixed-sized fixed-value mib[] arrays be constderaadt2020-10-121-4/+2
| | | | ok guenther tb millert
* add a pthread_get_name_np to match pthread_set_name_np.tedu2019-02-041-1/+7
| | | | | | could be useful in ports. initial diff by David Carlier some time ago. ok jca
* Move mutex, condvar, and thread-specific data routes, pthread_once, andguenther2017-09-051-1/+4
| | | | | | | | pthread_exit from libpthread to libc, along with low-level bits to support them. Major bump to both libc and libpthread. Requested by libressl team. Ports testing by naddy@ ok kettenis@
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-071-7/+6
| | | | | | | | | | | | | | | | | This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable! Make libpthread dlopen'able by moving the cancelation wrappers into libc and doing locking and fork/errno handling via callbacks that libpthread registers when it first initializes. 'errno' *must* be declared via <errno.h> now! Clean up libpthread's symbol exports like libc. On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec. Testing by various, particularly sthen@ and patrick@ ok kettenis@
* Eliminate the need to explicitly invoke syscalls via their _thread_sys_*guenther2016-04-021-1/+3
| | | | | | | aliases by using a macro REDIRECT_SYSCALL() to map the symbols. Apply that to getthrid(), sysctl(), and issetugid() as well. ok mpi@ beck@
* Add back <sys/param.h>; it's needed for MACHINE_STACK_GROWS_UP.kettenis2015-01-241-1/+2
| | | | ok millert@, tobiasu@
* Move to the <limits.h> universe.deraadt2015-01-161-2/+1
| | | | review by millert, binary checking process with doug, concept with guenther
* avoid void arithmetic. from david carliertedu2014-12-081-2/+3
|
* Only need <stdint.h> and not <inttypes.h> hereguenther2014-08-091-2/+2
|
* decouple struct uvmexp into a new file, so that uvm_extern.h and sysctl.hderaadt2014-07-081-2/+1
| | | | | don't need to be married. ok guenther miod beck jsing kettenis
* Use a flag on the pthread_t to indicate that the thread's stack wasguenther2014-07-011-2/+2
| | | | | | allocated by the kernel's execve bits. ok matthew@
* - Adjust pthread_stackseg_np to return the page aligned addressable stackkurt2014-05-021-4/+11
| | | | range. okay kettenis@, guenther@, deraadt@
* Don't try to reuse _initial_thread in the fork() wrapper, as theguenther2013-11-291-2/+3
| | | | | | | | | thread's existing handle must continue to be valid and it didn't fully 'change' the thread handle anyway. For pthread_main_np(), use a new flag, THREAD_ORIGINAL, to indicate that the flagged thread is the original thread for *this* process. Fixes some ConsoleKit failures according to aja@
* use sysctl vm.psstrings to calculate stack bounds, rather than USRSTACK.deraadt2013-11-131-18/+31
| | | | long discussions with guenther, kurt, kettenis etc etc etc
* - Don't include guard pages in the stack size.kurt2013-03-311-7/+4
| | | | | | From Christian Schulte (cs at schulte.it) - Use stack->sp instead of recalculating it. From guenther@ okay guenther@
* Fix the handling of the stackaddr, stacksize, and guardsize attributes:guenther2012-02-181-10/+7
| | | | | | | | | | | don't try to merge values, round the sizes separately, and don't try to unmap application-supplied stacks. Copy from uthread the caching of default-sized stacks. Have pthread_attr_init() and pthread_create() get the default attributes from staticly allocated pthread_attr_t. Cache the pagesize in _rthread_init() and provide a macro for rounding to it based on suggestions from kettenis@ and tedu@, ok kettenis@
* pthread_self() may be much cheaper and never more expensive than getthrid()guenther2011-12-281-2/+2
| | | | so prefer it for identifying the current thread
* Report the correct stack size and top for the primordial thread inkurt2007-07-081-16/+21
| | | | pthread_stackseg_np(). With input and okay marc@
* make rthreads compile againhenning2006-04-121-2/+2
| | | | pthreads header changed, char * -> const char *
* Nicer implementation of pthread_main_np(), which avoids the spinlock.otto2006-01-011-7/+2
| | | | ok tedu@ marc@
* use queue.h macros for thread house keeping; make some vars non-staticotto2005-12-301-3/+1
| | | | and fix a bug in thread creation error path. ok tedu@
* Put the existing _np functions into separate file; introduceotto2005-12-291-0/+99
pthread_stackseg_np(), from existing pthread lib. discussed with tedu@ ok marc@