HIPC  0.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
mockio.h
Go to the documentation of this file.
1 #include <hipc.h>
2 
3 enum MOCK_errno {
10 };
11 
12 struct MockIOOp {
13  int code; /* 0: read, 1: write */
15  size_t size;
16  unsigned char data[HIPC_IMG_ALLOCSIZE];
17 };
18 
19 struct MockIO {
21  unsigned int i;
22  unsigned int nops;
23  const struct MockIOOp *ops;
24 };
25 
26 extern void mockIOInit(struct MockIO *mio_p, const struct MockIOOp *ops,
27  const unsigned int nops);
28 extern int mockIOCheckCompletion(struct MockIO *mio_p);
29 extern enum HIPC_errno mockIORead(struct MockIO *mio_p, void *buf,
30  const size_t size);
31 extern enum HIPC_errno mockIOWrite(struct MockIO *mio_p, const void *buf,
32  const size_t size);
#define HIPC_IMG_ALLOCSIZE
Definition: hipc.h:46
unsigned char data[HIPC_IMG_ALLOCSIZE]
Definition: mockio.h:16
enum HIPC_errno mockIORead(struct MockIO *mio_p, void *buf, const size_t size)
Definition: mockio.c:30
HIPC_errno
Definition: hipc.h:4
unsigned int i
Definition: mockio.h:21
enum MOCK_errno mock_errno
Definition: mockio.h:20
int code
Definition: mockio.h:13
enum HIPC_errno mockIOWrite(struct MockIO *mio_p, const void *buf, const size_t size)
Definition: mockio.c:63
Definition: mockio.h:19
size_t size
Definition: mockio.h:15
unsigned int nops
Definition: mockio.h:22
MOCK_errno
Definition: mockio.h:3
void mockIOInit(struct MockIO *mio_p, const struct MockIOOp *ops, const unsigned int nops)
Definition: mockio.c:8
int mockIOCheckCompletion(struct MockIO *mio_p)
Definition: mockio.c:19
const struct MockIOOp * ops
Definition: mockio.h:23
enum HIPC_errno retval
Definition: mockio.h:14