From 466145ce0bf0423fdd0c70f7232978cdb2c8aef7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustav=20S=C3=B6rn=C3=A4s?= Date: Fri, 5 Feb 2021 16:14:34 +0100 Subject: remove unnecessary fields --- src/threads/thread.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/threads/thread.h') 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 #include +#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. */ -- cgit v1.2.1