#define IPC_SEMGET (IPC_BASE+5)
#define IPC_SEMCTL (IPC_BASE+6)
#define IPC_SEMOP (IPC_BASE+7)
-# define SEMOP_ID m2_i1
-# define SEMOP_OPS m2_l1
-# define SEMOP_SIZE m2_i2
/*===========================================================================*
* Messages for Scheduling *
} mess_lc_ipc_semctl;
_ASSERT_MSG_SIZE(mess_lc_ipc_semctl);
+typedef struct {
+ int id;
+ void *ops;
+ unsigned int size;
+ uint8_t padding[42];
+} mess_lc_ipc_semop;
+_ASSERT_MSG_SIZE(mess_lc_ipc_semop);
+
typedef struct {
endpoint_t m_source; /* who sent the message */
int m_type; /* what kind of message is it */
mess_lc_ipc_shmctl m_lc_ipc_shmctl;
mess_lc_ipc_semget m_lc_ipc_semget;
mess_lc_ipc_semctl m_lc_ipc_semctl;
+ mess_lc_ipc_semop m_lc_ipc_semop;
mess_vfs_lchardriver_cancel m_vfs_lchardriver_cancel;
mess_vfs_lchardriver_openclose m_vfs_lchardriver_openclose;
}
memset(&m, 0, sizeof(m));
- m.SEMOP_ID = semid;
- m.SEMOP_OPS = (long) sops;
- m.SEMOP_SIZE = nsops;
+ m.m_lc_ipc_semop.id = semid;
+ m.m_lc_ipc_semop.ops = sops;
+ m.m_lc_ipc_semop.size = nsops;
return _syscall(ipc_pt, IPC_SEMOP, &m);
}
struct sem_struct *sem;
int no_reply = 0;
- id = m->SEMOP_ID;
- nsops = (unsigned int) m->SEMOP_SIZE;
+ id = m->m_lc_ipc_semop.id;
+ nsops = m->m_lc_ipc_semop.size;
r = EINVAL;
if (!(sem = sem_find_id(id)))
sops = malloc(sizeof(struct sembuf) * nsops);
if (!sops)
goto out_free;
- r = sys_datacopy(who_e, (vir_bytes) m->SEMOP_OPS,
+ r = sys_datacopy(who_e, (vir_bytes) m->m_lc_ipc_semop.ops,
SELF, (vir_bytes) sops,
sizeof(struct sembuf) * nsops);
if (r != OK) {