Sepherosa Ziehau [Wed, 2 Aug 2017 09:13:21 +0000 (17:13 +0800)]
inet6: Prevent excessive IPI from draining IPv6 fragments.
Sepherosa Ziehau [Wed, 2 Aug 2017 09:03:36 +0000 (17:03 +0800)]
net: Use PR_{FAST,SLOW}HZ, some code has the assumption of these macro usage.
Sascha Wildner [Wed, 2 Aug 2017 01:59:38 +0000 (03:59 +0200)]
efivar.8: Fix typos/improve language (taken from FreeBSD).
Sascha Wildner [Tue, 1 Aug 2017 10:36:04 +0000 (12:36 +0200)]
libthread_xu: Add a check for integer overflow (FreeBSD r321011).
Sepherosa Ziehau [Tue, 1 Aug 2017 09:46:30 +0000 (17:46 +0800)]
domain: Nuke pfslowtimo.
Sepherosa Ziehau [Tue, 1 Aug 2017 09:23:05 +0000 (17:23 +0800)]
ip: Don't use pr_slowtimo.
Sepherosa Ziehau [Tue, 1 Aug 2017 08:42:21 +0000 (16:42 +0800)]
igmp: Don't use pr_slowtimo.
Sepherosa Ziehau [Tue, 1 Aug 2017 08:22:00 +0000 (16:22 +0800)]
inet6: Drain IPv6 fragments in netisr0
Sepherosa Ziehau [Tue, 1 Aug 2017 07:40:56 +0000 (15:40 +0800)]
inet6: Dispatch frag6 slowtimo to netisr0 and stop using pr_slowtimo
Sepherosa Ziehau [Mon, 31 Jul 2017 08:51:58 +0000 (16:51 +0800)]
domain: Nuke pffasttimo
Sascha Wildner [Mon, 31 Jul 2017 08:46:36 +0000 (10:46 +0200)]
kernel: Fix wrong indentation in a few places.
Sascha Wildner [Mon, 31 Jul 2017 08:36:38 +0000 (10:36 +0200)]
kernel/sdhci: Remove wrong semicolon.
Sascha Wildner [Mon, 31 Jul 2017 08:32:04 +0000 (10:32 +0200)]
kernel/ieee80211: Add missing braces.
Sascha Wildner [Mon, 31 Jul 2017 08:27:12 +0000 (10:27 +0200)]
kernel/urtwn: Add missing braces.
Sepherosa Ziehau [Mon, 31 Jul 2017 11:41:26 +0000 (19:41 +0800)]
igmp: Use callout instead of pffasttimo.
Sepherosa Ziehau [Mon, 31 Jul 2017 03:50:46 +0000 (11:50 +0800)]
icmp6: Don't use pffasttimo and dispatch fasttimo to netisr0
Reported-by: ivadasz
Sascha Wildner [Sun, 30 Jul 2017 19:30:39 +0000 (21:30 +0200)]
kernel: Add FreeBSD's virtio_scsi(4) driver.
Thanks to ivadasz for figuring out the shutdown freeze issue
(see
c022ffc9484ecf07d8d7c4fb918d84a6154367be).
Tested-by: ivadasz, Peter Cannici <turkchess123@gmail.com>
Sascha Wildner [Sun, 30 Jul 2017 19:21:29 +0000 (21:21 +0200)]
kernel/cam: Add CAM_SCSI_IT_NEXUS_LOST (in preparation for virtio_scsi(4)).
Sascha Wildner [Sun, 30 Jul 2017 09:20:14 +0000 (11:20 +0200)]
larn(6): Fix two "use of index before limits check" issues.
Imre Vadász [Sun, 30 Jul 2017 14:08:58 +0000 (16:08 +0200)]
Make sure that cam(4)'s dashutdown handler runs before DEVICE_SHUTDOWN().
This meant, that the DEVICE_SHUTDOWN() callback of scsi drivers was running
before the final SYNCHRONIZE_CACHE scsi command was sent by cam(4). For
most drivers this was still fine, since usually the DEVICE_SHUTDOWN()
callback - if it's even implemented - only flushes the command queue.
This change avoids freezing at the end of shutdown which was known to
happen with the twa(4), and virtio_scsi(4) drivers.
The SHUTDOWN_PRI_SECOND priority is selected, because it's so far unused,
and inbetween existing handlers in the shutdown_post_sync phase, that are
at SHUTDOWN_PRI_FIRST and at SHUTDOWN_PRI_DEFAULT.
Tested-by: swildner (on twa(4)), ivadasz (on virtio_scsi(4))
Matthew Dillon [Sun, 30 Jul 2017 17:59:05 +0000 (10:59 -0700)]
kernel - Fix kcollect swapuse%
* The calculation was improperly using vm_swap_size (which is really free swap
remaining) instead of vm_swap_max.
Matthew Dillon [Sun, 30 Jul 2017 04:02:36 +0000 (21:02 -0700)]
kcollect - add swap% to plot output
* swap% used can be added easily, so go ahead and do it. Added to the bottom
graph.
Matthew Dillon [Sun, 30 Jul 2017 01:22:47 +0000 (18:22 -0700)]
kcollect - Fix gunplot warning when -x -f is specified
* gnuplot warns about multiple set terminal commands when the refresh
occurs. Rearrange when the command is sent to avoid the problem.
Matthew Dillon [Sun, 30 Jul 2017 01:10:48 +0000 (18:10 -0700)]
kcollect - Add a smoothing option (-s)
* Add an option (-s) which smooths the plot. The smoothing algorithm uses
an exponential average with fast collapse to the high-side so spikes do
not get lost.
Matthew Dillon [Sun, 30 Jul 2017 00:56:07 +0000 (17:56 -0700)]
kcollect - Add -t option to limit output
* Add the -t N option, limiting the output to the most recent N seconds
worth of samples. 'm'inutes, 'h'ours, and 'd'ays suffixes are allowed
for convenience.
Matthew Dillon [Sun, 30 Jul 2017 00:38:52 +0000 (17:38 -0700)]
kcollect - Adjust ordering of gnuplot solids
* Adjust ordering so active use fills solids upwards instead of downwards.
Matthew Dillon [Sat, 29 Jul 2017 23:24:41 +0000 (16:24 -0700)]
kcollect - Implement gnuplot output feature
* Implement the gunplot output feature. This feature currently
hard-selects a set of fields (fields cannot be specified).
Generates two graphs. The first collects memory statistics
and machine load. The second collects cpu utilization and
fault, syscall, and nlookup (file path resolution) rate.
* In gnuplot output mode, -f will cause the entire dataset to be
regenerated every 60 seconds (I don't see any way to avoid this
to update an existing gnuplot window).
* Finish implementing -o fields
Matthew Dillon [Sat, 29 Jul 2017 19:28:51 +0000 (12:28 -0700)]
kcollect - Fix swap text output
* Collection data for type 'm' is still stored in bytes.
* Fix field width for megabytes display field.
Matthew Dillon [Sat, 29 Jul 2017 18:42:59 +0000 (11:42 -0700)]
kernel - Store page statistics in bytes
* Store page statistics in bytes rather than pages. Pages aren't useful
for userland display and there is no reason to force useland to do the
conversion.
* Include a realtime timestamp along with ticks in the structure.
* Flesh out text output for kcollect. Reverse output order to print
oldest data first, so output from the -f option stays consistent.
Matthew Dillon [Sat, 29 Jul 2017 17:30:25 +0000 (10:30 -0700)]
kernel - Add a sampling history mechanism called kcollect (2)
* Add collection code for remaining base statistics.
* Round-up some calculations.
Sascha Wildner [Sat, 29 Jul 2017 09:54:31 +0000 (11:54 +0200)]
Restore WARNS in ftpd, it was just for testing.
Sascha Wildner [Sat, 29 Jul 2017 09:47:08 +0000 (11:47 +0200)]
ftpd(8): Remove weird line with just '#'.
Sascha Wildner [Sat, 29 Jul 2017 08:32:49 +0000 (10:32 +0200)]
ccdconfig(8): Add missing free().
Reported-by: dcb
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/3014>
Sascha Wildner [Sat, 29 Jul 2017 08:09:17 +0000 (10:09 +0200)]
kernel: Remove some variables that are only set but never used.
Reported-by: dcb
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/3019>
Sascha Wildner [Sat, 29 Jul 2017 08:08:34 +0000 (10:08 +0200)]
libpuffs: Fix two asserts.
Reported-by: dcb
Dragonfly-bug: <https://bugs.dragonflybsd.org/issues/3013>
Matthew Dillon [Sat, 29 Jul 2017 06:36:07 +0000 (23:36 -0700)]
kernel - Add a sampling history mechanism called kcollect
* Add a kernel API which automatically samples useful statistics on a
10-second period without needing a user program to poll it. This API
is enabled by default and can be disabled by setting kern.collect_samples=0
in /boot/loader.conf (or setting it higher, if desired).
The idea is for the kernel to always collect a solid amount of historical
data for various useful statistics such that a user can pull it all up
going back upwards of 23 hours (or more, depending on configured samples)
after the fact. "Oh, what happened recently"... bang.
* The sysctl provides sufficient information to userland to be able to
process the statistics dynamically, without necessarily having to know
what they are.
The sysctl can be cut short to request less data for ongoing incremental
collection, if desired.
* Implement "load" collection to start with as a test. Add #defines for
everything I want the kernel to collect. The kernel API's critical path
is lockless.
* Start working on a front-end user program called 'kcollect'. This program
will eventually generate fancy graphs via gnuplot and have a dbm interface
for collecting data continuously if desired.
Sascha Wildner [Fri, 28 Jul 2017 20:49:13 +0000 (22:49 +0200)]
<sys/malloc.h>: Remove an empty #ifdef.
Sascha Wildner [Fri, 28 Jul 2017 19:41:48 +0000 (21:41 +0200)]
Sync ACPICA with Intel's version
20170728.
* Support in the resource walking code for _DMA.
* Various additions and improvements.
* Fix various bugs and regressions.
For a more detailed list, please see sys/contrib/dev/acpica/changes.txt.
Sepherosa Ziehau [Thu, 27 Jul 2017 09:42:25 +0000 (17:42 +0800)]
polling: Simplify the code by using netsr_*msg functions.
Sepherosa Ziehau [Thu, 27 Jul 2017 09:42:09 +0000 (17:42 +0800)]
netisr: Add netisr_sendmsg_oncpu()
Sepherosa Ziehau [Thu, 27 Jul 2017 07:58:44 +0000 (15:58 +0800)]
bridge: It should only run in netisr_cpus netisrs
Matthew Dillon [Thu, 27 Jul 2017 06:55:29 +0000 (23:55 -0700)]
hammer2 - Allow @LABEL to be omitted
* Allow the @LABEL in "<devicepath>@LABEL" to be omitted when mounting.
If omitted, H2 will automatically supply "@LOCAL".
* Provides convenience for simple use cases.
Matthew Dillon [Thu, 27 Jul 2017 06:42:09 +0000 (23:42 -0700)]
hammer2 - Synchronize write-in-place feature
* Disable hole creation when the check mode is disabled on a file.
Writing zeros maintains any previously assigned block.
* Allows reserving storage for a file (such as an image) by dd'ing
/dev/zero into it, as long as check mode has also been disabled
on that file. No data CRCs or hashes will be computed or checked
for the file.
* Note that this should still work properly with snapshots. A snapshot
will force block reallocation on the master for any writes that cross
the snapshot boundary.
Matthew Dillon [Thu, 27 Jul 2017 05:34:50 +0000 (22:34 -0700)]
hammer2 - Consolidate backend rename ops
* Reduce frontend XOP ops required for rename from 3 to 2 by integrating
the unlink-target operation into xop_nrename. The xop_nrename backend
function now handles replacing the target namespace when it exists and
will also get rid of any duplicates as a safety.
* Adjust the frontend inode locking order to try to avoid deadlocks.
* Adjust iparent documentation.
* Properly set iparent in the rename operation. The iparent was not
being adjusted at all.
* Properly set iparent in the inode create operation. The iparent was
improperly being set to 0 instead 1 when the parent directory was the
mount point.
Matthew Dillon [Wed, 26 Jul 2017 19:41:20 +0000 (12:41 -0700)]
libc - Fix bug in rcmdsh()
* rcmdsh() (which really nothing should be using any more anyway) used
a generic wait(NULL) to wait for a child to exit, but this can wind
up waiting for the wrong pid in a multi-threaded or multi-fork environment.
* Solved by waiting on the specific pid instead.
Matthew Dillon [Wed, 26 Jul 2017 19:39:46 +0000 (12:39 -0700)]
sshlockout - Improve manual page
* Rewrite the manual page, provide a more concise example.
* Suggest using pfctl -T expire <seconds> instead of -T flush for the
crontab entry.
Reported-by: Miroslav Lachman <000.fbsd@quip.cz>
Sascha Wildner [Wed, 26 Jul 2017 17:57:32 +0000 (19:57 +0200)]
libc/libpthread: Add clock_getcpuclockid() and pthread_getcpuclockid().
* Adjust clock_gettime() and clock_getres() to accept values obtained
this way.
* Also set _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME, although we should
really support values obtained by these functions in clock_settime()
too.
Based on and taken from FreeBSD's code.
Reviewed-by: sephe
Sascha Wildner [Wed, 26 Jul 2017 16:53:26 +0000 (18:53 +0200)]
Remove <stab.h> and <struct.h>.
* <stab.h> had information about the a.out related symbol table
format.
* <struct.h> has been removed from FreeBSD since 2001.
Both headers are not needed by anything in our tree or dports.
Sascha Wildner [Wed, 26 Jul 2017 12:05:42 +0000 (14:05 +0200)]
kernel/time: Change get_curthread_cputime() to get_thread_cputime().
Sascha Wildner [Wed, 26 Jul 2017 12:05:03 +0000 (14:05 +0200)]
<sys/types.h>: Add guard around lwpid_t, also put under __BSD_VISIBLE.
Sepherosa Ziehau [Mon, 24 Jul 2017 13:31:03 +0000 (21:31 +0800)]
altq/cbq: Drain pending callout and the cooresponding netmsg.
Sepherosa Ziehau [Mon, 24 Jul 2017 12:59:03 +0000 (20:59 +0800)]
altq/cbq: Redispatch restart function to netisr0.
Now, all pseudo interfaces' if_start run in netisr_ncpus netisrs.
Matthew Dillon [Tue, 25 Jul 2017 07:40:04 +0000 (00:40 -0700)]
hammer2 - Update DESIGN document
* Update the DESIGN document to reflect changes.
Matthew Dillon [Tue, 25 Jul 2017 02:50:47 +0000 (19:50 -0700)]
hammer2 - correct readdir bug
* Correct a readdir iteration bug for the new DIRENT type.
Matthew Dillon [Tue, 25 Jul 2017 02:05:33 +0000 (19:05 -0700)]
hammer2 - Initial HARDLINK -> DIRENT replacement code
* Initial removal of the vestiges of the old embedded inode code. Inodes
were moved to the root directory long ago but directories still contain
dummy OBJTYPE_HARDLINK inodes instead of real directory entries to point
to the moved inodes. These inodes ate 1024 bytes of disk space for each
directory entry.
* Remove the dummy OBJTYPE_HARDLINK inodes and replace with new
BREF_TYPE_DIRENT blockrefs. These blockrefs represent directory
entries, and the entire dirent will fit in the blockref (requiring
no data ref) if the filename is <= 64 bytes.
* This new DIRENT mechanic significantly improves performance and reduces
storage overage vs the previous mechanicn, for obvious reasons.
Directory entries are now 128 bytes instead of 1024 bytes, and since they
are collected together in indirect blocks or (if <= 4 entries) simply
placed in the 4 blockrefs embedded in the directory inode, the related
I/O tends to be fairly optimal.
Only directory entries whos filenames are > 64 bytes long require an
additional data block reference. For now, due to other constraints,
we use the minimum H2 allocation size of 1KB for these, so certainly
space is wasted. But in real life there aren't actually a whole lot
of filenames that are that long so it should be fine.
Matthew Dillon [Sun, 23 Jul 2017 07:57:20 +0000 (00:57 -0700)]
hammer2 - Adjust blockref to create an embedded area, start dirent work
* Create a type-specific embedded area in the blockref structure. Move
data_count and inode_count into the new area. The blockref structure
size does not change.
* Adjust code to access data_count and inode_count conditionally for
BREF_TYPE_INODE, DATA, and INDIRECT types only.
* Now that we have abandoned embedding inodes directly in directories for
normal operation, start working on removing HAMMER2_OBJTYPE_HARDLINK and
creating a real directory entry abstraction.
The real directory entry abstraction will allow directory entries to be
directly embedded in blockref structures, without requiring a data
reference for any filename <= 64 bytes. This will be accomplished by
using the new embedded area in the blockref for the directory entry
header and the check area for the filename (up to 64 bytes).
This will significantly improve directory compactness and I/O efficiency
by reducing the directory entry overhead from 1152 bytes (1024 + 128) to
just 128 bytes and guaranteeing locality since the blockrefs are
collected together in indirect blocks. Another nice facet is that since
inodes can embed up to four direct blockrefs, any directory with <=
4 entries in it can embed those entries in the directory inode itself.
So small directories will wind up being VERY compact.
We haven't entirely abandoned embedding inodes in directories as
directory entries. In fact, the feature is still used for superroot
entries, and may be allowed in the future mixed into normal directories
for 'special' non-hardlinkable directory inodes for quota control,
subdirectory
snapshot, and (NFS) export purposes.
Matthew Dillon [Sun, 23 Jul 2017 06:24:19 +0000 (23:24 -0700)]
hammer2 - Cleanup pass, remove unused fields and code
* Remove the unused per-inode cluster cache. The code isn't really
compatible with the XOP mechanism.
* Remove unused hammer2_xop_nlink() and related structures. Hardlinking
is handled through normal hammer2_inode_*() functions and no longer
needs an explicit backend.
* Remove the unused iocb.cluster field. iocb's are now exclusively
backend entities.
Sepherosa Ziehau [Mon, 24 Jul 2017 03:38:43 +0000 (11:38 +0800)]
altq: Fix typo
Sepherosa Ziehau [Fri, 21 Jul 2017 12:21:17 +0000 (20:21 +0800)]
ipflow: Use per-cpu callout, instead of pr_slowtimo.
The dynamically allocated per-cpu data structure may race the
ip_flowtimo, which calls ipflow_slowtimo.
Reported-by: zrj
zrj [Sun, 23 Jul 2017 14:21:09 +0000 (17:21 +0300)]
sys: Add size directives to assembly functions.
No functional change intended.
zrj [Sun, 23 Jul 2017 14:20:04 +0000 (17:20 +0300)]
sys: Some whitespace cleanup.
While there, fix indentation and few typos a bit.
No functional change.
zrj [Sun, 23 Jul 2017 13:54:50 +0000 (16:54 +0300)]
Fix few typos.
While there, make few whitespace adjustments.
zrj [Sun, 23 Jul 2017 07:21:45 +0000 (10:21 +0300)]
hack(6): Allow to play without setgid.
Lockfile hardlinking requires that user should own the perm file.
Sascha Wildner [Sun, 23 Jul 2017 05:40:46 +0000 (07:40 +0200)]
Remove kernbb(8).
It likely never worked in DragonFly (or until some early compiler
upgrade). FreeBSD stopped building it in 2004 (r132787).
Reported-by: zrj
Sascha Wildner [Sat, 22 Jul 2017 09:30:55 +0000 (11:30 +0200)]
Remove scsi_low.ko via 'make upgrade' (leftover from
075c6d38244abd0b0).
zrj [Sun, 2 Jul 2017 14:17:21 +0000 (17:17 +0300)]
libstdcxx5: Add profiled library support.
zrj [Sun, 2 Jul 2017 14:12:41 +0000 (17:12 +0300)]
lib/libexecinfo: Fix static and profiled archives.
Previously archives were embedded within archives.
Reported-by: tuxillo
zrj [Sun, 2 Jul 2017 10:46:11 +0000 (13:46 +0300)]
cpu/asm.h: Use optimal alignment for assembly functions on x86_64.
Entry point at 16 byte boundary is better for x86_64.
Preserve previous alignment for sys/boot/ 32bit loader.
zrj [Sun, 2 Jul 2017 10:41:19 +0000 (13:41 +0300)]
pg: Add missing dummy stack frames for mcount for x86_64.
Safer to do it in a single place than miss one in assembly function.
Fixes segfaults for c++ runtime library with profiled libc(strcmp.S).
Affects only -pg compilations.
zrj [Sun, 2 Jul 2017 10:39:47 +0000 (13:39 +0300)]
pg: Use long for fptrdiff_t type.
On x86_64 it can easily overflow and very hard to detect.
zrj [Sun, 2 Jul 2017 10:33:49 +0000 (13:33 +0300)]
libstdcxx5: Fix profiled library creation.
It was embedding archives within archives. Do not do it.
For now created library is still partially profiled, some expansion
to INTERNALLIB (like new INTERNALLIBPROF) handling will be needed.
This is a partial fix to have c++ -pg working.
While there, throw in ranlib for good measure.
Reported-by: tuxillo
zrj [Sun, 2 Jul 2017 10:30:05 +0000 (13:30 +0300)]
bsd.lib.mk: Add INTERNALLIBPROF knob.
Allow to build profiled versions of internal libs without installing them.
Will be useful for the corner cases, spec. to build modern compilers or
libraries containing internal libraries like libexecinfo.a(libelf.a).
Sascha Wildner [Fri, 21 Jul 2017 18:59:32 +0000 (20:59 +0200)]
<glob.h>/<sys/time.h>: Clean up the namespace a bit better.
These headers don't need the full weight of <sys/types.h>.
While here, sync glob()'s prototype with the standard and fix a typo
in a comment.
Sascha Wildner [Fri, 21 Jul 2017 18:52:35 +0000 (20:52 +0200)]
<glob.h>/<sys/time.h>: Some minimal whitespace cleanup.
Sepherosa Ziehau [Fri, 21 Jul 2017 08:44:29 +0000 (16:44 +0800)]
vlan: It should only run in netisr_cpus netisrs
Sepherosa Ziehau [Fri, 21 Jul 2017 08:23:29 +0000 (16:23 +0800)]
ipflow: Regroup percpu data.
Sepherosa Ziehau [Fri, 21 Jul 2017 07:41:04 +0000 (15:41 +0800)]
ipflow: It can only run in first netisr_ncpus netisrs
Sepherosa Ziehau [Fri, 21 Jul 2017 06:23:06 +0000 (14:23 +0800)]
ipfw: ipfw only runs on netisr_ncpus
Sepherosa Ziehau [Fri, 21 Jul 2017 06:21:41 +0000 (14:21 +0800)]
netisr: Add add support for netisr_ncpus
- netisr_forwardmsg(), which only forwards netmsg to netisr_ncpus.
- ASSERT_NETISR_NCPUS, which asserts the thread is one of the netisrs
on netisr_ncpus.
Sascha Wildner [Thu, 20 Jul 2017 17:21:20 +0000 (19:21 +0200)]
In <signal.h> and <sys/devicestat.h>, include <sys/types.h> explicitly.
This is in preparation for cleaning up <sys/time.h>'s namespace, which
<signal.h> and <sys/devicestat.h> relied on previously for bringing in
<sys/types.h>, but which does not actually need it for its own stuff.
Sascha Wildner [Wed, 19 Jul 2017 20:10:11 +0000 (22:10 +0200)]
<sys/posix4.h>: Clean up a bit.
* This is only supposed to be included by the kernel. Error if _KERNEL
isn't defined.
* Adjust #endif comments.
* Move include guard down.
Sepherosa Ziehau [Tue, 18 Jul 2017 08:58:38 +0000 (16:58 +0800)]
netisr: netisr_forwardmsg -> netisr_forwardmsg_all
This function actually forwards netmsg to all available netisrs,
instead of netisr_ncpus netisrs.
For some modules, this is obviously not necessary; they will be
fixed one-by-one later.
Sascha Wildner [Sun, 16 Jul 2017 09:50:30 +0000 (11:50 +0200)]
Sync time(1)'s manual page a bit with FreeBSD, too.
Sascha Wildner [Sun, 16 Jul 2017 00:30:50 +0000 (02:30 +0200)]
Update the pciconf(8) database.
July 13, 2017 snapshot from http://pciids.sourceforge.net/
Markus Pfeiffer [Sat, 15 Jul 2017 22:16:12 +0000 (23:16 +0100)]
time: Use clock_gettime
gettimeofday is not suitable for measuring runtimes, as it is
not guaranteed to be monotonic.
Markus Pfeiffer [Sat, 15 Jul 2017 22:52:23 +0000 (23:52 +0100)]
time: Handle SIGINFO in time(1)
If the process receives SIGINFO print the elapsed time.
Taken-From: FreeBSD r158560 and r283073
Markus Pfeiffer [Sat, 15 Jul 2017 22:51:35 +0000 (23:51 +0100)]
time: Handle SIGINFO in time(1)
SIGINFO printing the time the given command is running.
Taken-From: FreeBSD r158560
Markus Pfeiffer [Sat, 15 Jul 2017 21:58:07 +0000 (22:58 +0100)]
time: Use close-on-exec instead of fclose() in the child process.
Taken-From: FreeBSD r244034
Markus Pfeiffer [Sat, 15 Jul 2017 22:49:39 +0000 (23:49 +0100)]
time: FreeBSD r169346
- Cast to intmax_t to print tv_sec in struct timeval.
- Avoid shadowing a global variable with a function argument.
Markus Pfeiffer [Sat, 15 Jul 2017 21:38:44 +0000 (22:38 +0100)]
time: Close an output file -o flag opened before execvp(3) in a child.
Taken-From: FreeBSD r157796
Imre Vadász [Sat, 15 Jul 2017 09:13:36 +0000 (11:13 +0200)]
pthread: Add pthread_getthreadid_np() function, bump __DragonFly_version.
Using pthread_getthreadid_np() can directly use the thread-ID value that is
already cached in the pthread_t struct.
Partly Taken-From: FreeBSD
Sascha Wildner [Sat, 15 Jul 2017 08:31:29 +0000 (10:31 +0200)]
ifnet: Fix typo.
Imre Vadász [Sun, 9 Jul 2017 12:08:38 +0000 (14:08 +0200)]
Define __* symbols for the malloc(3) functions to make wrapping easier.
This should match what FreeBSD and other systems do. Where the __* variants
always refer to the libc function, but the actual malloc(), free() etc.
symbols can be overrided by a malloc wrapper.
Imre Vadász [Sat, 1 Jul 2017 20:42:48 +0000 (22:42 +0200)]
Resolve issue with libusb C++ header file inclusion.
Taken-From: FreeBSD (svn r302171)
Imre Vadász [Sat, 1 Jul 2017 20:37:03 +0000 (22:37 +0200)]
Implement libusb_hotplug_register_callback() and _deregister_callback().
Implement libusb_hotplug_register_callback() and
libusb_hotplug_deregister_callback() for the LibUSB v1.0 API and
update the libusb(3) manual page.
Taken-From: FreeBSD (svn r302080)
Sepherosa Ziehau [Tue, 11 Jul 2017 02:15:45 +0000 (10:15 +0800)]
ifnet: Log rarely used ifnet address destruction.
Sepherosa Ziehau [Tue, 11 Jul 2017 02:11:54 +0000 (10:11 +0800)]
ifnet: Break long lines.
Sepherosa Ziehau [Tue, 11 Jul 2017 02:06:29 +0000 (10:06 +0800)]
ifnet: ifa_addr should always be configured.
Sepherosa Ziehau [Tue, 11 Jul 2017 02:03:57 +0000 (10:03 +0800)]
ifnet: Delete INET address should not fail; panic upon failure.
This helps catch the root cause of a tun(4) related crash.
Reported-by: dillon
Sascha Wildner [Mon, 10 Jul 2017 17:56:19 +0000 (19:56 +0200)]
libthread_xu: Some small fixes.
* Add some parentheses for readability.
* 'count' is already unsigned, so remove useless <0 check.