make vfs & filesystems use failable copying
[minix3.git] / test / ipc / lib / ipcmsg.h
blob4265afdb9b7e1dd027e53d1334592b2513ed1d69
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 * ipcmsg.h - common definitions for the IPC message tests.
24 #ifndef __IPCMSG_H
25 #define __IPCMSG_H 1
27 #include <errno.h>
28 #include <sys/ipc.h>
29 #include <sys/msg.h>
31 #include "test.h"
32 #include "usctest.h"
34 void cleanup(void);
35 void setup(void);
37 #define MSG_RD 0400 /* read permission for the queue */
38 #define MSG_WR 0200 /* write permission for the queue */
39 #define MSG_RW MSG_RD | MSG_WR
41 #define MSGSIZE 1024 /* a resonable size for a message */
42 #define MSGTYPE 1 /* a type ID for a message */
44 typedef struct mbuf { /* a generic message structure */
45 long mtype;
46 char mtext[MSGSIZE + 1]; /* add 1 here so the message can be 1024 */
47 } MSGBUF; /* characters long with a '\0' termination */
49 #if (!defined CONFIG_COLDFIRE || defined LIBIPC)
50 key_t msgkey; /* the ftok() generated message key */
51 #else
52 extern key_t msgkey; /* the ftok() generated message key */
53 #endif
55 void check_root();
56 void init_buf(MSGBUF *, int, int);
57 void rm_queue(int);
59 int getipckey();
60 int getuserid(char *);
62 #endif /* ipcmsg.h */