libthreads: thread_join: return 'int' as status
[model-checker.git] / libthreads.h
index 084883376f9f020b414cdcd4a41a4bb55c0a0f73..1ea54ea758ea895eeac0230082645fc1da9d7ce9 100644 (file)
@@ -10,17 +10,19 @@ typedef enum thread_state {
        THREAD_COMPLETED
 } thread_state;
 
+typedef int thread_id_t;
+
 struct thread {
-       void (*start_routine);
+       void (*start_routine)();
        void *arg;
        ucontext_t context;
        void *stack;
-       int id;
+       thread_id_t id;
        thread_state state;
 };
 
-int thread_create(struct thread *t, void (*start_routine), void *arg);
-void thread_join(struct thread *t);
+int thread_create(struct thread *t, void (*start_routine)(), void *arg);
+int thread_join(struct thread *t);
 int thread_yield(void);
 struct thread *thread_current(void);