bernard.xiong@gmail.com 32f6598912 add semaphore and sched implementation.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1056 bbd45198-f89e-11dd-88c7-29a3b14d5316
2010-11-17 23:35:13 +00:00

29 lines
442 B
C

#include <sched.h>
int sched_yield(void)
{
rt_thread_yield();
return 0;
}
int sched_get_priority_min(int policy)
{
if (policy != SCHED_FIFO && policy != SCHED_RR)
return EINVAL;
return 0;
}
int sched_get_priority_max(int policy)
{
if (policy != SCHED_FIFO && policy != SCHED_RR)
return EINVAL;
return RT_THREAD_PRIORITY_MAX - 1;
}
int sched_setscheduler(pid_t pid, int policy)
{
return ENOTSUP;
}