summaryrefslogtreecommitdiff
path: root/lib/libpthread
AgeCommit message (Collapse)Author
2019-02-13Remove IMPLEMENTATION NOTES, they only apply to one of the two in-treeMartin Pieuchot
implementations. Pointed out by pirofti@
2019-02-04tweak previous;Jason McIntyre
2019-02-04add a pthread_get_name_np to match pthread_set_name_np.Ted Unangst
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.Martin Pieuchot
ok kettenis@, visa@
2019-01-12Move sigwait(3) from libpthread to libcJeremie Courreges-Anglas
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.Paul Irofti
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 andTheo de Raadt
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 thePhilip Guenther
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 realTheo de Raadt
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 lineIngo Schwarze
2016-03-30some Xr adjustment to catch up with MLINKS removal;Jason McIntyre
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
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,Jason McIntyre
or otherwise change Dt to reflect the name of an existing function; feedback/ok schwarze
2015-09-22fix function name.Igor Sobrado
2015-09-22typo (s/intialization/initialization/).Igor Sobrado
2015-09-14in the SYNOPSIS, make void function arguments explicitIngo Schwarze
2015-09-14use .Va for global variables, and .Vt where the type is includedIngo Schwarze
2015-09-10use .In rather than .Fd #includeIngo Schwarze
2015-05-15trailing whitespace;Jason McIntyre
2015-05-12Document pthread_atfork(3)'s interaction with dlclose(3)Philip Guenther
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 byMark Kettenis
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 useJason McIntyre
"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;Ingo Schwarze
im going to delete support for it from mandoc(1)
2014-08-31accept4() should be a cancellation point.Philip Guenther
Update the list in the pthread_testcancel(3) manpage: several were missing. noted by miod@
2014-08-30Xr __tfork instead of forkPhilip Guenther
2014-07-16zap trailing newlines; "go for it" deraadtOkan Demirmen
2014-03-06sync with header;Jason McIntyre
From: Gabriel Linder
2014-01-21obvious .Pa fixes; found with mandocdb(8)Ingo Schwarze
2014-01-03sort SEE ALSO;Jason McIntyre
2014-01-03some more information, based on a diff by sven falempinTed Unangst
2013-11-20spelling fix;Jason McIntyre
2013-11-20this implementation may now be capable of shared semaphoresTed Unangst
2013-11-20more detail on error conditionsTed Unangst
2013-11-19tweak previous;Jason McIntyre
2013-11-19slightly betterTed Unangst
2013-11-18boilerplate documentationTed Unangst
2013-08-14no longer any need to quote macro lines with >9 args;Jason McIntyre
From: Jan Stary
2013-07-16use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@Ingo Schwarze
2013-06-24space needed before punctuation;Jason McIntyre
2013-06-17Add support for the _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME options,Philip Guenther
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 schwarzeTed Unangst
2013-06-02somehow missed spinlock.h here. broke bmercer's build.Ted Unangst
2013-06-01cleanup and consolidate the spinlock_lock (what a name!) code.Ted Unangst
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 SteinbuschStuart Henderson
2013-03-26needs sys/cdefs.h because a case has been found where it is pulledTheo de Raadt
independently; spotted by sthen/naddy
2013-03-24SEM_VALUE_MAX belongs in <limits.h> (via sys/syslimits.h)Philip Guenther
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 wantsTheo de Raadt
the MI sys/limits.h, and has been getting lucky that all callers had already pulled that in via other means.
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-11-05typedef pthread_key_t to an int instead of a volatile int, reverts a chunkLandry Breuil
from r1.11. This allows webkit with --enable-debug to build, and is in line with what FreeBSD/NetBSD uses. ok kettenis@ guenther@
2012-09-11pthread_sigmask() doesn't require <pthread.h>, only <signal.h>.Matthew Dempsky
Pointed out by Brad.