diff options
author | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-04-22 09:19:23 +1000 |
commit | c963d75dfdeec11f82e79e727062fbf89afa2c04 (patch) | |
tree | 895633dbf641110be46f117c29890c49b3ffc0bd /libraries/eina/src/lib/eina_sched.c | |
parent | Adding the new extantz viewer and grid manager. (diff) | |
download | SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.zip SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.gz SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.bz2 SledjHamr-c963d75dfdeec11f82e79e727062fbf89afa2c04.tar.xz |
Update EFL to latest beta.
Diffstat (limited to '')
-rw-r--r-- | libraries/eina/src/lib/eina_sched.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/libraries/eina/src/lib/eina_sched.c b/libraries/eina/src/lib/eina_sched.c index 8c7f7fe..b8e7000 100644 --- a/libraries/eina/src/lib/eina_sched.c +++ b/libraries/eina/src/lib/eina_sched.c | |||
@@ -41,7 +41,7 @@ | |||
41 | #include "eina_sched.h" | 41 | #include "eina_sched.h" |
42 | #include "eina_log.h" | 42 | #include "eina_log.h" |
43 | 43 | ||
44 | #define RTNICENESS 5 | 44 | #define RTNICENESS 1 |
45 | #define NICENESS 5 | 45 | #define NICENESS 5 |
46 | 46 | ||
47 | EAPI void | 47 | EAPI void |
@@ -62,10 +62,14 @@ eina_sched_prio_drop(void) | |||
62 | 62 | ||
63 | if (EINA_UNLIKELY(pol == SCHED_RR || pol == SCHED_FIFO)) | 63 | if (EINA_UNLIKELY(pol == SCHED_RR || pol == SCHED_FIFO)) |
64 | { | 64 | { |
65 | prio = sched_get_priority_max(pol); | 65 | param.sched_priority -= RTNICENESS; |
66 | param.sched_priority += RTNICENESS; | 66 | |
67 | if (prio > 0 && param.sched_priority > prio) | 67 | /* We don't change the policy */ |
68 | param.sched_priority = prio; | 68 | if (param.sched_priority < 1) |
69 | { | ||
70 | EINA_LOG_INFO("RT prio < 1, setting to 1 instead"); | ||
71 | param.sched_priority = 1; | ||
72 | } | ||
69 | 73 | ||
70 | pthread_setschedparam(pthread_id, pol, ¶m); | 74 | pthread_setschedparam(pthread_id, pol, ¶m); |
71 | } | 75 | } |
@@ -78,7 +82,10 @@ eina_sched_prio_drop(void) | |||
78 | { | 82 | { |
79 | prio += NICENESS; | 83 | prio += NICENESS; |
80 | if (prio > 19) | 84 | if (prio > 19) |
81 | prio = 19; | 85 | { |
86 | EINA_LOG_INFO("Max niceness reached; keeping max (19)"); | ||
87 | prio = 19; | ||
88 | } | ||
82 | 89 | ||
83 | setpriority(PRIO_PROCESS, 0, prio); | 90 | setpriority(PRIO_PROCESS, 0, prio); |
84 | } | 91 | } |