Mercurial > hg > CbC > CbC_xv6
comparison 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 |
comparison
equal
deleted
inserted
replaced
184:00e5213ebabe | 185:7fc3c3da2159 |
---|---|
1 typedef struct pipe<Impl, Isa> impl file { | 1 typedef struct pipe<Impl, Isa> impl file { |
2 #define PIPESIZE 512 | 2 #define PIPESIZE 512 |
3 union Data* file; | |
3 struct spinlock lock; | 4 struct spinlock lock; |
4 char data[PIPESIZE]; | 5 char data[PIPESIZE]; |
5 uint nread; // number of bytes read | 6 uint nread; // number of bytes read |
6 uint nwrite; // number of bytes written | 7 uint nwrite; // number of bytes written |
7 int readopen; // read fd is still open | 8 int readopen; // read fd is still open |
12 char* addr; | 13 char* addr; |
13 | 14 |
14 // private code gear | 15 // private code gear |
15 __code piperead1(Impl* pipe, char* addr, int n, __code next(...)); | 16 __code piperead1(Impl* pipe, char* addr, int n, __code next(...)); |
16 __code piperead2(Impl* pipe, char* addr, int n, __code next(...)); | 17 __code piperead2(Impl* pipe, char* addr, int n, __code next(...)); |
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(...)); | |
17 } pipe; | 24 } pipe; |