#define HEADER_THREAD_H 1
#include <stdint.h>
+#include "debug.h"
#include "list.h"
#ifdef USERPROG
enum thread_status
{
+ THREAD_INITIALIZING,
THREAD_RUNNING,
THREAD_READY,
THREAD_BLOCKED,
};
void thread_init (void);
+void thread_start (void) NO_RETURN;
-struct thread *thread_create (const char *name,
- void (*function) (void *aux), void *aux);
-void thread_destroy (struct thread *);
-struct thread *thread_current (void);
-
+struct thread *thread_create (const char *name, void (*) (void *aux), void *);
#ifdef USERPROG
bool thread_execute (const char *filename);
#endif
-void thread_start (struct thread *);
+void thread_destroy (struct thread *);
void thread_ready (struct thread *);
-void thread_exit (void);
+struct thread *thread_current (void);
+void thread_exit (void) NO_RETURN;
void thread_yield (void);
void thread_sleep (void);
-void thread_schedule (void);
-
-void thread_self_test (void);
#endif /* thread.h */