annotate src/data_gear/file.dg @ 346:36ed64fea8c1

emit context.h
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Mon, 02 Mar 2020 14:19:49 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
346
36ed64fea8c1 emit context.h
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 typedef struct file <DATA> {
36ed64fea8c1 emit context.h
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 enum { FD_NONE, FD_PIPE, FD_INODE } type;
36ed64fea8c1 emit context.h
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 int ref; // reference count
36ed64fea8c1 emit context.h
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 char readable;
36ed64fea8c1 emit context.h
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 char writable;
36ed64fea8c1 emit context.h
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 struct pipe *pipe;
36ed64fea8c1 emit context.h
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 struct inode *ip;
36ed64fea8c1 emit context.h
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 uint off;
36ed64fea8c1 emit context.h
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 } file;