Commit Graph

280157 Commits

Author SHA1 Message Date
christos ce43f29fa9 Instead of defining RTF_LLINFO, use RTF_LLDATA 2020-08-29 19:27:40 +00:00
christos ad93f4b708 Document 'L' 2020-08-29 19:27:08 +00:00
rillig fc496dc802 make(1): add test for the .ifmake directive 2020-08-29 19:07:32 +00:00
thorpej 7e4c09e726 - cpu_need_resched(): Explicitly cover each RESCHED_* case, and add a
comment explaining why we don't need to act on IDLE+REMOTE.
- cpu_signotify(): Move to machdep.c, and if we're asked to notify
  an LWP running on another CPU, send an AST IPI to that CPU.  Add some
  assertions.
- cpu_need_proftick(): Move to machdep.c, add some assertions.
2020-08-29 19:06:32 +00:00
jakllsch 5ea5576a98 tegra_xusb: fix xusb static firmware build
To work around objcopy and ld now being unable to create a EABI5 object
from a binary, use the assembler directive .incbin in inline assembly
to pull in the firmware blob.

This also probably makes TEGRA210_XUSB_BIN_STATIC actually work.
2020-08-29 19:06:17 +00:00
christos 53f0e087ea add WGACA 2020-08-29 18:54:33 +00:00
rillig a02fdff94e make(1): add tests for .else and .for + .endif 2020-08-29 18:50:25 +00:00
christos 41a44ad8ce Partially revert previous: set RTF_HOST regardless of mask for point-to-point
links. Unbreaks IPSEC/L2TP configurations.
2020-08-29 17:41:14 +00:00
rillig d28d390c4c make(1): add tests for .SILENT, .BEGIN and .END 2020-08-29 17:34:21 +00:00
rillig 64e0a331dc make(1): fix build with -DUSE_EMALLOC 2020-08-29 16:47:45 +00:00
rillig cad1a8f59c make(1): explain the shuffled messages in the test output 2020-08-29 16:13:27 +00:00
christos 812f89458a Locking protocol changed again, unlock after send/recv 2020-08-29 16:07:11 +00:00
thorpej 78fcb07de0 Enable DIAGNOSTIC by default in -current. Should be commented out
in release branches.  Add commented-out LOCKDEBUG option.
2020-08-29 16:00:36 +00:00
thorpej 4ddf659796 In ipl2psl_table[], use IPL_SCHED instead of IPL_CLOCK (the legacy name),
and add a comment noting that this is the level IPIs come in with on
alpha.
2020-08-29 15:29:30 +00:00
rillig f76631bc42 stdio(3): fix typos in the manual page
fputc cannot read characters, it can only write them.
2020-08-29 15:25:57 +00:00
thorpej b8e5e342e7 Make sure init_prom_interface() only runs once, otherwise we initialize
a mutex twice, and that upsets LOCKDEBUG.  But instead of seeing a
proper message about it, the output happens before the PROM console
interfcace is initialized, we would end up with a translation fault
back into SRM.
2020-08-29 15:16:12 +00:00
rillig 157f198ab9 make(1): add test for the special .IGNORE dependency source 2020-08-29 15:06:33 +00:00
christos 4802d37db0 PR/55599: Valery Ushakov: libpcap gets SIGBUS on strictly aligned CPUs
Define LBL_ALIGN as suggested
2020-08-29 15:05:33 +00:00
rillig 6c6514f5e6 make(1): fix assertion failure for .SUFFIXES in archives
This occurred in the posix1.mk test, even though it is disabled in
unit-tests.  But in tests/usr.bin/make it still runs.  There, it should
have produced an "expected failure" but crashed instead.

The archive-suffix test is the stripped-down version of the posix1 test.
2020-08-29 14:47:26 +00:00
rillig 3c38adc32d make(1): trust that Var_Parse never returns NULL
That function is quite long, but all its return paths lead either to the
expanded variable expression, or to var_Error or varNoError.
2020-08-29 13:38:48 +00:00
fcambus 527132cc8c Fix a bunch of typos in various man pages. 2020-08-29 13:32:27 +00:00
rillig 82fdd8ef8a make(1): trust that Var_Subst never returns NULL
It really never does, and it doesn't even report errors.  It just
returns the content of the buffer, up to the first parse error.
2020-08-29 13:16:54 +00:00
rillig 5701760711 make(1): make getBoolean simpler
This function is so seldom used that there is no point having
complicated code for it.
2020-08-29 13:04:30 +00:00
rillig 123d5708b5 make(1): add comments for ModifyWord_Subst
Without any comments, the code is unnecessarily hard to follow.
2020-08-29 12:48:17 +00:00
rillig 0f5754839c make(1): clean up comments in dir.c 2020-08-29 12:39:32 +00:00
rillig 7571daa697 make(1): clean up documentation for CompatInterrupt and Compat_Run 2020-08-29 12:36:20 +00:00
rillig b2375adf62 make(1): split ApplyModifier_To into paragraphs 2020-08-29 12:27:10 +00:00
rillig 1c4ffcb2c3 make(1): remove ReturnStatus, SUCCESS and FAILURE
These are used in so few places now that it is easier to use a simple
Boolean for them.
2020-08-29 12:20:17 +00:00
rillig b48f40fbd4 make(1): clean up comments in suff.c, small refactorings
In SuffParseTransform, the parameter names have been renamed to make the
"side effects" comment redundant.

In Suff_AddSuffix and Suff_AddLib, the parameter has been made const.

In SuffRemoveSrc, the unused variable has been removed, and the return
type has been fixed.
2020-08-29 12:01:46 +00:00
rillig 23181bcce8 make(1): add bmake_strsedup for duplicating a substring 2020-08-29 11:24:54 +00:00
rillig a030b41f9a make(1): merge duplicate code for bmake_strldup 2020-08-29 11:13:43 +00:00
rillig 1421342aa6 make(1): fix test opt-debug-g1
Including the directory cache made the test output fragile.
2020-08-29 10:52:47 +00:00
rillig bb2ba6a0e5 make(1): rename LstNode functions to match their type 2020-08-29 10:41:12 +00:00
rillig 938bc75c66 make(1): clean up indentation, comments and variable scope in job.c 2020-08-29 10:35:03 +00:00
rillig 4ec235756f make(1): remove duplicate code for allocation a substring 2020-08-29 10:32:00 +00:00
rillig f6a7d0bc31 make(1): rename Lst_FindB back to Lst_Find
The migration from "comparison function" to "match function" is done,
the "B" in the names is no longer needed.
2020-08-29 10:12:06 +00:00
rillig db2e5ed453 make(1): migrate remaining Lst_Find to Lst_FindB
While here, rename SuffSuffIsSuffix to SuffSuffGetSuffix since a
function named "is" should return a boolean, not a string pointer.
2020-08-29 10:06:23 +00:00
rillig d1c1d9370a make(1): start replacing Lst_Find with Lst_FindB
Lst_Find is called with a "comparison" function that returns the integer
0 if the desired node is found.  This leads to confusion since there are
so many different return value conventions for int, such as 0/1 for
mimicking false/true, -1/0 as in close(2), and the sign as in strcmp(3).
This API is much easier to understand if the "comparison" function is
not called a comparison function (since that is too close to strcmp),
but a "match" function that just returns a boolean.

In Lst_FindFromB, the node argument may be null.  This deviates from the
other Lst functions, which require Lst and LstNode to generally be
non-null.  In this case it is useful though to make the calling code
simpler.

In arch.c, this makes a lot of the previous documentation redundant.

In cond.c, the documentation is reduced a little bit since it had
already been cleaned up before.  It also removes the strange negation
from CondFindStrMatch.

In dir.c, the documentation collapses as well.

In main.c, separating the ReadMakefile function from the callbacks for
Lst_FindB allows the former to get back its natural function signature,
with proper types and no unused parameters.

To catch any accidental mistakes during the migration from Lst_Find to
Lst_FindB, the code can be compiled with -DUSE_DOUBLE_BOOLEAN, which
will complain about incompatible function pointer types.
2020-08-29 09:30:10 +00:00
rillig 793f3a81dd make(1): fix null pointer dereference when sys.mk is not found
This is quite hard to trigger in a real-life scenario since it requires
precise timing.

Instead, I created /tmp/sys.mk and ran "./make -m /tmp -f /dev/null" in
the debugger, after setting a breakpoint in this line:

ln = Lst_Find(sysMkPath, ReadMakefile, NULL);

Once this line was reached, I removed /tmp/sys.mk to make ReadMakefile
fail.  Just adding a few parse errors won't help since ReadMakefile only
fails if the file cannot be found.
2020-08-29 08:59:08 +00:00
rillig 15828a96ed make(1): add another Boolean variant to check during development 2020-08-29 08:09:07 +00:00
rillig 5783a5d404 make(1): allow for strict type checking for Boolean
Having Boolean aliased to int creates ambiguities since int is widely
used.  Allow to occasionally compile make with -DUSE_DOUBLE_BOOLEAN to
check that the type definitions still agree.
2020-08-29 07:52:55 +00:00
tih e76a1fdd82 Update the if_wg tests for the human readable 'latest-handshake'
output of wgconfig.
2020-08-29 07:22:49 +00:00
maxv bdf26a5bdc Slightly clarify, and style. 2020-08-29 07:17:23 +00:00
maxv cf6af956ea 'doreti_checkast' isn't global anymore, localify. 2020-08-29 07:16:03 +00:00
maxv 16c2d244c4 Correct my rev1.159, it was incomplete, the check must be done later
because the value can change in the meantime (and get set to zero).
2020-08-29 07:14:50 +00:00
maxv bee366477b nvmm: explicitly include atomic.h 2020-08-29 07:14:17 +00:00
rillig 7c1ae9cea7 make(1): clean up code in make.c
Var_Subst never returns NULL.

In Main_ExportMAKEFLAGS, don't compare ints with booleans.

In MainParseArgs, use char for the current character.  First, that's
more precise and correct, and second, it makes debugging easier for
those who don't know the ASCII table by heart.
2020-08-29 07:13:17 +00:00
rillig da6468d597 make(1): rename confusing function ReadAllMakefiles
The old name implied that the function would read multiple files, which
was not the case.

The comment above that function was highly confusing.  It's not that the
function returns a boolean, but rather 0 or non-zero, and 0 means that
Lst_Find should stop searching.

One of the next refactorings will be to make Lst_Find return the first
list node for which the function returns TRUE.  This will reduce the
confusion about the several functions called SomethingP in suff.c.  The
P suffix means to return TRUE or FALSE, not 0 or non-zero.
2020-08-29 07:05:12 +00:00
skrll 25b9b3dccb Cover the full kernel address range in KASAN 2020-08-29 06:49:53 +00:00
martin f834934d77 Skip threxec test pointing at PR 55338, this kills some test beds. 2020-08-29 05:46:34 +00:00