summaryrefslogtreecommitdiffstats
path: root/lib/libc/hidden/sys (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add support for timeconting in userland.pirofti2020-07-062-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | This diff exposes parts of clock_gettime(2) and gettimeofday(2) to userland via libc eliberating processes from the need for a context switch everytime they want to count the passage of time. If a timecounter clock can be exposed to userland than it needs to set its tc_user member to a non-zero value. Tested with one or multiple counters per architecture. The timing data is shared through a pointer found in the new ELF auxiliary vector AUX_openbsd_timekeep containing timehands information that is frequently updated by the kernel. Timing differences between the last kernel update and the current time are adjusted in userland by the tc_get_timecount() function inside the MD usertc.c file. This permits a much more responsive environment, quite visible in browsers, office programs and gaming (apparently one is are able to fly in Minecraft now). Tested by robert@, sthen@, naddy@, kmos@, phessler@, and many others! OK from at least kettenis@, cheloha@, naddy@, sthen@
* mincore() is a relic from the past, exposing physical machine informationderaadt2019-01-111-2/+1
| | | | | | | about shared resources which no program should see. only a few pieces of software use it, generally poorly thought out. they are being fixed, so mincore() can be deleted. ok guenther tedu jca sthen, others
* Wrap <sched.h> and <sys/futex.h> so that internal calls go directguenther2017-08-151-0/+25
|
* port the RBT code to userland by making it part of libc.dlg2017-06-191-0/+42
| | | | | | | | | | | | | | src/lib/libc/gen/tree.c is a copy of src/sys/kern/subr_tree.c, but with annotations for symbol visibility. changes to one should be reflected in the other. the malloc debug code that uses RB code is ported to RBT. because libc provides the RBT code, procmap doesn't have to reach into the kernel and build subr_tree.c itself now. mild enthusiasm from many ok guenther@
* Use a Thread Information Block in both single and multi-threaded programs.guenther2016-05-076-5/+95
| | | | | | | | | | | | | | | | | This stores errno, the cancelation flags, and related bits for each thread and is allocated by ld.so or libc.a. This is an ABI break from 5.9-stable! Make libpthread dlopen'able by moving the cancelation wrappers into libc and doing locking and fork/errno handling via callbacks that libpthread registers when it first initializes. 'errno' *must* be declared via <errno.h> now! Clean up libpthread's symbol exports like libc. On powerpc, offset the TIB/TCB/TLS data from the register per the ELF spec. Testing by various, particularly sthen@ and patrick@ ok kettenis@
* Turd polish: use HIDDEN= instead of PSEUDO= for ptrace syscall stub, toguenther2016-03-301-0/+25
| | | | make its underlying symbol name look like others.
* Wrap waitpid() so calls go direct; weaken wait() and wait3().guenther2015-10-251-0/+28
| | | | Strip out unnecessary #includes and use NULL instead of (struct rusage *)0
* recv() and send() aren't overriden by libpthread (vs recvfrom() and sendto()!)guenther2015-10-041-1/+3
| | | | so wrap them to make internal calls go direct
* getpeereid() and sockatmark() are neither used in libc nor in ISO C, so markguenther2015-10-041-1/+3
| | | | them deprecated and weak
* Wrap <sys/sem.h> so internal calls go direct and all the symbols are weakguenther2015-09-141-0/+28
|
* Make isfdtype() and getmntinfo() weak symbolsguenther2015-09-142-2/+4
|
* Wrap <sys/sysctl.h> so that calls go direct and the symbol is weakguenther2015-09-131-0/+25
|
* Wrap shm_open() to go direct and mark shm_{mkstemp,unlink}() as weakguenther2015-09-121-4/+4
|
* Add PROTO_WRAP() for (almost) all the syscalls that libpthread doesn'tguenther2015-09-116-0/+196
| | | | | | override so that internal calls go direct ok deraadt@
* Use PROTO_NORMAL() on __syscall to go direct, adjusting the declarationguenther2015-09-111-0/+40
to eliminate some casts. Retire some uses of old-style STUB* macros where superseded by namespace.h bits tweaks and ok deraadt@