aboutsummaryrefslogtreecommitdiffstats
path: root/src/chschd.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2007-11-16 16:15:47 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2007-11-16 16:15:47 +0000
commit195a9c7951c29828d7eddefcd77d7a98d18f75f3 (patch)
tree3d35476b307e444dba02720f3503be1e6c6c2296 /src/chschd.c
parentda365c95e4460bda1f5b49a2e55ae144da1faf3f (diff)
downloadChibiOS-195a9c7951c29828d7eddefcd77d7a98d18f75f3.tar.gz
ChibiOS-195a9c7951c29828d7eddefcd77d7a98d18f75f3.tar.bz2
ChibiOS-195a9c7951c29828d7eddefcd77d7a98d18f75f3.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@94 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chschd.c')
-rw-r--r--src/chschd.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/chschd.c b/src/chschd.c
index d3b112cf1..a6299644e 100644
--- a/src/chschd.c
+++ b/src/chschd.c
@@ -61,13 +61,17 @@ void chSchInit(void) {
* be called soon after.
* @note The function is not meant to be used in the user code directly.
*/
+#ifdef CH_OPTIMIZE_SPEED
+/* NOTE: it is inlined in this module only.*/
+INLINE Thread *chSchReadyI(Thread *tp) {
+#else
Thread *chSchReadyI(Thread *tp) {
- Thread *cp;
+#endif
+ Thread *cp = rlist.r_queue.p_prev;
t_prio prio = tp->p_prio;
tp->p_state = PRREADY;
tp->p_rdymsg = RDY_OK;
- cp = rlist.r_queue.p_prev;
while (cp->p_prio < prio)
cp = cp->p_prev;
// Insertion on p_next
@@ -79,6 +83,7 @@ Thread *chSchReadyI(Thread *tp) {
/*
* Switches to the next thread in the ready list, the ready list is assumed
* to contain at least a thread.
+ * NOTE: it is inlined in this module only.
*/
#ifdef CH_OPTIMIZE_SPEED
static INLINE void nextready(void) {