Initial commit: TXW82x FPV v2.7.0.7-42229 SDK + project sources
This commit is contained in:
35
sdk/lib/posix/sched.c
Normal file
35
sdk/lib/posix/sched.c
Normal file
@@ -0,0 +1,35 @@
|
||||
#include "sys_config.h"
|
||||
#include "typesdef.h"
|
||||
#include "errno.h"
|
||||
#include "osal/semaphore.h"
|
||||
#include "osal/task.h"
|
||||
#include "osal/string.h"
|
||||
#include "osal/timer.h"
|
||||
#include "osal/mutex.h"
|
||||
#include "lib/common/rbuffer.h"
|
||||
#include "lib/posix/pthread.h"
|
||||
|
||||
#ifdef TXWSDK_POSIX
|
||||
|
||||
int sched_yield(void)
|
||||
{
|
||||
os_task_yield();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sched_get_priority_min(int policy)
|
||||
{
|
||||
return OS_TASK_PRIORITY_LOW;
|
||||
}
|
||||
|
||||
int sched_get_priority_max(int policy)
|
||||
{
|
||||
return OS_TASK_PRIORITY_HIGH;
|
||||
}
|
||||
|
||||
int sched_setscheduler(pid_t pid, int policy, const struct sched_param *param)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user