diff --git a/threads/thread.c b/threads/thread.c index d8980f9b8e401f9bb9ee0b3dbf9251e5c541d75b..ed5fa63f1c42ea582a153c8fa0e0371e041e9f94 100644 --- a/threads/thread.c +++ b/threads/thread.c @@ -254,14 +254,14 @@ thread_unblock (struct thread *t) const char * thread_name (void) { - return thread_current ()->name; + return thread_current()->name; } /* Returns the exit code of the running thread. */ -const int * -thread_exit_code (void) +int +thread_exit_code (void) { - return thread_current ()->exit_code; + return thread_current()->exit_code; } /* Returns the running thread. diff --git a/threads/thread.h b/threads/thread.h index b57608eee203024a22f821a64531938ca140300a..2feb8cc242719e1d684aef2108d9c8ca501a922f 100644 --- a/threads/thread.h +++ b/threads/thread.h @@ -123,7 +123,7 @@ void thread_unblock (struct thread *); struct thread *thread_current (void); tid_t thread_tid (void); const char *thread_name (void); -const int *thread_exit_code (void); +int thread_exit_code (void); void thread_exit (void) NO_RETURN; void thread_yield (void);