X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Fthreads%2Fthread.h;h=a9b3251249d11f6415065866cda95032f9a67194;hb=8ca3547f6c4d6d01a76d3ce642a0c1bf884c4c2a;hp=b72c372b7ac98407e353480af5a7e1808dd32c23;hpb=57f2be6df1ca51a22b41699a5f3e5a6671400d3d;p=pintos-anon diff --git a/src/threads/thread.h b/src/threads/thread.h index b72c372..a9b3251 100644 --- a/src/threads/thread.h +++ b/src/threads/thread.h @@ -4,6 +4,10 @@ #include #include "list.h" +#ifdef USERPROG +#include "addrspace.h" +#endif + enum thread_status { THREAD_RUNNING, @@ -17,7 +21,10 @@ struct thread 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); @@ -27,6 +34,10 @@ struct thread *thread_create (const char *name, 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); @@ -35,4 +46,6 @@ void thread_yield (void); void thread_sleep (void); void thread_schedule (void); +void thread_self_test (void); + #endif /* thread.h */