xref: /nrf52832-nimble/rt-thread/components/libc/pthreads/sched.h (revision 042d53a763ad75cb1465103098bb88c245d95138)
1 /*
2  * Copyright (c) 2006-2018, RT-Thread Development Team
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * Change Logs:
7  * Date           Author       Notes
8  */
9 
10 #ifndef __SCHED_H__
11 #define __SCHED_H__
12 
13 #include <rtthread.h>
14 #include <pthread.h>
15 
16 /* Thread scheduling policies */
17 enum
18 {
19     SCHED_OTHER = 0,
20     SCHED_FIFO,
21     SCHED_RR,
22     SCHED_MIN = SCHED_OTHER,
23     SCHED_MAX = SCHED_RR
24 };
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
31 int sched_yield(void);
32 int sched_get_priority_min(int policy);
33 int sched_get_priority_max(int policy);
34 int sched_setscheduler(pid_t pid, int policy);
35 
36 #ifdef __cplusplus
37 }
38 #endif
39 
40 #endif
41