summaryrefslogtreecommitdiffstats
path: root/lib/libc (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* nanosleep: loop tsleep(9) to ensure coverage of the full timeout range.cheloha2018-12-311-4/+5
| | | | | | | | | | | | tsleep(9)'s maximum timeout shrinks as HZ grows, so this ensures we do not return early from longer timeouts on alpha or on custom kernels. POSIX says you cannot return early unless a signal is delivered, so this makes us more compliant with the standard. While here, remove the 100 million second upper bound. It is an artifact from itimerfix() and it serves no discernible purpose. ok tedu@ visa@
* getgruid_r -> getgrgid_rtb2018-12-281-3/+3
| | | | from Lauri Tirkkonen
* document kern.pool_debug; ok tedu@anton2018-12-261-2/+20
|
* Restore the optimization for unbuffered I/O. The buffer needs tomillert2018-12-161-1/+31
| | | | | be reset before each call to __srefill(). Passes new regress. OK semarie@
* Back out rev 1.17 for now, it causes issues with python when buildingmillert2018-12-161-31/+1
| | | | databases/tdb from ports.
* Revisit the optimization for unbuffered I/O. We can use the buffermillert2018-12-141-1/+31
| | | | | | passed to fread(3) directly in the FILE * and call __srefill() in a loop without the memcpy(). This preserves the expected behavior in all cases. OK semarie@, "This is neat" tedu@
* Back out the optimization in rev 1.13, it does not update flags onmillert2018-12-141-16/+1
| | | | EOF or error. This caused a regression in the cPickle python extension.
* Improve speed for the multi-threaded case by reducing lock contention.otto2018-12-101-30/+21
| | | | tested by many; ok florian@
* style; OK ottoflorian2018-12-091-3/+3
|
* remove a stray line accidentally left behind in rev. 1.120;schwarze2018-12-051-3/+2
| | | | patch from Hiltjo Posthuma <hiltjo at codemadness dot org>
* remove double .Pp. oops - sorry for not spotting!jmc2018-11-291-2/+1
|
* Improve introduction so there is more clarity about the patterns ofderaadt2018-11-291-17/+17
| | | | unveil calls should follow. ok various, including jmc
* Refactor "find the right pool" code into a function. ok djm@ tb@otto2018-11-271-65/+34
|
* fold the contents of malloc.conf.5 into malloc.3 and sysctl.2,jmc2018-11-212-11/+125
| | | | | | now that there is essentially no malloc.conf; text tweaked by deraadt; ok otto deraadt
* Introducing malloc_usable_size() was a mistake. While some otherotto2018-11-215-110/+8
| | | | | | | | | | | libs have it, it is a function that is considered harmful, so: Delete malloc_usable_size(). It is a function that blurs the line between malloc managed memory and application managed memory and exposes some of the internal workings of malloc. If an application relies on that, it is likely to break using another implementation of malloc. If you want usable size x, just allocate x bytes. ok deraadt@ and other devs
* Fix compilation on alpha, where DEF_WEAK() really must be paired withguenther2018-11-191-2/+1
| | | | PROTO_NORMAL(). Problem noted by deraadt@
* delete the dns jackport experiment. it has no future.tedu2018-11-191-6/+2
|
* Implement malloc_usable_size(); ok millert@ deraadt@ and jmc@ for the man pageotto2018-11-185-8/+112
|
* Add new KERN_CPUSTATS sysctl(2) so we can identify offline CPUs.cheloha2018-11-171-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of hw.smt we need a way to determine whether a given CPU is "online" or "offline" from userspace. KERN_CPTIME2 is an array, and so cannot be cleanly extended for this purpose, so add a new sysctl(2) KERN_CPUSTATS with an extensible struct. At the moment it's just KERN_CPTIME2 with a flags member, but it can grow as needed. KERN_CPUSTATS appears to have been defined by BSDi long ago, but there are few (if any) packages in the wild still using the symbol so breakage in ports should be near zero. No other system inherited the symbol from BSDi, either. Then, use the new sysctl(2) in systat(1) and top(1): - systat(1) draws placeholder marks ('-') instead of percentages for offline CPUs in the cpu view. - systat(1) omits offline CPU ticks when drawing the "big bar" in the vmstat view. The upshot is that the bar isn't half idle when half your logical CPUs are disabled. - top(1) does not draw lines for offline CPUs; if CPUs toggle on or offline in interactive mode we redraw the display to expand/reduce space for the new/missing CPUs. This is consistent with what some top(1) implementations do on Linux. - top(1) omits offline CPUs from the totals when CPU totals are combined into a single line (the '-1' flag). Originally prompted by deraadt@. Discussed endlessly with deraadt@, ketennis@, and sthen@. Tested by jmc@ and jca@. Earlier versions also discussed with jca@. Earlier versions tested by jmc@, tb@, and many others. docs ok jmc@, kernel bits ok ketennis@, everything ok sthen@, "Is your stuff in yet?" deraadt@
* Do not translate the EACCES error from pf(4) to EHOSTUNREACH anymore.bluhm2018-11-101-5/+7
| | | | | | It also translated a documented send(2) EACCES case erroneously. This was too much magic and always prone to errors. from Jan Klemkow; man page jmc@; OK claudio@
* Conform to POSIX-2001 in which the behavior of passing a negative length usinganton2018-11-101-3/+18
| | | | | | | posix file locks is defined. Also, detect overflows when dealing with positive lengths. ok millert@ visa@
* Remove ethers(5) YP support bits from libc as it makes it difficult tobrynet2018-11-092-70/+8
| | | | | | | | effectively use pledge(2) in some programs. approval from many, thanks! idea by & ok deraadt@
* zap last remains of malloc.conf; prompted by and ok jmc@otto2018-11-082-11/+8
|
* typo on fs.posix.setuid; from Piotr Durlejotto2018-11-061-2/+2
|
* rm FILES section; prompted by Janne Johanssonotto2018-11-061-7/+2
|
* Use the new vm.malloc_conf sysctl; ok millert@ deraadt@otto2018-11-061-6/+11
|
* vm.malloc_conf, userland sysctl parts; ok millert@ deraadt@otto2018-11-061-2/+7
|
* Mention aligned_alloc(), prompted by Brad; ok jmc@otto2018-11-051-4/+6
|
* aligned_alloc bumpotto2018-11-051-1/+1
|
* Implement C11's aligned_alloc(3). ok guenther@otto2018-11-054-6/+87
|
* add missing NET_RT_TABLEdenis2018-11-041-2/+3
| | | | OK benno@
* For correctness, do not read struct servent if getservbyname_r() failed.eric2018-11-031-7/+5
| | | | Also simplify code.
* typo; fix from hiltjo posthumaderaadt2018-10-311-3/+3
|
* use Mdocdate;jmc2018-10-301-2/+2
|
* Add C11's timespec_get(3); minor bump for libc.guenther2018-10-306-5/+140
| | | | | | Tweaked diff from brad@ manpage tweaks florian@ and jmc@ ok deraadt@ millert@
* Correctly deal with upper level unveil's by keeping track of the coveringbeck2018-10-281-13/+2
| | | | | | | unveil for each unveil in the process at unveil() time, and refactoring the handling of current directory and ISDOTDOT to be much more sensible. Worked out at ns2k18 with guenther@. ok deraadt@
* More "explicitely" -> "explicitly" in various comments.krw2018-10-222-4/+4
| | | | ok guenther@ tb@ deraadt@
* Switch alpha to futex(2) based condvars, mutexes and semaphores.visa2018-10-211-5/+6
| | | | From Brad, tested by Miod, OK kettenis@
* Switch powerpc to futex(2) based condvars, mutexes and semaphores.visa2018-10-151-2/+2
| | | | From Brad, OK mpi@ kettenis@
* Fix a "copy-and-paste" error that Coverity picked up in the augment codedlg2018-10-091-2/+2
| | | | | | | | This brings it back in line with the macros. via Paco A. and the FRRouting project. ok deraadt@ visa@ guenther@ tb@
* document that uuid_create generates v4 uuids; from william orrjmc2018-10-021-2/+6
| | | | verified/ok tb
* Add retguard to arm64 libc syscalls and setjmp / longjmp.mortimer2018-10-013-6/+29
| | | | ok kettenis@
* As per POSIX, when str{,r}chr is comparing it should convert c to a char.martijn2018-10-014-8/+10
| | | | | | | | | | The C implementation of str{,r}chr are not linked to the build, because assembly implementations are used, but change to code for easier reference. At least the i386 and amd64 are checked and seem to do the correct thing. Found thanks to the csh any/strchr change. minor pointers and OK millert@
* add spin lock in KERN_CPTIME cpu statessolene2018-09-301-3/+3
| | | | ok mpi@ jca@
* Make the HISTORY sections of the "intro" manuals less confusing andschwarze2018-09-301-3/+3
| | | | more uniform; potential for confusion noticed by aalm@; OK jmc@.
* typo; ok jmc@miko2018-09-261-2/+2
|
* align RETURN VALUES section with pledge manual; ok deraadt@miko2018-09-261-4/+3
|
* enable futex(2) based mutexes on armv7 and use futex based semaphores injsg2018-09-241-3/+3
| | | | | librthread on armv7 as well from brad ok visa@ kettenis@ mpi@
* Correct the uid_from_user() and gid_from_group() comments.millert2018-09-221-7/+7
|
* missing comma in previous;jmc2018-09-131-2/+2
|