aboutsummaryrefslogtreecommitdiffstats
path: root/src/chschd.c
diff options
context:
space:
mode:
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) {