Skip to content

Fix priority check for LXRT#3879

Open
hdiethelm wants to merge 1 commit intoLinuxCNC:2.9from
hdiethelm:fix_lxrt_prio_check
Open

Fix priority check for LXRT#3879
hdiethelm wants to merge 1 commit intoLinuxCNC:2.9from
hdiethelm:fix_lxrt_prio_check

Conversation

@hdiethelm
Copy link
Copy Markdown
Contributor

Based on this comment #3878 (comment), I track down the issue and fixed it.

It was introduced here:
233f381

git tag --contains 233f381
v2.10.0-pre0
v2.9.0
v2.9.0-pre1
v2.9.1
v2.9.2
v2.9.3
v2.9.4
v2.9.5
v2.9.6
v2.9.7
v2.9.8

That's why 2.9.0-pre0 in the picture was probably still working, however, I dont't have such an old VM to test this theory.

The issue is this check:

if ((prio > rtapi_prio_highest()) || (prio < rtapi_prio_lowest()))

It fails when the lowest prio is bigger than the highest:
#define RT_SCHED_HIGHEST_PRIORITY 0
#define RT_SCHED_LOWEST_PRIORITY 0x3fffFfff
The above commit introduced a fix returning the correct prio for LXRT and broke the check with that.

Tested with:
POSIX non-realtime
POSIX realtime
XENOMAI (posix-skin) realtime
LXRT realtime

Just tell me if branch 2.9 is wrong for this fix and I will rebase to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant