Commit Graph

245318 Commits

Author SHA1 Message Date
christos
192a00203a Hide MFREE now that it is not being used anymore and provide some debugging
for the location of the last free for debugging kernels.
2016-10-04 14:13:21 +00:00
christos
a406e29ff1 put back dmesg 2016-10-04 14:00:27 +00:00
christos
c7db9c14b4 return 0 on unsupported bases. 2016-10-04 12:48:15 +00:00
wiz
33e9a4f901 Fix xref. 2016-10-04 10:46:40 +00:00
kamil
3f2b401a31 libc: Add the timespec_get function and TIME_UTC definition in the
<time.h> header. Enable unconditionally the timespec struct
      definition in <time.h>. Changes conform to the C11 standard.
2016-10-04 09:55:56 +00:00
kamil
7f4b5eb156 Add timespec_get(3) in <time.h> and enable unconditionally struct timespec
These changes conforms to the C11 standard
References:
 - 7.27.1/3 Components of time (struct timespec)
 - 7.27.2.5 The timespec_get function

According to ISO/IEC 9899:201x (draft) <time.h> defines the timespec
structure and declares the timespec_get(3) function with TIME_UTC
definition.

According to a C++17 standard draft <ctime> offers the same interface in
the std:: namespace.

The timespec_get function modifies the timespec object pointed by ts
to hold the current calendar time in the given base. The standard notes
only the TIME_UTC base with implementation defined value, set it to 1
as zero is reserved for error handling. Once operation was successful this
function returns passed base, otherwise exits with zero.

The timespec struct was already part of the POSIX standard in <time.h>.

Enable this interface unconditionally in the header to allow to use it
in a code prior C11 and C++17 as an extension.

Review notes from <christos>
2016-10-04 09:41:40 +00:00
wiz
58273d9dba Add some articles, sort SEE ALSO, make an xref. 2016-10-04 09:21:05 +00:00
mrg
254b21d863 convert the old binutils and gdb lists to only contain the
unconverted ports:
	ppc64/mips64 for both
2016-10-04 04:58:11 +00:00
ozaki-r
48cafa77c5 Add tests for sysctl net.inet.ip.mtudisc
From suzu-ken@IIJ
2016-10-04 04:15:25 +00:00
ozaki-r
85424d4772 Add tests for sysctl net.inet6.ip6.auto_linklocal
From suzu-ken@IIJ
2016-10-04 03:43:15 +00:00
ozaki-r
b6cf257731 Add tests for sysctl net.inet6.ip6.dad_count
From suzu-ken@IIJ
2016-10-04 03:41:33 +00:00
rkujawa
47a53d3226 Note mntva(4). 2016-10-03 21:36:32 +00:00
kamil
5770e440f3 libc: Add the C11 static_assert macro in <assert.h>. 2016-10-03 20:31:44 +00:00
rkujawa
a82859c06b Add mntva(4) man page to dist list. 2016-10-03 18:59:41 +00:00
rkujawa
b1cdec8a9d Add man page for mntva(4). 2016-10-03 18:57:54 +00:00
kre
fb4c39416a 80 column violation fixes, hopefully minor readability improvements.
No intended functional change.
2016-10-03 17:59:27 +00:00
maya
74618eb97f correct misleading indentation in if 0'd code. 2016-10-03 17:35:38 +00:00
christos
beaa4a9608 bump warns 2016-10-03 17:06:58 +00:00
abhinav
e108642273 We don't need to parse the sections we don't index, so stop early. Saves few
instructions.
2016-10-03 16:11:11 +00:00
rkujawa
a1ee30a19f Add a driver for MNTMN VA2000.
Supports accelerated wsdisplay console and running X via wsfb driver.
2016-10-03 14:26:02 +00:00
abhinav
150a47b73e With the latest release of mandoc, makemandb(8) started to parse some
sections multiple times. This started to happen because, pmdoc_Sh(), the handler function
responsible for parsing the Sh macros, used to recursively go through all the child
nodes and then the next nodes starting from top level Sh block node.
Now, once it has processed all the child nodes of the top level block node,
it moves to the next node, which is the top level block node of the next section and
in this way one call to pmdoc_Sh() was causing a complete pass through the
man page. Since, mandoc(3) calls pmdoc_Sh() for each .Sh macro in the man
page, it would result in parsing some of the sections multiple times.
This never happened with the previous versions of mandoc, so we never noticed.

I've fixed this by starting the parse sequence of the Sh macro from its body, which gurantees
that we will stop once that section ends.

ok christos@
2016-10-03 13:53:39 +00:00
abhinav
1c4ff59f37 Mark the section and md5_hash columns as unindexed in the FTS table, as they are not used for search 2016-10-03 13:36:35 +00:00
skrll
cb7dd11fb0 Do not hold the softc lock (IPL_SOFTUSB) unnecessarily and specifically
across ucomparam (and the ucom_param method).  The method can sleep wait-
ing for transfers... any input/output will try to acquire the lock and get
stuck
2016-10-03 13:36:33 +00:00
kamil
ba27f5b7d6 Add static_assert macro definition in <assert.h>
This declaration conforms to the C11 standard
Reference: ISO/IEC 9899:201x 7.2 Diagnostics <assert.h>

_Static_assert performs compile-time assertion checking.

According to ISO/IEC 9899:201x (draft) 7.2 Diagnostics <assert.h> defines
the static_assert macro which expands to _Static_assert. It's not
conditionalized by NDEBUG like the assert macro.

According to ISO/IEC N3242=11-0012 (C++1x) the <cassert> header shall
define only the assert macro, but not static_assert as it's already part
of the C++11 language.

Allow to define static_assert in C++ prior the C++11 standard. It might be
broken but a nonstandard C++ compiler might support C11-like _Static_assert
feature. Note that it's fatal for g++ 5.4, but it works for clang++ 3.8.1.

Approved by <joerg>.
2016-10-03 12:08:39 +00:00
ozaki-r
8f4376cb6f Fix race condition on ifqueue used by traditional netisr
If a underlying network device driver supports MSI/MSI-X, RX interrupts
can be delivered to arbitrary CPUs. This means that Layer 2 subroutines
such as ether_input (softint) and subsequent Layer 3 subroutines (softint)
which are called via traditional netisr can be dispatched on an arbitrary
CPU. Layer 2 subroutines now run without any locks (expected) and so a
Layer 2 subroutine and a Layer 3 subroutine can run in parallel.

There is a shared data between a Layer 2 routine and a Layer 3 routine,
that is ifqueue and IF_ENQUEUE (from L2) and IF_DEQUEUE (from L3) on it
are racy now.

To fix the race condition, use ifqueue#ifq_lock to protect ifqueue
instead of splnet that is meaningless now.

The same race condition exists in route_intr. Fix it as well.

Reviewed by knakahara@
2016-10-03 11:06:06 +00:00
wiz
89ab2da6d9 Minor improvements, add more markup. 2016-10-03 08:20:12 +00:00
ozaki-r
14c6c81f32 Add missing return 2016-10-03 07:13:29 +00:00
ozaki-r
02711c8802 Fix typo 2016-10-03 01:23:55 +00:00
kamil
f39f51a53f c11: Import cc(1) wrapper for C11 2016-10-03 01:04:36 +00:00
kamil
b3c98abce0 Import c11(1) - a cc -std=c11 wrapper
This script is similar to c89(1) and c99(1).

It's a NetBSD extension. The c89(1) and c99(1) scripts are part of POSIX.
2016-10-03 01:00:27 +00:00
dholland
226cad50eb Improve diagnostic print seen in PR 51524. 2016-10-03 00:32:37 +00:00
jdolecek
56fb1bd45a add ahci(4) to list 2016-10-02 23:14:19 +00:00
jdolecek
a70b44767c make symlink ahci.4 -> ahcisata.4 2016-10-02 22:44:30 +00:00
abhinav
961fb352ab Move information about exit values from DESCRIPTION to EXIT STATUS section.
ok wiz@
2016-10-02 21:06:18 +00:00
abhinav
40e3a09c63 kill(1) is a utility, not a function. 2016-10-02 21:00:54 +00:00
jdolecek
c7b1f4eb42 change scsipi_execute_xs() to default to simple tags for !XS_CTL_URGENT
if not specified by caller; this is mostly for documentation purposes
only, as sd(4) and cd(4) explicitly use simple tags already
2016-10-02 19:40:35 +00:00
christos
da90486716 more MFREE -> m_free 2016-10-02 19:26:46 +00:00
christos
44548039a1 use __func__ and print the filesystem we are printing the message for. 2016-10-02 19:02:57 +00:00
kamil
40eb0908ed libc: Add <stdalign.h> and <stdnoreturn.h>.
These headers conform C1x (ISO/IEC 9899:201x).
2016-10-02 17:28:57 +00:00
kamil
7db6ba3b08 Import <stdalign.h>
This header conforms to the C11 standard
Reference: ISO/IEC 9899:201x 7.15 Alignment <stdalign.h>

According to ISO/IEC 9899:201x (draft) 7.15 Alignment <stdalign.h> defines
four macros:
 - alignas which expands to _Alignas
 - alignof which expands to _Alignof
 - __alignas_is_defined and __alignof_is_defined which both expand to 1

The _Alignas declaration appears as one of the type specifiers to modify
the alignment requirement of the object being declared.

The _Alignof operator is used to query the alignment requirement of its
operand type.

ISO/IEC N3242=11-0012 (C++1x) and ISO/IEC N3797 (C++1y) both note a header
<cstdalign> which defines only __alignas_is_defined and shall not define
the alignas macro. It misses the alignof case as it's probably based on an
older C1x draft, which defined only alignas. Assume that this is a bug in
the standard and treat alignof the same way as alignas in C++11.

Allow to define alignas and alignof in C++ prior the C++11 standard. It
might be broken but a nonstandard C++ compiler might support C11-like
_Alignas and _Alignof. Note that it's fatal for g++(1) v.5.4.
2016-10-02 17:19:00 +00:00
jdolecek
9e58801f20 drop wl_mtx mutex during call to pool_get() with PR_WAITOK
pointed out by riastradh
2016-10-02 16:52:27 +00:00
jdolecek
407be399a4 fix off-by-one in wapbl_write_revocations() - when exiting the write loop,
wd gets set to next unwritten record, not last written one as code assumed;
'lost head!' KASSERT is not triggered any more
2016-10-02 16:44:02 +00:00
kre
5c162fef83 This test works fine on real hardware, but due to PR kern/43997 (qemu
timing problems) fails when run under qemu.   Attempt to compensate
for that (by skipping the problematic test case) when running in qemu.

This should be reverted when the PR gets fixed (either in qemu or in
the NetBSD kernel).
2016-10-02 15:27:32 +00:00
jdolecek
c69152bd80 wapbl_write_revocations(): fix use-after-free when writing more then one
block worth of revocations, introduced in previous commit; discovered by
Brad Harder on current-users
2016-10-02 14:38:46 +00:00
christos
9c7db92f68 MFREE -> m_free 2016-10-02 14:16:02 +00:00
kamil
7798b8a775 Import <stdnoreturn.h>
This header conforms to the C11 standard
Reference: ISO/IEC 9899:201x 7.23 _Noreturn <stdnoreturn.h>

According to ISO/IEC 9899:201x (draft) <stdnoreturn.> defines the
noreturn macro which expands to _Noreturn.

The _Noreturn keyword appears in a function declaration and specifies
that the function does not return by reaching the end of the function
body.

Design choices:
 - don't implicitly break C++ code including this header with #error
   C++11 offers [[noreturn]] which conflicts with C11 _Noreturn

 - don't check for __STDC_VERSION__, everybody is free to reuse it with
   a nonstandard compiler not conforming to C11 but supporting _Noreturn

   gcc(1) and clang(1) support _Noreturn in -std=c99 and older standards

   this follows <stdbool.h> choice for not checking for C99

 - follow <stdbool.h> and declare the __noreturn_is_defined guard

 - use a standard header guard (_STDNORETURN_H_), similar to <stdbool.h>

Reviewed by <pgoyette> and <joerg>
2016-10-02 13:09:24 +00:00
maya
4b2f24ad42 Simplify. LOONGSON2 and MIPSNNR2 not possible. 2016-10-02 09:06:35 +00:00
kre
0e8fe63eab More adaptation to changed ifconfig output format. 2016-10-02 04:46:07 +00:00
kre
076ee4f8af More adaptation to new ifconfig output format - prefix length is now
appended to the address, rather than a second parameter, so needs to be
deleted if just the bare address is what we want (which it is here).
2016-10-02 04:29:25 +00:00
kre
1b0c0c88db Don't expect ping to complain about sending to a local address
assigned to an interface that's down - instead it just attempts
to send, and the interface never responds (as it would if it were
a remote address).
2016-10-01 22:15:04 +00:00