Bonjour, j'ai regardé la doc pour sched_getparam et je ne vois pas quoi mettre en 2e argument..
Voici ce que j'ai fait pour l'instant :
Code:
1
2
3
4
5
6 #include <sched.h> int priority(pid_t pid) { int i; i = sched_getparam(pid, return i; }
Version imprimable
Bonjour, j'ai regardé la doc pour sched_getparam et je ne vois pas quoi mettre en 2e argument..
Voici ce que j'ai fait pour l'instant :
Code:
1
2
3
4
5
6 #include <sched.h> int priority(pid_t pid) { int i; i = sched_getparam(pid, return i; }
Bonjour,
Pourtant tout est dit ici.
Code:
1
2
3
4
5
6
7
8
9
10 //attribuer une priorité struct sched_param p; p.sched_priority = prioriteProcessus; sched_setparam(pid, &p); //récupérer la priorité struct sched_param p; sched_getparam(pid, &p); return p.sched_priority;
Ah ok merci.