schedule: add scheduler, thread_yield(), etc.
[model-checker.git] / libthreads.h
index 8522871771aeb7f7569e3df819581b449f2e75d9..ff6d5aa975770cd1d5780e3c24ecc1a2db1ab51d 100644 (file)
@@ -1,4 +1,8 @@
+#ifndef __LIBTHREADS_H__
+#define __LIBTHREADS_H__
+
 #include <stdio.h>
+#include <ucontext.h>
 
 #ifdef CONFIG_DEBUG
 #define DBG() do { printf("Here: %s, L%d\n", __func__, __LINE__); } while (0)
@@ -14,7 +18,10 @@ struct thread {
        ucontext_t context;
        void *stack;
        int index;
+       int completed;
 };
 
 int thread_create(struct thread *t, void (*start_routine), void *arg);
 void thread_start(struct thread *t);
+
+#endif /* __LIBTHREADS_H__ */