aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-03-13 17:52:56 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-03-13 17:52:56 +0000
commitcac6514204ed81c2dee8da04a313590ed8445159 (patch)
tree77b0ca2964db0444b69ae72208c0d58327d1600c /src
parent19e54114ecf114725575b2151b49d315e0696217 (diff)
downloadChibiOS-cac6514204ed81c2dee8da04a313590ed8445159.tar.gz
ChibiOS-cac6514204ed81c2dee8da04a313590ed8445159.tar.bz2
ChibiOS-cac6514204ed81c2dee8da04a313590ed8445159.zip
Ready list insertion code improvement.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@837 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src')
-rw-r--r--src/chschd.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/chschd.c b/src/chschd.c
index cfc2355dc..6bb03aab2 100644
--- a/src/chschd.c
+++ b/src/chschd.c
@@ -52,27 +52,6 @@ void scheduler_init(void) {
* @note The function does not reschedule, the @p chSchRescheduleS() should
* be called soon after.
*/
-#if 0
-#if CH_OPTIMIZE_SPEED
-/* NOTE: it is inlined in this module only.*/
-INLINE Thread *chSchReadyI(Thread *tp) {
-#else
-Thread *chSchReadyI(Thread *tp) {
-#endif
- Thread *cp;
-
- tp->p_state = PRREADY;
- cp = rlist.p_next;
- while (cp->p_prio >= tp->p_prio)
- cp = cp->p_next;
- /* Insertion on p_prev.*/
- tp->p_prev = (tp->p_next = cp)->p_prev;
- tp->p_prev->p_next = cp->p_prev = tp;
- return tp;
-}
-#endif
-
-#if 1
#if CH_OPTIMIZE_SPEED
/* NOTE: it is inlined in this module only.*/
INLINE Thread *chSchReadyI(Thread *tp) {
@@ -91,7 +70,6 @@ Thread *chSchReadyI(Thread *tp) {
tp->p_prev->p_next = cp->p_prev = tp;
return tp;
}
-#endif
/**
* @brief Puts the current thread to sleep into the specified state.