History log of /dflybsd-src/lib/libc/upmap/ukp_getpid.c (Results 1 – 2 of 2)
Revision Date Author Comments
# 0c4f129d 06-Oct-2016 zrj <rimvydas.jasinskas@gmail.com>

Move __weak_reference() after symbols it links to.

Just for consistency. It also will help if prototype visibility would change.

Shouldn't lib/libc/gen/raise.c have weak refs to _raise() and raise(

Move __weak_reference() after symbols it links to.

Just for consistency. It also will help if prototype visibility would change.

Shouldn't lib/libc/gen/raise.c have weak refs to _raise() and raise()?

show more ...


# 87116512 17-Oct-2014 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Add /dev/upmap and /dev/kpmap and sys/upmap.h (3)

* Add upmap->invfork. When a vforked child is trying to access the upmap
prior to exec we must still access the parent's map and not the

kernel - Add /dev/upmap and /dev/kpmap and sys/upmap.h (3)

* Add upmap->invfork. When a vforked child is trying to access the upmap
prior to exec we must still access the parent's map and not the child's,
which means that the stored PID will be incorrect.

To fix this issue we add the invfork field which allows userland to
determine whether this is a vforked child accessing the parent's map.
If it is, getpid() will use the system call.

* Fix a bug where a vfork()d child creates p->p_upmap for itself but then
maps it into the parent's address space as a side effect of a getpid()
or other call. When this situation is detected, /dev/upmap will use
the parent's p_upmap and not the child's, and also properly set the
invfork flag.

* Implement system call overrides for getpid(), setproctitle(), and
clock_gettime() (*_FAST and *_SECOND clock ids). When more than 10 calls
are made to one of these functions the new libc upmap/kpmap support is
activated. /dev/upmap and /dev/kpmap will be memory-mapped into the
address space and further accesses will run through the maps instead of
making system calls.

This will obviously reduce overhead for these calls by a very significant
multiplier.

* NOTE! gettimeofday() is still a system call and will likely remain a system
call in order to return a fine-grained time value. Third-party code
that doesn't need a fine-grained time value must use clock_gettime()
to obtain the new performance efficiencies.

show more ...