diff options
Diffstat (limited to 'src/threads/thread.h')
| -rw-r--r-- | src/threads/thread.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/threads/thread.h b/src/threads/thread.h index 0039560..b209036 100644 --- a/src/threads/thread.h +++ b/src/threads/thread.h @@ -80,6 +80,12 @@ typedef int tid_t; only because they are mutually exclusive: only a thread in the ready state is on the run queue, whereas only a thread in the blocked state is on a semaphore wait list. */ +struct fd + { + bool active; + struct file *file; + }; + struct thread { /* Owned by thread.c. */ @@ -95,6 +101,10 @@ 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. */ #endif /* Owned by thread.c. */ |
