HomeFreeBSD

Augment wait queue support in the LinuxKPI.

Description

Augment wait queue support in the LinuxKPI.

In particular:

  • Don't evaluate event conditions with a sleepqueue lock held, since such code may attempt to acquire arbitrary locks.
  • Fix the return value for wait_event_interruptible() in the case that the wait is interrupted by a signal.
  • Implement wait_on_bit_timeout() and wait_on_atomic_t().
  • Implement some functions used to test for pending signals.
  • Implement a number of wait_event_*() variants and unify the existing implementations.
  • Unify the mechanism used by wait_event_*() and schedule() to put the calling thread to sleep.

This is required to support updated DRM drivers. Thanks to hselasky for
finding and fixing a number of bugs in the original revision.

Reviewed by: hselasky
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D10986

Details

Provenance
markjAuthored on
Reviewer
hselasky
Differential Revision
D10986: Reimplement the wait_queue and schedule() APIs.
Parents
rS319756: Style and comment fixes only.
Branches
Unknown
Tags
Unknown