Mercurial > hg > CbC > CbC_xv6
annotate src/impl/pipe.h @ 185:7fc3c3da2159
bump pipe.h
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 21 Jan 2020 14:50:15 +0900 |
parents | 21e83548d738 |
children | 9d385a07dbfc |
rev | line source |
---|---|
161 | 1 typedef struct pipe<Impl, Isa> impl file { |
154 | 2 #define PIPESIZE 512 |
185 | 3 union Data* file; |
154 | 4 struct spinlock lock; |
5 char data[PIPESIZE]; | |
6 uint nread; // number of bytes read | |
7 uint nwrite; // number of bytes written | |
8 int readopen; // read fd is still open | |
9 int writeopen; // write fd is still open | |
165
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
10 |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
11 // interface field |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
12 int n; |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
13 char* addr; |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
14 |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
15 // private code gear |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
16 __code piperead1(Impl* pipe, char* addr, int n, __code next(...)); |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
17 __code piperead2(Impl* pipe, char* addr, int n, __code next(...)); |
185 | 18 __code cbc_fileclose(Impl* pipe, Isa* file, __code next(...)); |
19 __code cbc_fileclose2(Impl* pipe, Isa* file,struct file* ff, __code next(...)); | |
20 __code cbc_fileclose3(Impl* pipe, Isa* file,struct file* ff, __code next(...)); | |
21 __code cbc_pipe_close(Impl* p, int writable, __code next(...)); | |
22 __code cbc_pipe_close_writeopen(Impl* p, __code next(...)); | |
23 __code cbc_pipe_close_readopen(Impl* p, __code next(...)); | |
154 | 24 } pipe; |