From cac6514204ed81c2dee8da04a313590ed8445159 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 13 Mar 2009 17:52:56 +0000 Subject: Ready list insertion code improvement. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@837 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/chschd.c | 22 ---------------------- 1 file changed, 22 deletions(-) (limited to 'src') 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. -- cgit v1.2.3