Skip to content

Conversation

@thnkslprpt
Copy link
Contributor

@thnkslprpt thnkslprpt commented Mar 24, 2023

Checklist

Describe the contribution

For POSIX, OSAL uses the internal function OS_PriorityRemap() to convert to a suitable (and not invalid) priority value before calling pthread_setschedprio().

For VxWorks, taskPrioritySet() does set ERRNO to S_taskLib_ILLEGAL_PRIORITY, but I have not tried to include it in this PR. The issue can be left open if someone wants to look at that, or closed for now with this PR.

Testing performed
I don't think this file (rtems/src/os-impl-tasks.c) has any tests currently (see #1207).
If someone can advise if this needs to be tested, and the best way of doing so, I would appreciate it.

Expected behavior changes
Calls on the RTEMS implementation to OS_TaskCreate() (which calls rtems_task_create()) and OS_TaskSetPriority() (which calls rtems_task_set_priority()) will now actually return OS_ERR_INVALID_PRIORITY if the RTEMS calls return RTEMS_INVALID_PRIORITY, rather than simply returning OS_ERROR.

Contributor Info
Avi Weiss @thnkslprpt

@github-advanced-security
Copy link

You have successfully added a new CppCheck configuration cppcheck. As part of the setup process, we have scanned this repository and found no existing alerts. In the future, you will see all code scanning alerts on the repository Security tab.

@github-advanced-security
Copy link

You have successfully added a new CodeQL-coding-standard configuration coding-standard. As part of the setup process, we have scanned this repository and found 785 existing alerts. Please check the repository Security tab to see all alerts.

@github-advanced-security
Copy link

You have successfully added a new CodeQL-security configuration security. As part of the setup process, we have scanned this repository and found 4 existing alerts. Please check the repository Security tab to see all alerts.

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.

OS_ERR_INVALID_PRIORITY not used

1 participant