annotate src/impl/pipe.h @ 160:5de948efb678

mv move_data_gears to impl
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Tue, 14 Jan 2020 17:10:32 +0900
parents src/move_data_gears/pipe.h@eda7ea83f4f3
children 06bf68d3b83b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
159
eda7ea83f4f3 impl file interface
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 154
diff changeset
1 typedef struct pipe<Impl, Isa> Impl file {
154
343f8f3c8f18 add pipe.h
anatofuz
parents:
diff changeset
2 #define PIPESIZE 512
343f8f3c8f18 add pipe.h
anatofuz
parents:
diff changeset
3 struct spinlock lock;
343f8f3c8f18 add pipe.h
anatofuz
parents:
diff changeset
4 char data[PIPESIZE];
343f8f3c8f18 add pipe.h
anatofuz
parents:
diff changeset
5 uint nread; // number of bytes read
343f8f3c8f18 add pipe.h
anatofuz
parents:
diff changeset
6 uint nwrite; // number of bytes written
343f8f3c8f18 add pipe.h
anatofuz
parents:
diff changeset
7 int readopen; // read fd is still open
343f8f3c8f18 add pipe.h
anatofuz
parents:
diff changeset
8 int writeopen; // write fd is still open
343f8f3c8f18 add pipe.h
anatofuz
parents:
diff changeset
9 } pipe;