summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
AgeCommit message (Collapse)AuthorFilesLines
2020-12-03There are special rules regarding the memory passed to pthread_attr_setstack().otto1-7/+8
ok semarie@
2020-04-06Update my email address.pirofti7-21/+21
2020-04-03Clarify conditions in which pthread_mutex_destroy(3) returns EBUSY.stsp1-3/+3
It happens not just if the mutex is locked by another thread, but also if any other threads refer to the mutex (e.g. by waiting for the lock). ok guenther
2019-02-13Remove IMPLEMENTATION NOTES, they only apply to one of the two in-treempi2-8/+4
implementations. Pointed out by pirofti@
2019-02-04tweak previous;jmc2-7/+8
2019-02-04add a pthread_get_name_np to match pthread_set_name_np.tedu2-4/+14
could be useful in ports. initial diff by David Carlier some time ago. ok jca
2019-01-29Tweak description, pthread_cond_signal(3) unblocks *at least* one thread.mpi1-3/+3
ok kettenis@, visa@
2019-01-12Move sigwait(3) from libpthread to libcjca2-87/+1
POSIX wants it in libc, that's where the function can be found on other systems. Reported by naddy@, input from naddy@ and guenther@. "looks ok" guenther@, ok deraadt@ Note: riding the libc/libpthread major cranks earlier today.
2018-04-24Validate timespec and return ECANCELED when interrupted with SA_RESTART.pirofti1-2/+17
Discussing with mpi@ and guenther@, we decided to first fix the existing semaphore implementation with regards to SA_RESTART and POSIX compliant returns in the case where we deal with restartable signals. Currently we return EINTR everywhere which is mostly incorrect as the user can not know if she needs to recall the syscall or not. Return ECANCELED to signal that SA_RESTART was set and EINTR otherwise. Regression tests pass and so does the posixsuite. Timespec validation bits are needed to pass the later. OK mpi@, guenther@
2018-04-12Implement MAP_STACK option for mmap(). Synchronous faults (pagefault andderaadt2-4/+27
syscall) confirm the stack register points at MAP_STACK memory, otherwise SIGSEGV is delivered. sigaltstack() and pthread_attr_setstack() are modified to create a MAP_STACK sub-region which satisfies alignment requirements. Observe that MAP_STACK can only be set/cleared by mmap(), which zeroes the contents of the region -- there is no mprotect() equivalent operation, so there is no MAP_STACK-adding gadget. This opportunistic software-emulation of a stack protection bit makes stack-pivot operations during ROPchain fragile (kind of like removing a tool from the toolbox). original discussion with tedu, uvm work by stefan, testing by mortimer ok kettenis
2017-10-15Move the thread-related .h files to /usr/src/include/, since theguenther5-516/+0
implementation is now spread between libc and librthread. No changes to the content ok mpi@
2017-05-29It is distasteful to have manual pages which don't refer to realderaadt1-3/+3
function calls, but instead a "class" of functions like "sigsetops". Rename to sigaddset", and while at it improve documentation in sigprocmask(2) to point to it. ok tedu
2017-01-27new sentence, new lineschwarze2-7/+9
2016-03-30some Xr adjustment to catch up with MLINKS removal;jmc1-3/+3
2016-03-30for some time now mandoc has not required MLINKS to functionjmc1-44/+1
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
2015-11-10update NAME section to include all documented functions,jmc2-6/+6
or otherwise change Dt to reflect the name of an existing function; feedback/ok schwarze
2015-09-22fix function name.sobrado1-3/+3
2015-09-22typo (s/intialization/initialization/).sobrado1-3/+3
2015-09-14in the SYNOPSIS, make void function arguments explicitschwarze1-3/+3
2015-09-14use .Va for global variables, and .Vt where the type is includedschwarze1-9/+4
2015-09-10use .In rather than .Fd #includeschwarze1-3/+3
2015-05-15trailing whitespace;jmc1-3/+3
2015-05-12Document pthread_atfork(3)'s interaction with dlclose(3)guenther1-8/+21
Use Xr instead of Fn for functions documented on other manpages ok millert@ jmc@ schwarze@
2015-03-19Provide #defines for the mutex types as required by POSIX. Pointed out bykettenis1-9/+6
guenther@ and found out the hard way by landry@ ok guenther@
2015-03-13remove the first comma from constructs like ", and," and ", or,": you can usejmc1-3/+3
"and" and "or" to join sentence clauses, and you can use commas, but both hinders reading;
2014-11-30do not use .St -p1003.1d-99 which is used in exactly two pages;schwarze1-4/+4
im going to delete support for it from mandoc(1)
2014-08-31accept4() should be a cancellation point.guenther1-2/+7
Update the list in the pthread_testcancel(3) manpage: several were missing. noted by miod@
2014-08-30Xr __tfork instead of forkguenther1-3/+3
2014-07-16zap trailing newlines; "go for it" deraadtokan2-4/+2
2014-03-06sync with header;jmc1-3/+3
From: Gabriel Linder
2014-01-21obvious .Pa fixes; found with mandocdb(8)schwarze1-3/+3
2014-01-03sort SEE ALSO;jmc1-3/+3
2014-01-03some more information, based on a diff by sven falempintedu1-3/+10
2013-11-20spelling fix;jmc1-2/+2
2013-11-20this implementation may now be capable of shared semaphorestedu1-17/+8
2013-11-20more detail on error conditionstedu1-7/+14
2013-11-19tweak previous;jmc1-2/+3
2013-11-19slightly bettertedu1-31/+25
2013-11-18boilerplate documentationtedu1-7/+11
2013-08-14no longer any need to quote macro lines with >9 args;jmc1-3/+3
From: Jan Stary
2013-07-16use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@schwarze1-7/+7
2013-06-24space needed before punctuation;jmc1-3/+3
2013-06-17Add support for the _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME options,guenther4-4/+73
including CLOCK_{PROCESS,THREAD}_CPUTIME_ID constants and {clock,pthread}_getcpuclockid() functions. Worked out at t2k13 with help from tedu@ and matthew@ and testing by aja@ ok matthew@
2013-06-05use fancy .In macro for includes. from Jan Klemkow. ok jmc schwarzetedu69-211/+211
2013-06-02somehow missed spinlock.h here. broke bmercer's build.tedu1-2/+2
2013-06-01cleanup and consolidate the spinlock_lock (what a name!) code.tedu1-78/+0
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)
2013-04-14typo; Benedikt Steinbuschsthen1-3/+3
2013-03-26needs sys/cdefs.h because a case has been found where it is pulledderaadt1-3/+3
independently; spotted by sthen/naddy
2013-03-24SEM_VALUE_MAX belongs in <limits.h> (via sys/syslimits.h)guenther1-10/+3
struct sem --> struct __sem (doesn't belong in public namespace) Zap pointless _KERNEL tests ok deraadt@
2013-03-24machine/limits.h does not contain everything this file wants. It wantsderaadt1-2/+2
the MI sys/limits.h, and has been getting lucky that all callers had already pulled that in via other means.