forked from haraldwolff/avr-fw-modules
15 lines
222 B
C
15 lines
222 B
C
|
#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 );
|
||
|
|
||
|
};
|