15 static int get_ipc_endpt(endpoint_t
*pt
)
17 return minix_rs_lookup("ipc", pt
);
20 /* Get shared memory segment. */
21 int shmget(key_t key
, size_t size
, int shmflg
)
27 if (get_ipc_endpt(&ipc_pt
) != OK
) {
32 memset(&m
, 0, sizeof(m
));
33 m
.m_lc_ipc_shmget
.key
= key
;
34 m
.m_lc_ipc_shmget
.size
= size
;
35 m
.m_lc_ipc_shmget
.flag
= shmflg
;
37 r
= _syscall(ipc_pt
, IPC_SHMGET
, &m
);
40 return m
.m_lc_ipc_shmget
.retid
;