Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • W wine
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Commits
Collapse sidebar
  • Alexandros Frantzis
  • wine
  • Merge requests
  • !44

Draft: winewayland.drv: Introduce internal driver mechanism to schedule callbacks

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Alexandros Frantzis requested to merge wip-schedule-callbacks into wayland Nov 18, 2022
  • Overview 6
  • Commits 150
  • Changes 43

Avoid using WM_TIMER messages to schedule internal driver callbacks, use a custom mechanism instead.

Each thread keeps a list of callbacks that it wants to eventually invoke, which happens from within WAYLAND_MsgWaitForMultipleObjectsEx. The callback is invoked if the current time is past (or equal) the callback target time.

In order to ensure that threads will wake up to service callbacks, each callback also registers a "wakeup" which is handled by the the process event read thread, along with reads from the compositor fd. When a wakeup is triggered we wakeup all threads in case they have a callback that needs invocation. We use a single timerfd for all wakeups in the process, which we reschedule for the next wakeup on demand.

Edited Nov 18, 2022 by Alexandros Frantzis
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip-schedule-callbacks