summaryrefslogtreecommitdiffstats
path: root/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Merge pthread_mutex_trylock(3) into pthread_mutex_lock(3) and documentguenther2012-02-243-90/+108
| | | | | | pthread_mutex_timedlock() in that same page ok fgsch@, brad@, as well as jmc@, who also fixed a bunch of nits
* PTHREAD_MUTEX_NORMAL mutexes are supposed to self-deadlock, not abort.guenther2012-02-231-3/+16
| | | | | That deadlock can be exited via a timeout for pthread_mutex_timedlock(). Unwind all the state when pthread_mutex_timedlock() times out
* Add pthread_condattr_{get,set}clock(), requested by aja@guenther2012-02-235-46/+122
| | | | Add pthread_mutex_timedlock(), requested by dcoppa@
* Make pthread_suspend_np() and pthread_resume_np() simply fail insteadguenther2012-02-211-11/+6
| | | | of doing the Wrong Thing.
* Fix return value documentation errors in usbhid(3).stsp2012-02-191-6/+8
| | | | | | | hid_dispose_report_desc() returns void, it can't return NULL on failure. hid_get_report_desc() and hid_use_report_desc() return NULL on failure but this was not documented. ok jmc
* Fix problems revealed by regress/lib/libpthread/stack/stack.cguenther2012-02-191-11/+8
|
* Use 'base' as an intermediate char* variable to avoid void* arithmeticguenther2012-02-191-4/+4
|
* Extend miod's fix CFLAGS fix to all gcc2 platforms (suggested by Tobiasguenther2012-02-191-3/+5
| | | | Ulmer). Only pull in bsd.lib.mk once to avoid linking objects twice
* Use a form of designated initializer that works with gcc2guenther2012-02-191-2/+7
| | | | lint doesn't understand designated initializers, so hide them from it
* Validate in pthread_attr_set{scope,sched{param,policy},inheritsched}()guenther2012-02-192-3/+16
| | | | the requested new value
* Fix previous commit: _rthread_init() was static.guenther2012-02-183-15/+22
| | | | Improve consistency of error naming
* Before using _thread_pagesize, make sure _rthread_init() has been calledguenther2012-02-181-1/+5
|
* id tag.fgsch2012-02-181-0/+1
|
* Fix the handling of the stackaddr, stacksize, and guardsize attributes:guenther2012-02-185-101/+141
| | | | | | | | | | | 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@
* Missing cerror bits.miod2012-02-181-0/+55
|
* Work around compiler confusion while building rthread.o on vax.miod2012-02-181-2/+6
|
* Extend after recent msdos support.ajacoutot2012-02-181-4/+5
| | | | input/ok krw@ thib@ jmc@
* Initialize the scope, policy, and inherit members in pthread_attr_init()guenther2012-02-181-1/+4
| | | | | | so that their pthread_attr_get* don't return bogus values. issue noted and tested by aja@
* Allow librthread to build on mips64.miod2012-02-172-11/+72
|
* Set __isthreaded in pthread_create() instead of _rthread_init() such that itkettenis2012-02-161-3/+4
| | | | | | | | properly represents whether a process is multi-threaded or not. This fixes a bug where if a forked child would create a new thread we would not set __isthreaded. ok guenther@
* Nothing important, just switching from pthreads to rthreadsguenther2012-02-152-4/+9
|
* Bump major to be current libpthread major +1, so we can switch over cleanly.guenther2012-02-151-1/+1
| | | | | If we have to revert to user-space threads, we'll do another major bump of libpthread going back
* Add pthread_rwlockattr_{get,set}pshared() andguenther2012-02-153-4/+54
| | | | | | pthread_mutexattr_{get,set}kind_np() tweaked diff from brad
* r1.27 changed libevent to fire a read event when kqueue returned EBADFnicm2012-02-081-1/+2
| | | | | | | | | | | | | (and several other things, particularly EPIPE) on a file descriptor. This causes Google Chrome to die (probably due to a bug in Chrome but finding that is next to impossible at the moment). It's not really clear what libevent should when an invalid fd is added - the poll backend doesn't fire an event and select exits the event loop. Until this is settled, change kqueue to match poll and ignore EBADF, keeping the behaviour r1.27 fixed on EPIPE. Fix from robert@.
* Revert previous diff as it resulted in the wrong return code whenguenther2012-02-061-5/+3
| | | | | | | the last node is deleted. Instead, resolve the Coverity warning by returning (node *)1 when you delete the root node. based an idea from millert@. ok otto@
* If the internal consistency check fails, set errno so that it doesn'tguenther2012-02-041-5/+8
| | | | | | just look like end-of-directory. ok krw@ otto@ miod@
* Handle a wider range of kqueue error return values for an event,nicm2012-01-301-21/+40
| | | | | | | | prevents libevent exiting the event loop when getting EPIPE. Problem first seen by drahn@ and more recently hit by gilles@, fix based on one by Nick Mathewson. ok gilles
* @($*& Merging patches resulted in a line being duplicated instead ofguenther2012-01-251-2/+1
| | | | moved. Unlocking a spinlock twice is bad, mmkay?
* Credit Keith Sklower and 2BSD for the first implementation of read-writeschwarze2012-01-221-2/+7
| | | | | access; information found in the 2bsd directory of the CSRG archive CDs. feedback and ok jmc@
* the glob stat limit is way too low. bump to 2048.tedu2012-01-202-7/+7
| | | | | while here, failed stats should count against the limit too. ok deraadt sthen stsp
* symetryespie2012-01-191-3/+3
| | | | ok jmc@, millert@
* remove unused variablechl2012-01-181-2/+1
| | | | ok guenther@
* Add missing header needed by iswspace()chl2012-01-181-1/+2
| | | | ok stsp@
* Add support for C99 %ls, %lc, and %l[ format directives to scanf(3).stsp2012-01-183-9/+210
| | | | | | Based on code from FreeBSD. Tested by myself (full release/install cycle on i386 and sparc64) and ajacoutot. Man page help from jmc.
* Remove assembly version of strlen from i386 and amd64, where it'smikeb2012-01-174-44/+6
| | | | | | | up to 3 times slower than the C code most of the time. This was brought up by DragonflyBSD guys initially. ok deraadt, guenther. miod will not miss it.
* Bump minor for addition of openat/pread/preadv/pwrite/pwritevguenther2012-01-171-1/+1
|
* fix SEE ALSO;jmc2012-01-171-2/+2
|
* Make openat(), pread(), preadv(), pwrite(), and pwritev() cancellationguenther2012-01-179-7/+346
| | | | | | points. ok fgsch@
* Add stpcpy() and stpncpy(), pointless crap that made it into POSIX.guenther2012-01-174-3/+222
| | | | | | Includes friendly linker warning to wake up those dumb enough to use it. Committing for kettenis@, who ran away to the hills after writing it
* Reimplement mutexes, condvars, and rwlocks to eliminate bugs,guenther2012-01-1726-315/+728
| | | | | | | | | | | | | particularly the "consume the signal you just sent" hang, and putting the wait queues in userspace. Do cancellation handling in pthread_cond_*wait(), pthread_join(), and sem_wait(). Add __ prefix to thr{sleep,wakeup,exit,sigdivert}() syscalls; add 'abort" argument to thrsleep to close cancellation race; make thr{sleep,wakeup} return errno values via *retval to avoid touching userspace errno.
* net_addrcmp() dies. found out to be a horrific function by ericderaadt2012-01-173-158/+3
| | | | ok guenther
* POSIX indicates that some fields should be computed even if notmillert2012-01-161-2/+68
| | | | | | explicitly set. We can compute tm_yday, tm_wday, tm_mon and tm_mday based on the values that were specified if possible. Some logic borrowed from localtime.c. OK espie@ deraadt@
* Document the \-C output format generated by VIS_ALLguenther2012-01-161-2/+11
| | | | ok deraadt@
* Document early history of a few functions specifically mentioned in 2BSDschwarze2012-01-153-6/+59
| | | | | | manuals; however, it turned out all of these actually predate 2BSD. All information from http://minnie.tuhs.org/cgi-bin/utree.pl. ok jmc@ sobrado@
* many ways to get a log2... clue newbs.espie2012-01-142-4/+6
| | | | okay jmc@
* grammar;jmc2012-01-141-2/+2
|
* this is sparta^WPOSIX 2008espie2012-01-141-2/+7
| | | | okay millert@
* Add rtable id and thread id to struct kinfo_proc (and fix process id)guenther2012-01-076-65/+53
| | | | | | | | | | | and add an 'rtableid' keyword to ps. Add rtable id, thread id, and socket splice info to struct kinfo_file2 and make fstat display socket splice information. Remove old KVM_PROC2 and kinfo_proc2 interfaces; bump libkvm major Socket splice info and corrections from bluhm@ "Lovely" deraadt@
* OpenSSL 1.0.0f: crank minordjm2012-01-053-3/+3
|
* OpenSSL 1.0.0f: mergedjm2012-01-0561-316/+782
|