xref: /minix/minix/servers/ipc/inc.h (revision fb4fbf7a)
1 #define _SYSTEM		1	/* get OK and negative error codes */
2 
3 #include <minix/callnr.h>
4 #include <minix/com.h>
5 #include <minix/config.h>
6 #include <minix/ipc.h>
7 #include <minix/endpoint.h>
8 #include <minix/sysutil.h>
9 #include <minix/const.h>
10 #include <minix/type.h>
11 #include <minix/syslib.h>
12 
13 #include <sys/types.h>
14 #include <sys/param.h>
15 #include <sys/ipc.h>
16 #include <sys/shm.h>
17 #include <sys/sem.h>
18 #include <sys/stat.h>
19 #include <sys/queue.h>
20 #include <sys/mman.h>
21 #include <machine/param.h>
22 #include <machine/vm.h>
23 #include <machine/vmparam.h>
24 
25 #include <lib.h>
26 #include <time.h>
27 #include <stdio.h>
28 #include <string.h>
29 #include <stdlib.h>
30 #include <unistd.h>
31 #include <errno.h>
32 #include <signal.h>
33 #include <assert.h>
34 
35 /*
36  * On NetBSD, these macros are only defined when _KERNEL is set.  However,
37  * since ipcs(1) uses IXSEQ_TO_IPCID, NetBSD cannot change these macros without
38  * breaking the userland API.  Thus, having a copy of them here is not risky.
39  */
40 #define IPCID_TO_IX(id)		((id) & 0xffff)
41 #define IPCID_TO_SEQ(id)	(((id) >> 16) & 0xffff)
42 
43 /* main.c */
44 void update_sem_sub(int);
45 
46 /* shm.c */
47 int do_shmget(message *);
48 int do_shmat(message *);
49 int do_shmdt(message *);
50 int do_shmctl(message *);
51 int is_shm_nil(void);
52 void update_refcount_and_destroy(void);
53 
54 /* sem.c */
55 int do_semget(message *);
56 int do_semctl(message *);
57 int do_semop(message *);
58 int is_sem_nil(void);
59 void sem_process_event(endpoint_t, int);
60 
61 /* utility.c */
62 int check_perm(struct ipc_perm *, endpoint_t, int);
63