annotate src/interface/SysRead.h @ 135:0c24464a66d8

introduce protoype sysread interface
author anatofuz
date Thu, 12 Dec 2019 12:57:29 +0900
parents c690327cabc8
children e3dd8f96c2fb f49d1bb1b947
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
96
d5c4016c65b8 implement read interfacce
anatofuz
parents: 92
diff changeset
1 typedef struct SysRead<Type, Impl>{
d5c4016c65b8 implement read interfacce
anatofuz
parents: 92
diff changeset
2 union Data* sys_read;
135
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
3 union Data* impl;
128
7ce72e373d9b fix initialize data gears
anatofuz
parents: 120
diff changeset
4 int num;
131
c690327cabc8 using dg file
anatofuz
parents: 128
diff changeset
5 char* addr;
c690327cabc8 using dg file
anatofuz
parents: 128
diff changeset
6 struct file* file;
135
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
7 int r;
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
8 struct pipe* pipe;
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
9 __code read(Impl* sys_read, union Data* impl, char* addr, int n, __code (*next)(int ret));
106
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 96
diff changeset
10 //__code ret(Impl* cbc_sys_file, UInteger* num);
92
bc5bcfd2f6d6 rename CbCFile to CbCSysFile
anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
11 __code next(...);
135
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
12 //__code cbc_fileread1(Impl* sys_read, int r);
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
13 __code cbc_fileread(Impl* sys_read, struct file* file, char* addr, int n, __code (*next)(int ret));
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
14 __code cbc_piperead(Impl* sys_read, struct pipe *p, char *addr, int n, __code (*next)(int ret));
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
15 //__code cbc_piperead1(Impl* sys_read, struct pipe* p);
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
16 //__code cbc_piperead2(Impl* sys_read, int i, int n,struct pipe* p);
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
17 //__code cbc_piperead3(Impl* sys_read, struct pipe* p, int i);
96
d5c4016c65b8 implement read interfacce
anatofuz
parents: 92
diff changeset
18 } SysRead;
135
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
19
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
20 /*
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
21 * cbc_piperead cbc_filereのAPIは微妙な違いしかない
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
22 * union Dataから実装の型を見てキャストすると良さそう
0c24464a66d8 introduce protoype sysread interface
anatofuz
parents: 131
diff changeset
23 */