avr-fw-modules/core/src/thread_set_priority.c

15 lines
222 B
C
Executable File

#include <sys/threads.h>
#include <stdlib.h>
void thread_set_priority(THREAD* thread,uint8_t prio) {
ATOMIC
if (!thread) {
thread = current_thread();
};
thread->priority = prio;
schedule_thread( thread );
};