summaryrefslogtreecommitdiffstats
path: root/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix ftell() to return EOVERFLOW if the file offset is greater thanmatthew2012-05-212-23/+10
| | | | | | | LONG_MAX. Also, remove an Alpha-specific optimization that only saves a couple of bytes of code size. ok millert, guenther
* More sysconf(3)-y and pathconf(3)-y goodness from Brad.matthew2012-05-143-45/+233
| | | | ok guenther, millert (and me); bulk build test by naddy
* The default device is selected with sndiod(1) or the AUDIODEVICEratchov2012-05-111-2/+2
| | | | | environment variable, so stop using the /dev/audio symlink which can't be used by sndiod(1) anyway
* Style nits from Brad.pirofti2012-05-061-26/+26
|
* Add pthread spinlock support.pirofti2012-05-0310-7/+387
| | | | | | | | | | | Implementation, documentation and naive regression tests for: - pthread_spin_init() - pthread_spin_destroy() - pthread_spin_lock() - pthread_spin_trylock() - pthread_spin_unlock() Implementation okay guenther@, documentation okay jmc@.
* Eliminate the f_usecount ref count in struct file; instead of sleepingguenther2012-05-011-2/+2
| | | | | | | | | at the top of closef() until all in-progress calls finish, just do the advisory locking bits required of close() by POSIX and let whichever thread has the last reference do the call to the file's fo_close() method and the final cleanup. lots of discussion with deraadt@ and others; worked out with and ok krw@
* Drop support from openpty() for 8+ year old kernels that don't supportmatthew2012-04-261-59/+5
| | | | | | | /dev/ptm. Users are strongly encouraged to upgrade to a more recent release if they haven't already. ok deraadt
* Add strnlen() to libkern.matthew2012-04-262-4/+8
| | | | ok deraadt
* fix a few warningseric2012-04-254-16/+22
|
* document address truncation; from Steffen Daode Nurpmesojmc2012-04-241-2/+9
| | | | ok deraadt matthew millert
* Honor subsystem style.pirofti2012-04-232-71/+55
| | | | | | `Visual inspection looks ok' kurt@. >From Brad
* enable sqlite3, as prompted by theoespie2012-04-221-2/+2
|
* add missing defines, crucial: -DSQLITE_COREespie2012-04-221-1/+4
| | | | | used while compiling extensions which are actually a part of the core, prevents segfaults because extensions have not been loaded...
* regen all files we can, prepare stuff to make sure it works even withoutespie2012-04-225-4064/+1436
| | | | depend
* Document that getpeereid() works for SOCK_SEQPACKET sockets too.matthew2012-04-221-3/+5
|
* use "an addrinfo", not "a addrinfo". ok jmcsthen2012-04-201-3/+3
|
* Fix kvm_deadfile2_byid()'s handling of kernel vs user addresses forguenther2012-04-201-14/+43
| | | | | | | | fd_ofiles and fd_ofileflags, reading in the separate allocation when necessary. Lets fstat -p and fstat -u work on kernel crash dumps again. ok millert@
* rearrange DESCRIPTION somewhat to make this page more readable;jmc2012-04-201-39/+40
| | | | from Lawrence Teo
* cherrypick fix for CVE-2012-2110: libcrypto ASN.1 parsing heap overflowdjm2012-04-196-28/+122
| | | | ok miod@ deraadt@
* rely on the compiler giving us a built-in alloca. any new architecturederaadt2012-04-1911-219/+14
| | | | | or compiler we use will. ok millert
* Make it optional for kvm_getprocs() (and related sysctl) to returnpirofti2012-04-171-1/+9
| | | | | | | | | | | | thread information. Add a KERN_PROC_SHOW_THREADS flag that has to be set in order to get the thread info and make it off by default. This creates backwards compatibility for applications that relied on a given size/number of items to be returned. Modify ps(1) and top(1) accordingly. Okay guenther@.
* Remove "#define _POSIX_THREADS" line before include <pthread.h>.miod2012-04-172-6/+2
| | | | The latter contains "#define _POSIX_THREADS 1" which makes gcc 2.95 complain.
* Create a new resolver for each thread. It will be done differentlyeric2012-04-151-14/+24
| | | | | eventually, but it's enough for now to make the blocking API fully thread-safe without locking.
* calling getnameinfo here is a bad idea. use inet_ntop.eric2012-04-151-6/+9
|
* tweak previous;jmc2012-04-151-16/+17
|
* clean-out ALL generated filesespie2012-04-141-2/+2
|
* oopsespie2012-04-141-6/+6
|
* crapola-generated, no need to do it each time.espie2012-04-142-1/+19
|
* zap parse.y, it's NOT yacc source code, and otherwise make depend will thinkespie2012-04-141-1408/+0
| | | | parse.[ch] comes from it.
* OpenBSD compile gooespie2012-04-142-0/+81
|
* include file, mostly from sqlite.h.in, with parts un-autoconf'd sinceespie2012-04-141-0/+6942
| | | | we don't need most of the portability goo
* extra src for us.espie2012-04-143-0/+4082
| | | | | | regen parse.c/parse.h with "lemon", no need to recompile every time. pthread_stub.c might(?) be needed for clean non-pthreads operation (to be checked, the nomutex stuff looks interesting)
* sqlite 3.7.11 library, vendor sourcesespie2012-04-14258-0/+207683
|
* Make kvm_getfile2() have a fighting change to work correctly on crashguenther2012-04-141-91/+88
| | | | dumps
* Update to match nprocs-->nprocess/nthreads changesguenther2012-04-141-16/+17
|
* Need to read in the vmspace to dig out the root of the rb-treeguenther2012-04-141-2/+5
|
* Add new mutex type, PTHREAD_MUTEX_STRICT_NP which checks for applicationkurt2012-04-142-6/+12
| | | | | | | | errors similar to PTHREAD_MUTEX_ERRORCHECK, however upon error it aborts. The rational is that many applications don't check the return values on pthread functions and will miss the errors that ERRORCHECK returns. PTHREAD_MUTEX_STRICT_NP will be our default mutex type for awhile okay guenther@ dcoppa@
* only define DEBUG internallyeric2012-04-143-9/+10
|
* Import asr, an experimental async resolver implementation.eric2012-04-1416-0/+7184
| | | | | | | The idea is to eventually replace the existing resolver with something better. Time to start working on it in tree. ok deraadt@
* Provide _atomic_lock() and __cerror() for hppa64. Makes hppa64 build again.jsing2012-04-132-0/+74
|
* Use PTHREAD_MUTEX_DEFAULT in static init and mutexattr_init. If thekurt2012-04-132-7/+15
| | | | | | default mutex type changes to NORMAL, when there is an uninitialized mutex provided to unlock, allow it to succeed similar to an unlocked mutex. For other cases abort instead of segfault. okay guenther@
* Per POSIX, PTHREAD_MUTEX_NORMAL type mutexes have undefined behavior forkurt2012-04-131-7/+31
| | | | | | certain conditions. In the case of unlocking an unlocked mutex we will allow that to succeed, all other undefined behaviors will result in an immediate abort(). okay guenther@
* Add sigwaitinfo and sigtimedwait stubs under #if 0; a bit more kernelguenther2012-04-131-1/+40
| | | | | support is needed before they can be usefully enabled but I don't want to misplace this diff yet again
* tweak;jmc2012-04-121-2/+2
|
* tweak previous;jmc2012-04-123-12/+12
|
* tweak previous;jmc2012-04-121-5/+6
|
* alloca.c cannot be usedderaadt2012-04-1213-34/+12
|
* alloca is NOT machine dependent; it has exactly the samederaadt2012-04-121-7/+3
| | | | | effective result. its use is NOT discouraged -- it is not common, but when you need it, there is nothing else that will do.
* Since threads are becoming more common, this "work around thederaadt2012-04-121-136/+0
| | | | | | compiler not doing alloca in C using malloc" is unworkable. It is not safe, and we can never use it. ok guenther kurt
* Add per thread accounting, mainly for usage & friends.pirofti2012-04-122-5/+40
| | | | | | | | | | | | | | This expands the already bloated FILL_KPROC macro to take an extra parameter that indicates if the callee is a thread or a process. The userland bits are adjusted accordingly and ps(1) and top(1) now display per thread usage times when -H is used. Also pkill(1) had to be adjusted so that duplicates don't pop up. libkvm does basically the same thing as the kernel bits. Okay guenther@.