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

15 lines
222 B
C
Raw Permalink Normal View History

2017-09-27 13:25:39 +02:00
#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 );
};