1 #define _SYSTEM 1 /* get OK and negative error codes */
3 #include <minix/callnr.h>
5 #include <minix/config.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 #include <minix/rmib.h>
14 #include <sys/types.h>
15 #include <sys/param.h>
20 #include <sys/queue.h>
22 #include <machine/param.h>
23 #include <machine/vm.h>
24 #include <machine/vmparam.h>
37 * On NetBSD, these macros are only defined when _KERNEL is set. However,
38 * since ipcs(1) uses IXSEQ_TO_IPCID, NetBSD cannot change these macros without
39 * breaking the userland API. Thus, having a copy of them here is not risky.
41 #define IPCID_TO_IX(id) ((id) & 0xffff)
42 #define IPCID_TO_SEQ(id) (((id) >> 16) & 0xffff)
45 void update_sem_sub(int);
48 int do_shmget(message
*);
49 int do_shmat(message
*);
50 int do_shmdt(message
*);
51 int do_shmctl(message
*);
52 int get_shm_mib_info(struct rmib_oldp
*);
54 void update_refcount_and_destroy(void);
57 int do_semget(message
*);
58 int do_semctl(message
*);
59 int do_semop(message
*);
60 int get_sem_mib_info(struct rmib_oldp
*);
62 void sem_process_event(endpoint_t
, int);
65 int check_perm(struct ipc_perm
*, endpoint_t
, int);
66 void prepare_mib_perm(struct ipc_perm_sysctl
*, const struct ipc_perm
*);