Remove building with NOCRYPTO option
[minix.git] / minix / tests / safecopy / inc.h
blob3c3180a3e015bfdcacd8931b1bb9a4763c4f5484
2 #define _SYSTEM 1
4 #include <stdio.h>
5 #include <unistd.h>
6 #include <fcntl.h>
7 #include <stdlib.h>
8 #include <signal.h>
9 #include <sys/types.h>
10 #include <sys/wait.h>
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>
21 #include <errno.h>
23 /* TEST_PAGE_SHIFT =
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)
30 #define BUF_START 100
32 #define FIFO_REQUESTOR "/usr/src/test/safecopy/1fifo"
33 #define FIFO_GRANTOR "/usr/src/test/safecopy/2fifo"
35 #define FIFO_WAIT(fid) { \
36 int a; \
37 if(read(fid, &a, sizeof(a)) != sizeof(a)) \
38 panic("FIFO_WAIT failed"); \
40 #define FIFO_NOTIFY(fid) { \
41 int a = 1; \
42 if(write(fid, &a, sizeof(a)) != sizeof(a)) \
43 panic("FIFO_NOTIFY failed"); \
46 #define DEBUG 0
47 #if DEBUG
48 # define dprint(x) printf x
49 #else
50 # define dprint(x)
51 #endif