large. If a stack overflows, it will corrupt the thread
state. Thus, kernel functions should not allocate large
structures or arrays as non-static local variables. Use
large. If a stack overflows, it will corrupt the thread
state. Thus, kernel functions should not allocate large
structures or arrays as non-static local variables. Use
tid_t tid; /* Thread identifier. */
enum thread_status status; /* Thread state. */
char name[16]; /* Name (for debugging purposes). */
uint8_t *stack; /* Saved stack pointer. */
tid_t tid; /* Thread identifier. */
enum thread_status status; /* Thread state. */
char name[16]; /* Name (for debugging purposes). */
uint8_t *stack; /* Saved stack pointer. */
-tid_t thread_create (const char *name, thread_func *, void *);
-#ifdef USERPROG
-tid_t thread_execute (const char *filename);
-#endif
+tid_t thread_create (const char *name, int priority, thread_func *, void *);
void thread_unblock (struct thread *);
struct thread *thread_current (void);
tid_t thread_tid (void);
const char *thread_name (void);
void thread_unblock (struct thread *);
struct thread *thread_current (void);
tid_t thread_tid (void);
const char *thread_name (void);
void thread_exit (void) NO_RETURN;
void thread_yield (void);
void thread_block (void);
void thread_exit (void) NO_RETURN;
void thread_yield (void);
void thread_block (void);
-void thread_set_priority (tid_t, int);
-int thread_get_priority (tid_t);
+
+/* These functions will be implemented in problem 1-3. */
+void thread_set_priority (int);
+int thread_get_priority (void);