Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e2780bf28c
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 22 lines (14 sloc) 0.37 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#include <stdio.h>
#include <sched.h>
#include <sys/types.h>

int main(int argc, char * argv[]) {
 
pid_t pid=0;
struct sched_param sp = { .sched_priority=0 };

if(2==argc)
pid = atoi(argv[1]);

if(!pid) {
printf("Usage: %s [PID]\nSteal a proccess real time priority.\n", argv[0]);
exit(0);
}

       return (sched_setscheduler(pid, SCHED_OTHER, &sp));
}
 

Something went wrong with that request. Please try again.