summaryrefslogtreecommitdiffstats
path: root/src/threads
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2021-02-05 16:14:34 +0100
committerGustav Sörnäs <gustav@sornas.net>2021-02-05 16:14:34 +0100
commit466145ce0bf0423fdd0c70f7232978cdb2c8aef7 (patch)
treef8e2a98a1ef035c6ee371cdc9e043a0097002ba5 /src/threads
parent1bf4e6694adcb9e0e3ad6c950b61761fa05aac7f (diff)
downloadpintos-466145ce0bf0423fdd0c70f7232978cdb2c8aef7.tar.gz
remove unnecessary fields
Diffstat (limited to 'src/threads')
-rw-r--r--src/threads/thread.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/threads/thread.h b/src/threads/thread.h
index f0fea1f..fc2029b 100644
--- a/src/threads/thread.h
+++ b/src/threads/thread.h
@@ -5,6 +5,8 @@
#include <list.h>
#include <stdint.h>
+#define MAX_FDS 128 /* Max number of file descriptors per thread */
+
/* States in a thread's life cycle. */
enum thread_status
{
@@ -96,10 +98,7 @@ struct thread
#ifdef USERPROG
/* Owned by userprog/process.c. */
uint32_t *pagedir; /* Page directory. */
-
- int num_files;
- int max_files;
- struct fd *files; /* Pointer to array of file descriptors. */
+ struct fd *fds; /* Pointer to array of file descriptors. */
#endif
/* Owned by thread.c. */