X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fthreads%2Fthread.h;h=c0551273d80b5927ad0f41f76f94ca598a9de9b7;hb=63b811f31e550794fbbcaa75ea51b41023178f28;hp=0480293dc51d19c31daae2bde619c503a0d45b16;hpb=4ae5b813663cd56fcbe1f1f547c9d445e5dc6107;p=pintos-anon diff --git a/src/threads/thread.h b/src/threads/thread.h index 0480293..c055127 100644 --- a/src/threads/thread.h +++ b/src/threads/thread.h @@ -5,10 +5,6 @@ #include #include -#ifdef USERPROG -#include "userprog/addrspace.h" -#endif - /* States in a thread's life cycle. */ enum thread_status { @@ -86,7 +82,7 @@ typedef int tid_t; blocked state is on a semaphore wait list. */ struct thread { - /* These members are owned by thread.c. */ + /* Owned by thread.c. */ tid_t tid; /* Thread identifier. */ enum thread_status status; /* Thread state. */ char name[16]; /* Name (for debugging purposes). */ @@ -97,22 +93,21 @@ struct thread list_elem elem; /* List element. */ #ifdef USERPROG - /* These members are owned by userprog/addrspace.c. */ + /* Owned by userprog/process.c. */ uint32_t *pagedir; /* Page directory. */ #endif - /* Marker to detect stack overflow. */ - unsigned magic; /* Always set to THREAD_MAGIC. */ + /* Owned by thread.c */ + unsigned magic; /* Detects stack overflow. */ }; void thread_init (void); void thread_start (void); +void thread_tick (void); +void thread_print_stats (void); typedef void thread_func (void *aux); tid_t thread_create (const char *name, int priority, thread_func *, void *); -#ifdef USERPROG -tid_t thread_execute (const char *filename); -#endif void thread_unblock (struct thread *);