#include <rtthread.h>
#define THREAD_PRIORITY 10
#define THREAD_STACK_SIZE 512
#define THREAD_TIMESLICE 5
{
{
return;
}
else
{
}
}
{
{
}
}
{
{
}
while (
rt_tick_get() - tick < (RT_TICK_PER_SECOND / 2)) ;
}
int pri_inversion(void)
{
{
return -1;
}
thread1_entry,
THREAD_STACK_SIZE,
THREAD_PRIORITY - 1, THREAD_TIMESLICE);
thread2_entry,
THREAD_STACK_SIZE,
THREAD_PRIORITY, THREAD_TIMESLICE);
thread3_entry,
THREAD_STACK_SIZE,
THREAD_PRIORITY + 1, THREAD_TIMESLICE);
return 0;
}