]> git.sur5r.net Git - u-boot/blobdiff - examples/sched.c
fdt: Fix typo in variable name.
[u-boot] / examples / sched.c
index 6b78f69985c029f1f3b25d68fd450f4bbd220e7c..b32766fed129748ba538fd8eef9558c0aa8ea5a6 100644 (file)
@@ -199,7 +199,7 @@ static void thread_yield (void)
 
        PDEBUG ("thread_yield: current tid=%d", current_tid);
 
-#define SWITCH(new)                                                    \
+#define SWITCH(new)                                                    \
        if(lthreads[new].state == STATE_RUNNABLE) {                     \
                PDEBUG("thread_yield: %d match, ctx=0x%08x",            \
                        new,                                            \
@@ -207,11 +207,11 @@ static void thread_yield (void)
                if(setjmp(lthreads[current_tid].context) == 0) {        \
                        current_tid = new;                              \
                        PDEBUG("thread_yield: tid %d returns 0",        \
-                               new);                                   \
+                               new);                                   \
                        longjmp(lthreads[new].context, 1);              \
                } else {                                                \
                        PDEBUG("thread_yield: tid %d returns 1",        \
-                               new);                                   \
+                               new);                                   \
                        return;                                         \
                }                                                       \
        }
@@ -292,7 +292,7 @@ static int thread_start (int id)
                current_tid = id;
                PDEBUG ("thread_start: to be stack=0%08x",
                        (unsigned)lthreads[id].stack);
-               setctxsp (&lthreads[id].stack[STK_SIZE]);
+               setctxsp ((vu_char *)&lthreads[id].stack[STK_SIZE]);
                thread_launcher ();
        }