From 954da749a5da4668b8f2a70b7927dd5e1d5b4970 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Tue, 27 Oct 2009 13:10:17 +0000 Subject: [PATCH] * 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 --- headers/posix/sched.h | 5 +++-- src/system/libroot/posix/scheduler.cpp | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/headers/posix/sched.h b/headers/posix/sched.h index b5598a1568..b22f28d9c4 100644 --- a/headers/posix/sched.h +++ b/headers/posix/sched.h @@ -11,9 +11,10 @@ extern "C" { #endif -#define SCHED_OTHER 1 +#define SCHED_FIFO 1 #define SCHED_RR 2 -#define SCHED_FIFO 4 +#define SCHED_SPORADIC 3 +#define SCHED_OTHER 4 struct sched_param { int sched_priority; diff --git a/src/system/libroot/posix/scheduler.cpp b/src/system/libroot/posix/scheduler.cpp index cb9a59bf92..95799b6c04 100644 --- a/src/system/libroot/posix/scheduler.cpp +++ b/src/system/libroot/posix/scheduler.cpp @@ -27,6 +27,7 @@ sched_get_priority_min(int policy) switch (policy) { case SCHED_FIFO: case SCHED_RR: + case SCHED_SPORADIC: case SCHED_OTHER: return B_LOW_PRIORITY; @@ -43,6 +44,7 @@ sched_get_priority_max(int policy) switch (policy) { case SCHED_FIFO: case SCHED_RR: + case SCHED_SPORADIC: case SCHED_OTHER: return B_URGENT_DISPLAY_PRIORITY;