Move For_Break further up, as the functions in that file are sorted from
small to big. The cast from size_t to unsigned int is required by lint.
In parse.c, move the code into a separate function to keep
ParseDirective small. Its only job is to parse the directive and then
delegate to another function doing the actual work.
In the manual page, remove empty lines.
In the test, ensure that .break stops processing of the .for loop
immediately; anything after the .break is not processed anymore.
Replace ':=' with '=', as there is no need to evaluate '$i' early.
Check the expected value in the .mk file instead of the .exp file, to
keep the reading scope as small as possible.
When .break is encountered within a .for loop
it causes immediate termination.
Outside of a .for loop .break causes a parse error.
Reviewed by: christos
This was never relevant on FreeBSD and I don't think it is relevant on
NetBSD either. The FreeBSD change to lift this restriction had the
following comment:
r306570 | markj | 2016-10-02 00:35:00 +0000 (Sun, 02 Oct 2016) | 7 lines
Allow tracing of functions prefixed by "__".
This restriction was inherited from upstream but is not relevant on FreeBSD.
Furthermore, it hindered the tracing of locking primitive subroutines.
Rather than excplicitly referencing ip_pktq and ip6_pktq in if_detach(),
instead add all pktqueues to a global list. This list is then used in
the new pktq_ifdetach() function to issue a barrier on all pktqueues.
Note that the performance of this list is not critical; it will seldom
be accessed (then pktqueues are created/destroyed and when network
interfaces are detached), and so a simple synchronization strategy using
a rwlock is sufficient.
calls; pktq_barrier() doesn't remove packets from the queue, it waits
for the packets enqueued before the barrier to drain. This, in turn,
may cause the protocols to gain additional references to the interface
that's detaching. By draining the queues first, we ensure that no
additional references will be taken after calling pr_purgeif().
Provide a new pktq_sysctl_setup() function that attaches standard
pktq sysctl nodes below a specified parent node, with either a
fixed node ID or CTL_CREATE to dynamically assign node IDs. Make
all of the sysctl handlers private to pktqueue.c, and remove the
INET- and INET6-specific pktqueue sysctl code from net/if.c.