Mercurial > hg > Members > menikon > CbC_xv6
annotate src/impl/pipe.h @ 178:0ef5c1d852fe
mofidy show caller line number at generate_context
author | anatofuz |
---|---|
date | Fri, 17 Jan 2020 15:25:05 +0900 |
parents | 21e83548d738 |
children | 7fc3c3da2159 |
rev | line source |
---|---|
161 | 1 typedef struct pipe<Impl, Isa> impl file { |
154 | 2 #define PIPESIZE 512 |
3 struct spinlock lock; | |
4 char data[PIPESIZE]; | |
5 uint nread; // number of bytes read | |
6 uint nwrite; // number of bytes written | |
7 int readopen; // read fd is still open | |
8 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
|
9 |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
10 // interface field |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
11 int n; |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
12 char* addr; |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
13 |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
14 // private code gear |
21e83548d738
def file_impl_pipe.cbc private code gears
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents:
161
diff
changeset
|
15 __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
|
16 __code piperead2(Impl* pipe, char* addr, int n, __code next(...)); |
154 | 17 } pipe; |