86ccdacb | 17-Jan-2021 |
Aaron LI <aly@aaronly.me> |
Implement clock_nanosleep(2) system call
* Extend the nanosleep1() function in kern_time.c to support the clock_nanosleep(2) system call. Add {kern,sys}_clock_nanosleep() functions and update k
Implement clock_nanosleep(2) system call
* Extend the nanosleep1() function in kern_time.c to support the clock_nanosleep(2) system call. Add {kern,sys}_clock_nanosleep() functions and update kern_nanosleep() accordingly.
* Add clock_nanosleep() syscall to syscalls.master and regenerate syscall-related files.
* Update libc symbols with the new syscall.
* Add clock_nanosleep() warpper in libthread_xu.
* Update nanosleep.2 man page to describe clock_nanosleep().
* Update <time.h> and bump __DragonFly_version.
This work is loosely based on the FreeBSD implementation: https://reviews.freebsd.org/rS315526
This clock_nanosleep(2) syscall passed all tests in the Open POSIX Test Suite [0]:
conformance/interfaces/clock_nanosleep/1-1: execution: PASS conformance/interfaces/clock_nanosleep/1-2: execution: PASS conformance/interfaces/clock_nanosleep/1-3: execution: PASS conformance/interfaces/clock_nanosleep/1-4: execution: PASS conformance/interfaces/clock_nanosleep/1-5: execution: PASS conformance/interfaces/clock_nanosleep/2-1: execution: PASS conformance/interfaces/clock_nanosleep/2-2: execution: PASS conformance/interfaces/clock_nanosleep/2-3: execution: PASS conformance/interfaces/clock_nanosleep/3-1: execution: PASS conformance/interfaces/clock_nanosleep/4-1: execution: PASS conformance/interfaces/clock_nanosleep/5-1: execution: PASS conformance/interfaces/clock_nanosleep/6-1: execution: PASS conformance/interfaces/clock_nanosleep/9-1: execution: PASS conformance/interfaces/clock_nanosleep/8-1: execution: PASS conformance/interfaces/clock_nanosleep/10-1: execution: PASS conformance/interfaces/clock_nanosleep/11-1: execution: PASS conformance/interfaces/clock_nanosleep/13-1: execution: PASS conformance/interfaces/clock_nanosleep/15-1: execution: PASS
[0] Open POSIX Test Suite: http://posixtest.sourceforge.net/
Reviewed-by: swildner, dillon, tuxillo, zach
show more ...
|
a319222d | 19-Jan-2021 |
Sascha Wildner <saw@online.de> |
libutil/setusercontext: Apply FreeBSD's b149798e50fac1113a7.
FBSD commit msg:
Fix a clang 3.5 warning about abs(3) being given an argument of type quad_t in setusercontext(). While here, sanitize
libutil/setusercontext: Apply FreeBSD's b149798e50fac1113a7.
FBSD commit msg:
Fix a clang 3.5 warning about abs(3) being given an argument of type quad_t in setusercontext(). While here, sanitize the clamping of the priority value, and use the correct type for the return value of login_getcapnum().
show more ...
|
ec21d9fb | 01-Jan-2021 |
Aaron LI <aly@aaronly.me> |
Import stdbuf(1) together with libstdbuf(3) from FreeBSD
The stdbuf(1) is a utility to change the initial buffering of stdin, stdout and stderr streams for a given command. It achieves this functio
Import stdbuf(1) together with libstdbuf(3) from FreeBSD
The stdbuf(1) is a utility to change the initial buffering of stdin, stdout and stderr streams for a given command. It achieves this functionality by preloading the libstdbuf(3) library and configuring the needed environment variables. Under the hood, libstdbuf(3) library calls setvbuf(3) to do the actual work.
Changes from FreeBSD: * Removed 32bit i386 code from stdbuf(1) * Fix typos and update HISTORY section in libstdbuf.3 man page * Update the example to actually work on DragonFly
show more ...
|
9d755d93 | 01-Jan-2021 |
Aaron LI <aly@aaronly.me> |
devname(3): Remove obsolete code that queries dev.db
In the old days of static /dev, devname(3) would get the name by querying the /var/run/dev.db created by dev_mkdb(8). Now that we have dynamic /
devname(3): Remove obsolete code that queries dev.db
In the old days of static /dev, devname(3) would get the name by querying the /var/run/dev.db created by dev_mkdb(8). Now that we have dynamic /dev provided by devfs(5), the device name is provided by the 'kern.devname' sysctl, thus obsoleting the db query code.
I've tested to verify that the db query code isn't being used now. So it's safe to remove this obsolete code. Cleanups to dev_mkdb(8) and related code would follow.
Meanwhile, update the man page to reflect the current code.
Discussed-with: swildner
show more ...
|
537c8762 | 15-Dec-2020 |
zrj <rimvydas.jasinskas@gmail.com> |
pthreads: Use sticky version in pthread_is_threaded_np().
It was observed that several applications have undefined behaviour if they become implicitly threaded at runtime (e.g. locale libraries).
pthreads: Use sticky version in pthread_is_threaded_np().
It was observed that several applications have undefined behaviour if they become implicitly threaded at runtime (e.g. locale libraries). This allows to check status to avoid issues in applications calling sigprocmask() and fork() without immediate exec().
show more ...
|