/* Shared Memory */
#define IPC_SHMGET (IPC_BASE+1)
-# define SHMGET_KEY m2_l1
-# define SHMGET_SIZE m2_l2
-# define SHMGET_FLAG m2_i1
-# define SHMGET_RETID m2_i2
#define IPC_SHMAT (IPC_BASE+2)
# define SHMAT_ID m2_i1
# define SHMAT_ADDR m2_l1
#include <minix/type.h>
#include <minix/const.h>
#include <sys/signal.h>
+#include <sys/types.h>
/*==========================================================================*
* Types relating to messages. *
} mess_lsys_vm_watch_exit;
_ASSERT_MSG_SIZE(mess_lsys_vm_watch_exit);
+typedef struct {
+ key_t key;
+ size_t size;
+ int flag;
+ int retid;
+ uint8_t padding[40];
+} mess_lc_ipc_shmget;
+_ASSERT_MSG_SIZE(mess_lc_ipc_shmget);
+
typedef struct {
endpoint_t m_source; /* who sent the message */
int m_type; /* what kind of message is it */
mess_lsys_vm_info m_lsys_vm_info;
mess_lsys_vm_update m_lsys_vm_update;
mess_lsys_vm_watch_exit m_lsys_vm_watch_exit;
+ mess_lc_ipc_shmget m_lc_ipc_shmget;
mess_vfs_lchardriver_cancel m_vfs_lchardriver_cancel;
mess_vfs_lchardriver_openclose m_vfs_lchardriver_openclose;
}
memset(&m, 0, sizeof(m));
- m.SHMGET_KEY = key;
- m.SHMGET_SIZE = size;
- m.SHMGET_FLAG = shmflg;
+ m.m_lc_ipc_shmget.key = key;
+ m.m_lc_ipc_shmget.size = size;
+ m.m_lc_ipc_shmget.flag = shmflg;
r = _syscall(ipc_pt, IPC_SHMGET, &m);
if (r != OK)
return r;
- return m.SHMGET_RETID;
+ return m.m_lc_ipc_shmget.retid;
}
int flag;
int id;
- key = m->SHMGET_KEY;
- old_size = size = m->SHMGET_SIZE;
- flag = m->SHMGET_FLAG;
+ key = m->m_lc_ipc_shmget.key;
+ old_size = size = m->m_lc_ipc_shmget.size;
+ flag = m->m_lc_ipc_shmget.flag;
if ((shm = shm_find_key(key))) {
if (!check_perm(&shm->shmid_ds.shm_perm, who_e, flag))
shm_list_nr++;
}
- m->SHMGET_RETID = id;
+ m->m_lc_ipc_shmget.retid = id;
return OK;
}