[v5,0/2] allow creating thread with real-time priority

Message ID 20231026142749.1174372-1-thomas@monjalon.net (mailing list archive)
Headers
Series allow creating thread with real-time priority |

Message

Thomas Monjalon Oct. 26, 2023, 2:19 p.m. UTC
  Real-time thread priority was been forbidden on Unix
because of problems they can cause.
Warnings and helpers are added to avoid deadlocks,
so real-time can be allowed on all systems.

Thomas Monjalon (2):
  eal: add thread yield functions
  eal/unix: allow creating thread with real-time priority

v1: no yield at all
v2: more comments, sched_yield() and Sleep(0) on Windows
v3: 2 yield functions with sleep in realtime version
v4: runtime warning, longer sleep on Unix and lighter yield on Windows
v5: fix build and increase Unix sleep to 1 ms

Thomas Monjalon (2):
  eal: add thread yield functions
  eal/unix: allow creating thread with real-time priority

 app/test/test_threads.c                       | 11 +-----
 .../prog_guide/env_abstraction_layer.rst      |  4 +-
 lib/eal/include/rte_thread.h                  | 33 +++++++++++++++-
 lib/eal/unix/rte_thread.c                     | 38 ++++++++++++++-----
 lib/eal/version.map                           |  4 ++
 lib/eal/windows/rte_thread.c                  | 15 ++++++++
 6 files changed, 83 insertions(+), 22 deletions(-)