12 #include <minix/config.h>
13 #include <minix/com.h>
14 #include <minix/type.h>
15 #include <minix/const.h>
16 #include <minix/endpoint.h>
17 #include <minix/safecopies.h>
18 #include <minix/syslib.h>
19 #include <minix/sysutil.h>
20 #include <minix/minlib.h>
24 * log2(CLICK_SIZE * TEST_PAGE_NUM) = CLICK_SHIFT + log2(TEST_PAGE_NUM)
26 #define TEST_PAGE_NUM 8
27 #define TEST_PAGE_SHIFT 15
29 #define BUF_SIZE (TEST_PAGE_NUM * CLICK_SIZE)
32 #define FIFO_REQUESTOR "/usr/src/test/safecopy/1fifo"
33 #define FIFO_GRANTOR "/usr/src/test/safecopy/2fifo"
35 #define FIFO_WAIT(fid) { \
37 if(read(fid, &a, sizeof(a)) != sizeof(a)) \
38 panic("FIFO_WAIT failed"); \
40 #define FIFO_NOTIFY(fid) { \
42 if(write(fid, &a, sizeof(a)) != sizeof(a)) \
43 panic("FIFO_NOTIFY failed"); \
48 # define dprint(x) printf x