16 lines
234 B
C
16 lines
234 B
C
|
#include <hwo/threads.h>
|
||
|
|
||
|
#include <stdlib.h>
|
||
|
|
||
|
void thread_set_periodic(THREAD* thread,int32_t us) {
|
||
|
ATOMIC
|
||
|
|
||
|
if (!thread) {
|
||
|
thread = current_thread();
|
||
|
};
|
||
|
|
||
|
thread->periode = thread->periodic = us;
|
||
|
|
||
|
schedule_thread( thread );
|
||
|
};
|