Commit Graph

291294 Commits

Author SHA1 Message Date
rillig fd56a0b641 indent: make copy_comment_nowrap simpler
Since a nowrap comment is copied unmodified, it need not depend on any
maximum line length.

No functional change.
2021-11-07 10:13:26 +00:00
andvar b2a0cc8eb0 fix few typos. 2021-11-07 09:48:08 +00:00
hannken c60326deac Libtsan intercepts the pthread exported functions with
dlsym(RTLD_NEXT, func_name).  This fails for pthread_join() as it
is present both as a stub in libc and as real operation in libpthread
and the search order is "libtsan.so libc.so libpthread.so".

Force the order "libtsan.so libpthread.so libc.so" so symbols
get intercepted from libpthread first.

Ok: Matthew Green <mrg@netbsd.org>
2021-11-07 09:22:58 +00:00
rillig 43742ee02a indent: remove dead code from process_comment_nowrap
In comments that are preserved, no additional leading ' * ' is inserted.

No functional change.
2021-11-07 08:41:13 +00:00
rillig 17b99059d8 indent: remove dead code from copy_comment_wrap
No functional change.
2021-11-07 08:38:27 +00:00
rillig 7347b6a31d indent: remove dead code from copy_comment_nowrap
No functional change.
2021-11-07 08:31:46 +00:00
rillig 77437f672a indent: split copy_comment into wrapping and non-wrapping
These two cases are processed in an almost entirely different way. In
particular, copy_comment_nowrap should copy the comment verbatim, which
is not obvious from the current code, due to the many conditions and the
complex control flow.

No functional change.
2021-11-07 08:24:50 +00:00
rillig 95afd51bd1 tests/indent: demonstrate buggy combination of '-eei' and '-nlp'
Seen in indent.c.
2021-11-07 08:03:15 +00:00
rillig 48eed9b91f indent: rename type_at_paren_level_0 to type_outside_parentheses
For symmetry with type_in_parentheses.

No functional change.
2021-11-07 07:44:59 +00:00
rillig 77debd020c indent: distinguish between typename in parentheses and other words
This gets rid of two members of parser_state. No functional change for
well-formed programs. The sequence of '++int' or '--size_t' may be
formatted differently than before, but no program is expected to contain
that sequence.

Rename lsym_ident to lsym_word since 'ident' was too specific. This
token type is used for constants and string literals as well. Strictly
speaking, a string literal is not a word, but at least it's better than
before.
2021-11-07 07:35:06 +00:00
rillig 5e3ee0e0b8 indent: rename 'inbuf' functions to 'inp'
The variable 'inp' used to be named 'inbuf'. Make the function names
correspond to the variable name again.

No functional change.
2021-11-07 07:06:00 +00:00
thorpej e0435021ca Add a comment describing why we give carte blanche to processes
marked as PK_32.  NFC.
2021-11-07 01:51:56 +00:00
riastradh f2e0f4c55c pslist(9): No need to serialize pserialize_perform any more.
So take it out of the mutex section.
2021-11-06 23:29:03 +00:00
christos 0a50b87edf Set the path unconditionally to what rc sets it to, so that when running
individual scripts like 'env - /etc/rc.d/syslogd restart' programs like
rcorder are found.
2021-11-06 23:11:43 +00:00
andvar 797f41d255 s/invlaid/invalid/ 2021-11-06 22:11:39 +00:00
thorpej 3758c7a856 COMPAT_NETBSD32 is all about running the 32-bit flavor of native
binaries on a 64-bit platform[*], as such:
- Make the logic about which "sendsig" flavor to call MI (as it is in the
  native 64-bit environment) and follow the same rules as the native 32-bit
  environment.
- Make COMPAT_NETBSD32 x COMPAT_16 work the same as it would in the
  native 32-bit environment by providing a netbsd32_sendsig_sigcontext_16_hook,
  rather than overriding the entire sendsig logic with a netbsd32_sendsig_hook.
- In netbsd32___sigaction_sigtramp(), make sure the compat_netbsd32_16
  module is loaded if the trampoline version specifies a sigcontext style
  handler, otherwise return EINVAL so that libc can try again with siginfo
  style.

[*] ...except for arm32, which uses it to mean "run 32-bit OABI binaries
from the 32-bit EABI environment".  Doing it this way was arguably a mistake,
but we are stuck with it for now, so support it by providing a machine-
dependent override for netbsd32_sendsig() that also disables the corresponding
logic in netbsd32___sigaction_sigtramp().

Fixes PR kern/56487.
2021-11-06 20:42:56 +00:00
jmcneill eb0b9b2d41 Revert part of previous commit that broke DT booting. 2021-11-06 19:44:22 +00:00
wiz a47d853d9f New sentence, new line; remove trailing whitespace. 2021-11-06 19:36:12 +00:00
brad a827f0510e Mention sht3xtemp(4) 2021-11-06 13:36:34 +00:00
brad 1f3d8cb8fe Driver for the Sensirion SHT30/SHT31/SHT35 temperature and humidity
sensor such as:

https://www.adafruit.com/product/2857

This is a higher priced sensor with a lot of features, including the
ability to do sub-second periodic updates.  The driver supports
everything about the sensor except for the alert pin.
2021-11-06 13:34:39 +00:00
msaitoh 161ad4d253 s/allign/align/ 2021-11-06 06:52:48 +00:00
msaitoh 1388c4c7b6 Fix typo in comment. s/phyiscally/physically/ 2021-11-06 06:49:02 +00:00
skrll 8e1c9b71f0 USB style. NFC. 2021-11-06 06:44:42 +00:00
msaitoh d4107bf4e2 Fix typo in comment. s/notifcation/notification/ 2021-11-06 06:44:41 +00:00
skrll 61e8ab64b3 config_pending_incr doesn't need KERNEL_LOCK protection 2021-11-06 06:41:02 +00:00
msaitoh f81569c702 s/writting/writing/ 2021-11-06 06:40:33 +00:00
msaitoh 763440c947 s/maxiumum/maximum/ 2021-11-06 06:38:03 +00:00
gutteridge 45137c4698 pax.1: minor grammar fixes 2021-11-06 01:19:19 +00:00
andvar e9357ddd97 mcx(4): ensure that RQT size is always a power of two.
Fixes PR kern/56484.
Thanks riastradh for the power of two patch :). OK: mrg, jmcneill, riastradh.
2021-11-05 23:39:47 +00:00
riastradh 17baa91bd8 Rework ilog2(3) man page.
- Tweak title.
- Clarify semantics -- round down, not any other way.
- xref ffs(3)
- Fix return type: int.
- Fix language about input type.
  . Any unsigned type is fine.
  . Types smaller than uint32_t will be safely converted to uint32_t.
- Note that it is a constant expression if x is constant.
2021-11-05 22:39:35 +00:00
rillig 81ddaf00e8 indent: consistently use token.e[-1] for the last added character
No functional change.
2021-11-05 22:06:43 +00:00
rillig 61921f7856 indent: clean up argument parsing
In struct pro, place the dependent member below its dependency.

In load_profile, consistently use -1 when outside a comment.

No functional change.
2021-11-05 21:52:17 +00:00
rillig d18131ff3d indent: the '+ 1' in dump_line_code is not an off-by-one error 2021-11-05 21:39:12 +00:00
rillig ed2a8cbef8 indent: add debug output for remaining members of parser_status 2021-11-05 21:08:04 +00:00
rillig 6a5c0d0a91 indent: rename process_keyword_do to process_do, same for 'else'
Before the symbols from the tokenizer had the prefix 'lsym', the symbols
could not be simply called 'else' and 'do'. The functions for processing
the tokens followed that naming scheme.

When the prefix 'lsym' was introduced, the word 'keyword' was no longer
needed, neither in the constants nor in the function names.

No functional change.
2021-11-05 19:42:48 +00:00
rillig dfb0ab79fb indent: rename ps.curr_newline to next_col_1
For symmetry with ps.curr_col_1.

No functional change.
2021-11-05 19:33:28 +00:00
thorpej ce56c2fb67 Normally, to support COMPAT_NETBSD32 we need to define
__HAVE_STRUCT_SIGCONTEXT in order to support the old
"sigcontext" style of handlers for 32-bit binaries.
However, we only support 32-bit EABI binaries on AArch64,
and by happy accident (due to a libc bug introduced in
2006), 32-bit NetBSD EABI binaries never used "sigcontext"
style handlers.  So, we don't need to carry any of this
baggage forward.

This addresses the AArch64 case of PR kern/56487.
2021-11-05 15:18:18 +00:00
skrll 6819c02f1e Apply patch from PR port-evbarm/52209
Gumstix: KDASSERT in pxa2x0_gpio if no PCMCIA  bushead given but present
2021-11-05 07:39:22 +00:00
msaitoh 5195007c61 Fix comment. No functional change. 2021-11-05 06:15:42 +00:00
msaitoh 2f46ef3de4 Fix a bug that device timeout still happens on ICH/PCH. Fixes PR kern/56478.
- if_wm.c rev. 1.695 for PR kern/40981 still had a problem. The workaround
   flag was unexpectedly cleared when a cable is not connected, SIOCINITIFADDR
   was called, or if_init was called. Fix it.
 - Add debug printf()s.
2021-11-05 05:52:49 +00:00
msaitoh e778ac4194 Don't power down the PHY when the interface goes down.
- All of other PHY drivers don't power down the PHY. Do the same way.
 - At least, keeping the link is required for Intel AMT and WoL.
2021-11-05 01:53:30 +00:00
msaitoh 778c4af095 Use macro. No functional change. 2021-11-05 01:49:14 +00:00
jakllsch 74638cdaf2 make compilable at NPCI==0 2021-11-04 21:31:30 +00:00
rillig 2a9011b6e7 indent: split process_comment_in_code into separate functions
No functional change.
2021-11-04 20:31:04 +00:00
rillig 1ee40112d5 indent: do not discard former error comments anymore
Since io.c 1.20 from 2019-10-19, indent has not placed error comments in
the code anymore. Since these comments are supposed to be cleaned up
immediately, there is no point in having code for handling them.
2021-11-04 19:23:57 +00:00
rillig 222943f2ca indent: fix parsing of C99 comments containing '*/' 2021-11-04 18:38:37 +00:00
rillig 1c0206d944 tests/indent: demonstrate wrong edge case in C99 comments 2021-11-04 18:31:22 +00:00
rillig d7fd446420 indent: split process_comments into separate functions
No functional change.
2021-11-04 17:37:03 +00:00
rillig 6fef51f3ad indent: fix joining of adjacent unary '+' operators 2021-11-04 17:12:12 +00:00
rillig de4fc5b768 indent: extract compute_code_indent_lineup into separate function
Having 9 different paths in a single function made it more complicated
to understand than necessary.

No functional change.
2021-11-04 17:10:37 +00:00