Hartmut Brandt [Thu, 12 May 2005 15:10:45 +0000 (15:10 +0000)]
The first element of the vector built by brk_string() is never
used so there is no need to stuff the value of .MAKE into it,
which btw isn't set for quite a while already.
Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.239)
Hartmut Brandt [Thu, 12 May 2005 15:04:14 +0000 (15:04 +0000)]
Cleanup. Move initialisation of file and program global variables
to top of main() and sort them. Make chdir_verify_path() static - it
is used only here.
Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.238)
Hartmut Brandt [Thu, 12 May 2005 14:43:32 +0000 (14:43 +0000)]
Cleanup main(). Move catching SIGCHLD into job.c. Move unsetenv("ENV")
into job.c. Move retrieving of environment nearer to the place where it
is actually used and invert the preprocessor conditionals to use
positive logic.
Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.236)
Hartmut Brandt [Thu, 12 May 2005 14:16:44 +0000 (14:16 +0000)]
Fix the fix for bin/72510 applied in job.c:1.70. Actually there have
been two maxJobs variables: one static in job.c and one global used in
main.c and parse.c. Makeing one global out of these was the wrong way
to fix the problem. Instead rename the global one to jobLimit and keep
maxJobs static in job.c.
- Move the NPX_DEBUG option to options.{i386,pc98} and use opt_npx.h.
- Move npx related defines to {i386,pc98}/include/npx.h to remove #include
{isa,cbus}.h.
Hartmut Brandt [Thu, 12 May 2005 10:40:57 +0000 (10:40 +0000)]
Overhaul the fork(), exec() code. Put all the common handling that
takes place in the child process in a function ProcExec(). Make sure,
that the child does not call malloc() or other potential dangerous
functions (there are still calls to Punt() in the error case that
should go away). Allocate the argv string via malloc to overcome
the non-constness bug of the execvp prototype. Change the handling of
shell meta-characters and move the builtin list near the list of shell
builtins. Both of these lists should actuall be configurable by the .SHELL
target since they depend on the shell used.
Patch: 7.21[2-9], 7.22[0-46]
Submitted by: Max Okumoto <okumoto@ucsd.edu>
Peter Grehan [Thu, 12 May 2005 04:09:41 +0000 (04:09 +0000)]
The final test in unlock_and_deallocate() to determine if GIANT needs to be
unlocked wasn't updated to check for OBJ_NEEDGIANT. This caused a WITNESS
panic when debug_mpsafevm was set to 0.
Paul Saab [Wed, 11 May 2005 21:37:42 +0000 (21:37 +0000)]
When looking for the next hole to retransmit from the scoreboard,
or to compute the total retransmitted bytes in this sack recovery
episode, the scoreboard is traversed. While in sack recovery, this
traversal occurs on every call to tcp_output(), every dupack and
every partial ack. The scoreboard could potentially get quite large,
making this traversal expensive.
This change optimizes this by storing hints (for the next hole to
retransmit and the total retransmitted bytes in this sack recovery
episode) reducing the complexity to find these values from O(n) to
constant time.
The debug code that sanity checks the hints against the computed
value will be removed eventually.
Submitted by: Mohan Srinivasan, Noritoshi Demizu, Raja Mukerji.
Max Khon [Wed, 11 May 2005 17:02:38 +0000 (17:02 +0000)]
- check for geom_uzip module presence using kldstat -m.
kldstat -m finds geom_uzip module even if it is compiled in statically.
- create output file with x bit set.
- build mkuzip on all architectures (verified with "make universe").
- fix typo in info message.
Warner Losh [Wed, 11 May 2005 15:21:22 +0000 (15:21 +0000)]
Take out Giant in uhub_child_* in giant. There's one place where we
could sleep which I think can lead to races. However, there are fewer
with this code than without it.
Gleb Smirnoff [Wed, 11 May 2005 11:26:24 +0000 (11:26 +0000)]
A new version of NetFlow node.
The most significant changes are:
- Use UMA zone instead of own chunk of memory.
- Lock each hash entry separately.
- Expire items "actively" - interrupt method can expire flows
from hash slot, when it searches through it.
- Remove global tailqueue. Make callout thread search through
every hash slot.
- Export datagram is detached from private data and filled. If
it is incomplete, it is attached back. Another thread will
continue working with it.
Lesser, but also important speedups:
- Flows in hash slot are stored in tailqueue. Whenever a flow is
hit, it is moved to the begging, so it can be located quicker.
- When callout thread works with hash slot it bails out if
slot mutex is contested.
Tim Kientzle [Wed, 11 May 2005 03:47:48 +0000 (03:47 +0000)]
Since the FreeBSD local modifications are mostly trivial (consisting
primarily of pointless $FreeBSD$ tags), sync most files in HEAD with
those in the ZLIB branch. This minimizes the differences between
HEAD and ZLIB and should simplify future imports.
After this, there are only three files with local modifications
(gzio.c, minigzip.c, and zconf.h) and two non-vendor files
(Makefile, zopen.c). The rest exactly match the vendor distribution.
Hartmut Brandt [Tue, 10 May 2005 14:27:04 +0000 (14:27 +0000)]
Move the definitions of the OP_* constants from make.h into GNode.h
where they actually belong to. Move the definitions of the strings
for special macros like "$*" from make.h to parse.h - they're used
only in the parser.
Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.211)
Hartmut Brandt [Tue, 10 May 2005 14:23:31 +0000 (14:23 +0000)]
Path_Expand() expects its first argument to be writeable so put the
default system directory into a writeable character array before passing
it to Path_Expand().
Submitted by: Max Okumoto <okumoto@ucsd.edu> (7.210)
Gleb Smirnoff [Tue, 10 May 2005 14:19:10 +0000 (14:19 +0000)]
- Assert that mbuf length equals packet length.
- Tell libalias, that we have MCLBYTES to play with.
- Obtain length of data in mbuf from updated IP header.
Change a directory layout for pc98.
- Move MD files into <arch>/<arch>.
- Move bus dependent files into <arch>/<bus>.
Rename some files to more suitable names.
Hartmut Brandt [Tue, 10 May 2005 12:02:15 +0000 (12:02 +0000)]
Var_SubstOnly() is only used to subsitute a variable from the global
context (and only in one place to substitute the .for variable). Therefor
there is no need to pass the context as a parameter.
Patch: 7.197
Submitted by: Max Okumoto <okumoto@ucsd.edu>
Tim J. Robbins [Tue, 10 May 2005 10:52:30 +0000 (10:52 +0000)]
Merge. Discard local bracket expression collating order patch, since
modern versions of GNU regex already do things the way we want when
multibyte character support is enabled.
Hartmut Brandt [Tue, 10 May 2005 08:06:13 +0000 (08:06 +0000)]
Make make a little bit more POSIXish with regard to option parsing:
take everything after -- as either a macro assignment or a target.
Note that make still reorders arguments before --: anything starting
with a dash is considered an option, anything which contains an equal
sign is considered a macro assignment and everything else a target.
This still is not POSIX with regard to the options, but it will probably
not change because it has been make's behaviour for ages.
Add a new function Var_Match() that correctly skips a macro call by just
doing the same as Var_Subst() but without producing output. This will help
making the parser more robust.
Patches: 7.190,7.191
Submitted by: Max Okumoto <okumoto@ucsd.edu>
Hartmut Brandt [Mon, 9 May 2005 14:06:04 +0000 (14:06 +0000)]
Split Var_Subst() into two functions: Var_SubstOnly() which substitutes
only one variable and Var_Subst() which substitutes all. Split out the
test whether a variable should not be expanded into match_var().
Make access to the input string consistently using str[]. Remove two
unused functions: Var_GetTail() and Var_GetHead().
Patches: 7.184-7.189
Submitted by: Max Okumoto <okumoto@ucsd.edu>