* Added SCHED_SPORADIC, and sorted the constants the way it's done in the specs.

* Also changed their numbering.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33788 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2009-10-27 13:10:17 +00:00
parent d88b4037b0
commit 954da749a5
2 changed files with 5 additions and 2 deletions

View File

@ -11,9 +11,10 @@ extern "C" {
#endif #endif
#define SCHED_OTHER 1 #define SCHED_FIFO 1
#define SCHED_RR 2 #define SCHED_RR 2
#define SCHED_FIFO 4 #define SCHED_SPORADIC 3
#define SCHED_OTHER 4
struct sched_param { struct sched_param {
int sched_priority; int sched_priority;

View File

@ -27,6 +27,7 @@ sched_get_priority_min(int policy)
switch (policy) { switch (policy) {
case SCHED_FIFO: case SCHED_FIFO:
case SCHED_RR: case SCHED_RR:
case SCHED_SPORADIC:
case SCHED_OTHER: case SCHED_OTHER:
return B_LOW_PRIORITY; return B_LOW_PRIORITY;
@ -43,6 +44,7 @@ sched_get_priority_max(int policy)
switch (policy) { switch (policy) {
case SCHED_FIFO: case SCHED_FIFO:
case SCHED_RR: case SCHED_RR:
case SCHED_SPORADIC:
case SCHED_OTHER: case SCHED_OTHER:
return B_URGENT_DISPLAY_PRIORITY; return B_URGENT_DISPLAY_PRIORITY;