diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/data_gear/file.dg	Mon Mar 02 14:19:49 2020 +0900
@@ -0,0 +1,9 @@
+typedef struct file <DATA> { 
+  enum { FD_NONE, FD_PIPE, FD_INODE } type;
+  int          ref;   // reference count
+  char         readable;
+  char         writable;
+  struct pipe  *pipe;
+  struct inode *ip;
+  uint         off;
+} file;