annotate src/interface/file.dg @ 201:b73c5bd61c37

merge
author menikon <e165723@ie.u-ryukyu.ac.jp>
date Thu, 23 Jan 2020 01:55:03 +0900
parents 14aa35b56347
children a7fc5edea925
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
115
83aadf17d3d0 use .dg files preferentially than .h
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 typedef struct file <Impl> {
157
2fc7ed85e76c rollback (rm sys_* files)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 131
diff changeset
2 union Data* file;
195
14aa35b56347 add page table interface
tobaru
parents: 191
diff changeset
3 enum { FD_NONE, FD_PIPE, FD_INODE } type;
14aa35b56347 add page table interface
tobaru
parents: 191
diff changeset
4 int ref; // reference count
14aa35b56347 add page table interface
tobaru
parents: 191
diff changeset
5 char readable;
14aa35b56347 add page table interface
tobaru
parents: 191
diff changeset
6 char writable;
14aa35b56347 add page table interface
tobaru
parents: 191
diff changeset
7 struct pipe *pipe;
14aa35b56347 add page table interface
tobaru
parents: 191
diff changeset
8 struct inode *ip;
14aa35b56347 add page table interface
tobaru
parents: 191
diff changeset
9 unsigned int off;
157
2fc7ed85e76c rollback (rm sys_* files)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 131
diff changeset
10 struct stat* st;
2fc7ed85e76c rollback (rm sys_* files)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 131
diff changeset
11 char* addr;
2fc7ed85e76c rollback (rm sys_* files)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 131
diff changeset
12 int n;
169
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 159
diff changeset
13 int fd;
157
2fc7ed85e76c rollback (rm sys_* files)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 131
diff changeset
14 __code read(Impl* file, char* addr, __code next(...));
2fc7ed85e76c rollback (rm sys_* files)
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 131
diff changeset
15 __code write(Impl* file, char* addr, int n, __code next(...));
169
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 159
diff changeset
16 __code close(Impl* file,int fd, __code next(...));
115
83aadf17d3d0 use .dg files preferentially than .h
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 } file;