Skip to contentSkip to conversation

Make yield private

PATCH In review Con Kolivas 1 participant 1 message Oct 30, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 9/28 Make yield private

Make yield private

Yield() implementation is scheduler dependant; privatise it.

kernel/sched.c +0 -14
Index: linux-2.6.10-rc1-mm2-plugsched1/kernel/sched.c
===================================================================
@@ -3162,20 +3162,6 @@ static long ingo_sys_sched_yield(void)
 	return 0;
 }
 
-/**
- * yield - yield the current processor to other threads.
- *
- * this is a shortcut for kernel-space yielding - it marks the
- * thread runnable and calls sys_sched_yield().
- */
-void __sched yield(void)
-{
-	set_current_state(TASK_RUNNING);
-	sys_sched_yield();
-}
-
-EXPORT_SYMBOL(yield);
-
 /*
  * This task is about to go to sleep on IO.  Increment rq->nr_iowait so
  * that process accounting knows that this is a task in IO wait state.
kernel/scheduler.c +14 -0
Index: linux-2.6.10-rc1-mm2-plugsched1/kernel/scheduler.c
===================================================================
@@ -621,6 +621,20 @@ int __sched cond_resched_softirq(void)
 
 EXPORT_SYMBOL(cond_resched_softirq);
 
+/**
+ * yield - yield the current processor to other threads.
+ *
+ * this is a shortcut for kernel-space yielding - it marks the
+ * thread runnable and calls sys_sched_yield().
+ */
+void __sched yield(void)
+{
+	set_current_state(TASK_RUNNING);
+	sys_sched_yield();
+}
+
+EXPORT_SYMBOL(yield);
+
 extern struct sched_drv ingo_sched_drv;
 static const struct sched_drv *scheduler = &ingo_sched_drv;