Altera_Forum
Honored Contributor
20 years agoWhat's the best way to assign priorities to tasks?
Recently I ran into an issue where I needed a low-priority task to temporarily be high-priority. The solution I came up with was to write a small function that repeatedly called OSTaskChangePrio() until it found a free priority, then do the swap.
Did I reinvent the wheel? It seems like this functionality should already exist in a multithreaded OS, especially when the number of available tasks is so small. Functions like getLowestFreePriority, getHighestFreePriority, etc.