Improve and clarify the posix and win32 ticker implementations

This is a follow-on from MR !16147. It is intended to be reviewed patch by patch.

The posix ticker is partly rewritten to get various improvements:

  • slightly simpler / more regular;
  • easier to extend with additional notifications;
  • probably slightly more efficient (but a micro-optimisation);
  • and supports calling notification from signal handlers

The win32 ticker impl is also improved to make sure it is concurrency safe, and that the idempotent operations actually are so.

Additionally in the MR:

  • add a test for scheduler fairness, to detect any gross mistakes in the ticker impl
  • make the exported stop/startTimer no-ops, and rename internal functions
  • make exitTicker/exitTimer unconditionally synchronous
  • remove redundant partial/enable disable of context switching
  • add TODOs linked to issue #27250.
Edited by Duncan Coutts

Merge request reports

Loading