sched-deadline

DEADLINE scheduling policy not found

烂漫一生 提交于 2019-12-23 11:51:30
问题 I want to implement the DEADLINE scheduling policy in C. I know the feature is implemented since Linux 3.14.10 and I'm using Ubuntu 14.04 Linux #### 3.17.0-031700-lowlatency #201410060605 SMP PREEMPT which should be recent enough. I develop the program with Eclipse (launched as sudo). I've defined _GNU_SOURCE and included sched.h and I'm still unable to use the keyword SCHED_DEADLINE , to define a struct sched_attr or to use function like sched_getattr . #define _GNU_SOURCE #include <sched.h>

Build against newer linux headers than libc is built using

五迷三道 提交于 2019-12-12 03:39:24
问题 I want to write a program using the new SCHED_DEADLINE scheduling policy available since Linux 3.14. I start out with a simple program trying to use the sched_setattr function. #include <sched.h> int main(void) { // struct sched_attr attr; // attr.size = sizeof(struct sched_attr); // attr.sched_policy = SCHED_DEADLINE; sched_setattr(0, (void*)0, 0); return 0; } However when compiling I get the following error: $gcc dead.c dead.c: In function ‘main’: dead.c:8:2: warning: implicit declaration