view 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 source

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;