summaryrefslogtreecommitdiffstats
path: root/lib/librthread/rthread_stack.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix mmap() flag usage: explicitly specify MAP_PRIVATE and drop uselessmatthew2014-06-271-2/+3
| | | | | | MAP_FILE and MAP_HASSEMAPHORE flags. Discussed with deraadt, tedu, and kettenis
* Provide a random stackgrap on pthread frames. Use _STACKALIGNBYTES toderaadt2013-12-181-5/+15
| | | | | | ensure the frames are aligned correctly. Discussed at length with guenther and kettenis ok kettenis, this is the right first step
* cleanup and consolidate the spinlock_lock (what a name!) code.tedu2013-06-011-2/+2
| | | | | | | | | | it's now atomic_lock to better reflect its usage, and librthread now features a new spinlock that's really a ticket lock. thrlseep can handle both types of lock via a flag in the clock arg. (temp back compat hack) remove some old stuff that's accumulated along the way and no longer used. some feedback from dlg, who is concerned with all things ticket lock. (you need to boot a new kernel before installing librthread)
* Do not need machine/param.hderaadt2013-03-211-4/+2
|
* Fix caching of stacks allocated with the default attributes.guenther2012-08-041-6/+8
| | | | based on a diff from Christian Schulte (cs at schulte.it)
* Use 'base' as an intermediate char* variable to avoid void* arithmeticguenther2012-02-191-4/+4
|
* Fix the handling of the stackaddr, stacksize, and guardsize attributes:guenther2012-02-181-52/+90
| | | | | | | | | | | 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@
* Move <machine/spinlock.h> into rthread.h; strip out unnecessary #includesguenther2011-11-061-2/+1
|
* If the stack size attribute isn't larger than the guard-page sizeguenther2010-05-261-1/+3
| | | | | | attribute then make pthread_create() return EINVAL instead of whatever was in errno on entry (possibly making it appear it succeeded when it really failed). Encountered by Jung (moorang at gmail.com).
* two comment typos from tberttedu2006-10-271-2/+2
|
* Remove redundant mprotect() calls (we're unmapping the region anyway)otto2006-01-051-5/+1
| | | | and check user stack for proper alignment. ok tedu@ marc@
* thread stack handling changes. Add guard zones and allow stackmarc2006-01-011-0/+92
size (and guard zone size) to be set using pthread_attr. Guard zones are specified in bytes, but implemented in terms of a page size. OK Otto@