[haiku-commits] haiku: hrev44154 - src/system/kernel/scheduler

  • From: fredrik.holmqvist@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 14 May 2012 21:06:57 +0200 (CEST)

hrev44154 adds 1 changeset to branch 'master'
old head: b0df02004f52b97d392295b31be2fcee8c5b9662
new head: 78af90d4946bd94e78ceaec1eefdd02e5649e515

----------------------------------------------------------------------------

78af90d: Fix codestyle violation:
  Multiline statements after if should always be in a code block.
  No functional change.

                         [ Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev44154
Commit:      78af90d4946bd94e78ceaec1eefdd02e5649e515
URL:         http://cgit.haiku-os.org/haiku/commit/?id=78af90d
Author:      Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>
Date:        Mon May 14 18:14:47 2012 UTC

----------------------------------------------------------------------------

3 files changed, 6 insertions(+), 3 deletions(-)
src/system/kernel/scheduler/scheduler_affine.cpp   |    3 ++-
src/system/kernel/scheduler/scheduler_simple.cpp   |    3 ++-
.../kernel/scheduler/scheduler_simple_smp.cpp      |    3 ++-

----------------------------------------------------------------------------

diff --git a/src/system/kernel/scheduler/scheduler_affine.cpp 
b/src/system/kernel/scheduler/scheduler_affine.cpp
index b504803..6045e15 100644
--- a/src/system/kernel/scheduler/scheduler_affine.cpp
+++ b/src/system/kernel/scheduler/scheduler_affine.cpp
@@ -500,9 +500,10 @@ affine_reschedule(void)
                        && nextThread->priority < B_NORMAL_PRIORITY)
                        quantum = kMaxThreadQuantum;
 
-               if (!thread_is_idle_thread(nextThread))
+               if (!thread_is_idle_thread(nextThread)) {
                        add_timer(quantumTimer, &reschedule_event, quantum,
                                B_ONE_SHOT_RELATIVE_TIMER | 
B_TIMER_ACQUIRE_SCHEDULER_LOCK);
+               }
 
                if (nextThread != oldThread)
                        scheduler_switch_thread(oldThread, nextThread);
diff --git a/src/system/kernel/scheduler/scheduler_simple.cpp 
b/src/system/kernel/scheduler/scheduler_simple.cpp
index 42e6919..4898781 100644
--- a/src/system/kernel/scheduler/scheduler_simple.cpp
+++ b/src/system/kernel/scheduler/scheduler_simple.cpp
@@ -324,9 +324,10 @@ simple_reschedule(void)
                        cancel_timer(quantumTimer);
 
                oldThread->cpu->preempted = 0;
-               if (!thread_is_idle_thread(nextThread))
+               if (!thread_is_idle_thread(nextThread)) {
                        add_timer(quantumTimer, &reschedule_event, quantum,
                                B_ONE_SHOT_RELATIVE_TIMER | 
B_TIMER_ACQUIRE_SCHEDULER_LOCK);
+               }
 
                if (nextThread != oldThread)
                        scheduler_switch_thread(oldThread, nextThread);
diff --git a/src/system/kernel/scheduler/scheduler_simple_smp.cpp 
b/src/system/kernel/scheduler/scheduler_simple_smp.cpp
index ff3e3d2..32dd4e2 100644
--- a/src/system/kernel/scheduler/scheduler_simple_smp.cpp
+++ b/src/system/kernel/scheduler/scheduler_simple_smp.cpp
@@ -423,9 +423,10 @@ reschedule(void)
                        cancel_timer(quantumTimer);
 
                oldThread->cpu->preempted = 0;
-               if (!thread_is_idle_thread(nextThread))
+               if (!thread_is_idle_thread(nextThread)) {
                        add_timer(quantumTimer, &reschedule_event, quantum,
                                B_ONE_SHOT_RELATIVE_TIMER | 
B_TIMER_ACQUIRE_SCHEDULER_LOCK);
+               }
 
                if (nextThread != oldThread)
                        scheduler_switch_thread(oldThread, nextThread);


Other related posts:

  • » [haiku-commits] haiku: hrev44154 - src/system/kernel/scheduler - fredrik . holmqvist