|
楼主 |
发表于 2004-10-26 15:27:54
|
显示全部楼层
#include <stdio.h>
#include <sched.h>
int main(){
struct sched_param{
int sched_priority;
};
int sched_setscheduler(pid_t pid,int policy,const struct sched_param *p);
int sched_getscheduler(pid_t pid);
const struct sched_param *p1={20};
int id=getpid();
sched_setscheduler(id,SCHED_FIFO,p1);
printf("id=%d,celv=%d\n",id,sched_getscheduler(id));
return 0;
}
我想设置实时优先级为20,策略为FIFO,可是编译就过不去,请指教 |
|