summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2012-05-21Fix ftell() to return EOVERFLOW if the file offset is greater thanMatthew Dempsky
LONG_MAX. Also, remove an Alpha-specific optimization that only saves a couple of bytes of code size. ok millert, guenther
2012-05-14More sysconf(3)-y and pathconf(3)-y goodness from Brad.Matthew Dempsky
ok guenther, millert (and me); bulk build test by naddy
2012-05-11The default device is selected with sndiod(1) or the AUDIODEVICEAlexandre Ratchov
environment variable, so stop using the /dev/audio symlink which can't be used by sndiod(1) anyway
2012-05-06Style nits from Brad.Paul Irofti
2012-05-03Add pthread spinlock support.Paul Irofti
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@.
2012-05-01Eliminate the f_usecount ref count in struct file; instead of sleepingPhilip Guenthe
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@
2012-04-26Drop support from openpty() for 8+ year old kernels that don't supportMatthew Dempsky
/dev/ptm. Users are strongly encouraged to upgrade to a more recent release if they haven't already. ok deraadt
2012-04-26Add strnlen() to libkern.Matthew Dempsky
ok deraadt
2012-04-25fix a few warningsEric Faurot
2012-04-24document address truncation; from Steffen Daode NurpmesoJason McIntyre
ok deraadt matthew millert
2012-04-23Honor subsystem style.Paul Irofti
`Visual inspection looks ok' kurt@. >From Brad
2012-04-22enable sqlite3, as prompted by theoMarc Espie
2012-04-22add missing defines, crucial: -DSQLITE_COREMarc Espie
used while compiling extensions which are actually a part of the core, prevents segfaults because extensions have not been loaded...
2012-04-22regen all files we can, prepare stuff to make sure it works even withoutMarc Espie
depend
2012-04-22Document that getpeereid() works for SOCK_SEQPACKET sockets too.Matthew Dempsky
2012-04-20use "an addrinfo", not "a addrinfo". ok jmcStuart Henderson
2012-04-20Fix kvm_deadfile2_byid()'s handling of kernel vs user addresses forPhilip Guenthe
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@
2012-04-20rearrange DESCRIPTION somewhat to make this page more readable;Jason McIntyre
from Lawrence Teo
2012-04-19cherrypick fix for CVE-2012-2110: libcrypto ASN.1 parsing heap overflowDamien Miller
ok miod@ deraadt@
2012-04-19rely on the compiler giving us a built-in alloca. any new architectureTheo de Raadt
or compiler we use will. ok millert
2012-04-17Make it optional for kvm_getprocs() (and related sysctl) to returnPaul Irofti
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@.
2012-04-17Remove "#define _POSIX_THREADS" line before include <pthread.h>.Miod Vallat
The latter contains "#define _POSIX_THREADS 1" which makes gcc 2.95 complain.
2012-04-15Create a new resolver for each thread. It will be done differentlyEric Faurot
eventually, but it's enough for now to make the blocking API fully thread-safe without locking.
2012-04-15calling getnameinfo here is a bad idea. use inet_ntop.Eric Faurot
2012-04-15tweak previous;Jason McIntyre
2012-04-14clean-out ALL generated filesMarc Espie
2012-04-14oopsMarc Espie
2012-04-14crapola-generated, no need to do it each time.Marc Espie
2012-04-14zap parse.y, it's NOT yacc source code, and otherwise make depend will thinkMarc Espie
parse.[ch] comes from it.
2012-04-14OpenBSD compile gooMarc Espie
2012-04-14include file, mostly from sqlite.h.in, with parts un-autoconf'd sinceMarc Espie
we don't need most of the portability goo
2012-04-14extra src for us.Marc Espie
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)
2012-04-14sqlite 3.7.11 library, vendor sourcesMarc Espie
2012-04-14Make kvm_getfile2() have a fighting change to work correctly on crashPhilip Guenthe
dumps
2012-04-14Update to match nprocs-->nprocess/nthreads changesPhilip Guenthe
2012-04-14Need to read in the vmspace to dig out the root of the rb-treePhilip Guenthe
2012-04-14Add new mutex type, PTHREAD_MUTEX_STRICT_NP which checks for applicationKurt Miller
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@
2012-04-14only define DEBUG internallyEric Faurot
2012-04-14Import asr, an experimental async resolver implementation.Eric Faurot
The idea is to eventually replace the existing resolver with something better. Time to start working on it in tree. ok deraadt@
2012-04-13Provide _atomic_lock() and __cerror() for hppa64. Makes hppa64 build again.Joel Sing
2012-04-13Use PTHREAD_MUTEX_DEFAULT in static init and mutexattr_init. If theKurt Miller
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@
2012-04-13Per POSIX, PTHREAD_MUTEX_NORMAL type mutexes have undefined behavior forKurt Miller
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@
2012-04-13Add sigwaitinfo and sigtimedwait stubs under #if 0; a bit more kernelPhilip Guenthe
support is needed before they can be usefully enabled but I don't want to misplace this diff yet again
2012-04-12tweak;Jason McIntyre
2012-04-12tweak previous;Jason McIntyre
2012-04-12tweak previous;Jason McIntyre
2012-04-12alloca.c cannot be usedTheo de Raadt
2012-04-12alloca is NOT machine dependent; it has exactly the sameTheo de Raadt
effective result. its use is NOT discouraged -- it is not common, but when you need it, there is nothing else that will do.
2012-04-12Since threads are becoming more common, this "work around theTheo de Raadt
compiler not doing alloca in C using malloc" is unworkable. It is not safe, and we can never use it. ok guenther kurt
2012-04-12Add per thread accounting, mainly for usage & friends.Paul Irofti
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@.