Commit Graph

283787 Commits

Author SHA1 Message Date
thorpej 16fbf255aa Sync with HEAD. 2021-04-03 22:43:39 +00:00
thorpej f3b8515c0f Sync with HEAD. 2021-04-03 22:28:12 +00:00
thorpej d099530f1b futex_func_wait(): If TIMER_ABSTIME, sanity check that the deadline
provided by the caller is not ridiculous.
2021-04-03 21:52:20 +00:00
thorpej e0de9fa252 Sync w/ HEAD. 2021-01-03 16:49:31 +00:00
thorpej fc81bb151f Sync w/ HEAD. 2021-01-03 16:34:50 +00:00
thorpej c352ffe8f6 Handle timerfd ioctls. 2021-01-03 16:14:04 +00:00
thorpej 13533dbd9d Regen for preadv(2) and pwritev(2). 2021-01-03 16:13:07 +00:00
thorpej bd8c928fdb Add preadv(2) and pwritev(2). 2021-01-03 16:12:43 +00:00
thorpej 0fb6be58a8 Regen for preadv(2) and pwritev(2). 2020-12-17 03:14:35 +00:00
thorpej da3a5838d8 Add suppport for Linux preadv(2) and pwritev(2). Same as native, except
for the silly way that the offset argument is passed in.
2020-12-17 03:14:15 +00:00
thorpej c13b2171a0 Regen for POSIX timers and timerfd. 2020-12-17 03:05:50 +00:00
thorpej 84e149c038 Add POSIX timer and timerfd support to COMPAT_LINUX32. 2020-12-17 03:05:32 +00:00
thorpej c1345b3b8d Remove a redundant prototype. 2020-12-17 03:02:06 +00:00
thorpej 31e5c385d5 Add sigevent mapping for Linux-32 compat. 2020-12-17 03:00:28 +00:00
thorpej a8e299ccba Re-factor the code that maps the clockid_t in timer_create() and
the flags in timerfd_settime() into separate functions.
2020-12-17 02:52:40 +00:00
thorpej 691e37e7ab Regen for eventfd. 2020-12-16 03:08:01 +00:00
thorpej 8a63873d03 Add eventfd glue to COMPAT_LINUX32. 2020-12-16 03:07:43 +00:00
thorpej 8c82ebf387 Regen for eventfd, timerfd, POSIX timers. 2020-12-15 14:07:51 +00:00
thorpej bf14ab013c Add Linux eventfd, timerfd, and POSIX timer calls. 2020-12-15 14:07:20 +00:00
thorpej ba4d14054b Unit tests for timerfd. 2020-12-14 16:55:51 +00:00
thorpej f174183e9a Regen for timerfd. 2020-12-14 16:54:04 +00:00
thorpej 16902d311a Native implementation of the Linux timerfd API. 2020-12-14 16:53:36 +00:00
thorpej 8454b95b70 Unit tests for eventfd(2). 2020-12-14 16:01:38 +00:00
thorpej 3dae91f18b Regen for eventfd(2). 2020-12-14 16:01:17 +00:00
thorpej 0ae8eee593 Native implementation of the Linux eventfd(2) API. 2020-12-14 16:00:51 +00:00
thorpej b0f0cc655b Sync w/ HEAD. 2020-12-14 14:37:44 +00:00
thorpej e9b306ec72 Add definitions for FUTEX_NETBSD_RW_WAIT and FUTEX_NETBSD_RW_HANDOFF.
(Forgot to commit this file previously.)
2020-11-03 16:05:51 +00:00
thorpej 90db48eb7a - Re-factor the code that sets up real-time LWPs for various tests.
- Add tests for the RW_HANDOFF operations.
2020-11-01 15:22:58 +00:00
thorpej 1e34928c4d Major overfaul of futex implemention:
- Use sleepqs directly, rather than using condition variables and
  separate wait queues / strutures.  By doing this, and using the
  standard mechanism for keeping sleepqs sorted by priority, we
  acn ensure that the highest priority waiters will be awakened,
  rather than naively awakening in FIFO order.
- As part of the data structure re-organization, struct lwp gains
  "l_futex" (the futex an LWP is blocked on) and "l_futex_wakesel"
  (the futex wake selector bitset) fields (and loses l___rsvd1).
  Plese note the special locking considerations for these fields
  documented in the comments.
- Add the notion of a "futex class".  This is prep work for eventually
  supporting the FUTEX_*_PI operations, as well as some future NetBSD
  extensions to the futex interface.
- Add a preliminary implementation of the first of those NetBSD extensions,
  FUTEX_NETBSD_RW_WAIT and FUTEX_NETBSD_RW_HANDOFF.  These are designed
  to implement reader/writer locks with direct-handoff to the correct
  priority thread(s) (real-time read-waiters need to have priority over
  non-real-time write-waiters).  NOTE: this is currently disabled due to
  a mysterious panic that haasn't yet been tracked down.
- Add some SDT probes to aid in debugging.
2020-11-01 15:16:43 +00:00
rillig 6d3aa3c8ae make(1): demonstrate wrong error handling in compat mode 2020-12-13 17:44:31 +00:00
christos ae9ebf6f0f Improve previous: generated names end with .[[:digits:]] so look for that
instead.
2020-12-13 16:50:47 +00:00
rillig 61121a11fe make(1): add comments for strange error handling in Compat_Run 2020-12-13 16:47:19 +00:00
rillig a65a89393b make(1): extract InitSignals from Compat_Run 2020-12-13 16:32:57 +00:00
rillig edc3918f88 make(1): extract MakeBeginNode from Compat_Run
The comment "execute the commands" had once been correct but not
anymore.  Since a few years, not only the commands of the .BEGIN and
.END nodes are executed, instead the nodes are made as usual, including
their dependencies.
2020-12-13 16:30:08 +00:00
rillig 67ff6c82cb make(1): extract UseShell from Compat_RunCommand 2020-12-13 16:14:40 +00:00
martin 77641d430c Add atppc* at acpi? 2020-12-13 08:23:52 +00:00
martin 52a4e4b878 Add missing include 2020-12-13 08:20:56 +00:00
isaki b363aa9429 Revise comments. 2020-12-13 05:47:08 +00:00
isaki 5c048e8c4c Fix a return value of audiopoll().
fo_poll is expected to return revents rather than errno on error.
2020-12-13 05:44:09 +00:00
isaki 459e45cd9b Avoid a dead lock in audiodetach, since rev 1.63.
audio_unlink() must be called without exlock held (and
audio_mixer_destroy() must be called with exlock held).
This makes unplugging during playing/recording work (again).
Reported by Julian Coleman on current-users:
 http://mail-index.netbsd.org/current-users/2020/12/10/msg040050.html
2020-12-13 05:29:19 +00:00
isaki ef5b725085 Add missing newline. 2020-12-13 05:21:12 +00:00
sjg a39ab01a94 Prune job debug output that may appear out of order.
A race between child and parent means that we cannot
guarantee whether all child output is seen before we call
JobClosePipes, thus intervening debug output can appear
before or after the last child output.
2020-12-13 05:13:38 +00:00
rillig 2eebef5d2b make(1): remove dead code from GetVarnamesToUnexport
Now that the parsing of the directives is unified and strict, there is
no need anymore for the dispatched functions to check for unknown
directives.  These functions don't even get the information to decide
that since this decision is already done.
2020-12-13 02:15:49 +00:00
sjg aefb247373 Avoid noise when csh does not exist 2020-12-13 02:09:55 +00:00
sjg 5f5af6046f Ensure we have a value for .MAKE.UID 2020-12-13 02:09:33 +00:00
rillig e774dc5acc make(1): replace *line with line[0]
Since a line is not an iterator and since the expression *line typically
means "the current element", not "the first character", replacing *line
with line[0] more directly expresses the idea of accessing the first
character of a string.
2020-12-13 02:01:43 +00:00
rillig 40711a6e7b make(1): clean up comment for ParseDirective 2020-12-13 01:51:08 +00:00
rillig b506ce346a make(1): clean up Var_Export 2020-12-13 01:41:12 +00:00
rillig 80fcd08175 make(1): replace bitset VarExportFlags with enum VarExportMode
The previous flags were not combined at all.
2020-12-13 01:33:17 +00:00
rillig b02ee7708d make(1): adjust timestamps in unit tests
These could not be known before the previous commit.
2020-12-13 01:10:22 +00:00