Comment 3 for bug 835138

Revision history for this message
Till Straumann (strauman) wrote :

Unfortunately, the previously submitted patch had a flaw:
When an EPICS process was started intentionally
w/o real-time privileges (e.g., a CA client, tool or the like)
a warning message

sched_get_priority_max failed set to 0
sched_get_priority_min failed set to 0

would pop up.

This new version of the patch fixes this and restores
old semantics:

- process has no RT privileges: priority range is silently set to 1..1
  (this lets epicsThreadCreate detect that it doesn't have permission
  to use the RT scheduler)
- process has no RT privileges but sched_get_priority_max()/_min()
  fail: above warning shows
- process has RT privilege: compute available priority range (under
  resource limit constraints).