make vfs & filesystems use failable copying
[minix3.git] / test / ipc / lib / ipcshm.h
blob0030466012cfa44d30edbf996e7bfd0f1c1e9927
1 /*
3 * Copyright (c) International Business Machines Corp., 2001
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
13 * the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 * ipcshm.h - common definitions for the IPC shared memory tests
24 #ifndef __IPCSHM_H
25 #define __IPCSHM_H
27 #include <errno.h>
28 #include <sys/wait.h>
29 #include <sys/ipc.h>
30 #include <sys/shm.h>
32 #include "test.h"
33 #include "usctest.h"
35 void cleanup(void);
36 void setup(void);
38 #define SHM_RD 0400
39 #define SHM_WR 0200
40 #define SHM_RW SHM_RD | SHM_WR
42 #define SHM_SIZE 2048 /* a resonable size for a memory segment */
43 #define INT_SIZE 4 /* instead of sizeof(int) */
45 #define MODE_MASK 0x01FF /* to get the lower nine permission bits */
46 /* from shmid_ds.ipc_perm.mode */
48 key_t shmkey; /* an IPC key generated by ftok() */
50 void rm_shm(int shm_id);
51 void check_root(void);
53 int getipckey(void);
54 int getuserid(char*);
56 #endif /* ipcshm.h */