#include <stdint.h>
#include "list.h"
+#ifdef USERPROG
+#include "addrspace.h"
+#endif
+
enum thread_status
{
THREAD_RUNNING,
enum thread_status status;
char name[16];
uint32_t *stack;
- struct list_elem rq_elem;
+ list_elem rq_elem;
+#ifdef USERPROG
+ struct addrspace addrspace;
+#endif
};
void thread_init (void);
void thread_destroy (struct thread *);
struct thread *thread_current (void);
+#ifdef USERPROG
+void thread_execute (const char *filename);
+#endif
+
void thread_start (struct thread *);
void thread_ready (struct thread *);
void thread_exit (void);
void thread_sleep (void);
void thread_schedule (void);
+void thread_self_test (void);
+
#endif /* thread.h */