diff options
| author | klaar36 <klas.arvidsson@liu.se> | 2015-03-20 17:30:24 +0100 |
|---|---|---|
| committer | klaar36 <klas.arvidsson@liu.se> | 2015-03-20 17:30:24 +0100 |
| commit | e7bc50ca8ffcaa6ed68ebd2315f78b0f5a7d10ad (patch) | |
| tree | 4de97af7207676b69cb6a9aba8cb443cc134855d /src/userprog/flist.h | |
| parent | b0418a24e709f0632d2ede5b0f327c422931939b (diff) | |
| download | pintos-rs-e7bc50ca8ffcaa6ed68ebd2315f78b0f5a7d10ad.tar.gz | |
Initial Pintos
Diffstat (limited to 'src/userprog/flist.h')
| -rw-r--r-- | src/userprog/flist.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/userprog/flist.h b/src/userprog/flist.h new file mode 100644 index 0000000..3fcd1d5 --- /dev/null +++ b/src/userprog/flist.h @@ -0,0 +1,35 @@ +#ifndef _MAP_H_ +#define _MAP_H_ + +/* Place functions to handle a process open files here (file list). + + flist.h : Your function declarations and documentation. + flist.c : Your implementation. + + The following is strongly recommended: + + - A function that given a file (struct file*, see filesys/file.h) + and a process id INSERT this in a list of files. Return an + integer that can be used to find the opened file later. + + - A function that given an integer (obtained from above function) + and a process id FIND the file in a list. Should return NULL if + the specified process did not insert the file or already removed + it. + + - A function that given an integer (obtained from above function) + and a process id REMOVE the file from a list. Should return NULL + if the specified process did not insert the file or already + removed it. + + - A function that given a process id REMOVE ALL files the specified + process have in the list. + + All files obtained from filesys/filesys.c:filesys_open() are + considered OPEN files and must be added to a list or else kept + track of, to guarantee ALL open files are eventyally CLOSED + (probably when removed from the list(s)). + */ + + +#endif |
