Adding ipc_ prefix to ipc primitives

* Also change _orig to _intr for clarity
 * Cleaned up {IPC,KER}VEC
 * Renamed _minix_kernel_info_struct to get_minix_kerninfo
 * Merged _senda.S into _ipc.S
 * Moved into separate files get_minix_kerninfo and _do_kernel_call
 * Adapted do_kernel_call to follow same _ convention as ipc functions
 * Drop patches in libc/net/send.c and libc/include/namespace.h

Change-Id: If4ea21ecb65435170d7d87de6c826328e84c18d0
This commit is contained in:
Lionel Sambuc 2013-11-01 13:34:14 +01:00
parent a5f47c23d5
commit c3fc9df84a
118 changed files with 414 additions and 413 deletions

View file

@ -149,9 +149,9 @@ int main(void)
((struct acpi_request_hdr *)&m)->m_source);
}
err = send(m.m_source, &m);
err = ipc_send(m.m_source, &m);
if (err != OK) {
printf("ACPI: send failed: %d\n", err);
printf("ACPI: ipc_send failed: %d\n", err);
}
}
}

View file

@ -84,7 +84,7 @@ int main(void)
if (m.m_type == IOMMU_MAP) {
r= do_add4pci(&m);
m.m_type= r;
send(m.m_source, &m);
ipc_send(m.m_source, &m);
continue;
}
printf("amddev: got message from %d\n", m.m_source);

View file

@ -735,7 +735,7 @@ static void atl2_reply(void)
ATL2_DEBUG(("ATL2: sending reply, flags %x count %d\n", flags,
m.DL_COUNT));
if ((r = send(state.task_endpt, &m)) != OK)
if ((r = ipc_send(state.task_endpt, &m)) != OK)
panic("unable to reply: %d", r);
state.flags &= ~(ATL2_FLAG_PACK_SENT | ATL2_FLAG_PACK_RCVD);
@ -1042,7 +1042,7 @@ static void atl2_conf(message *m)
m->m_type = DL_CONF_REPLY;
m->DL_STAT = OK;
if ((r = send(m->m_source, m)) != OK)
if ((r = ipc_send(m->m_source, m)) != OK)
printf("ATL2: unable to send reply (%d)\n", r);
}
@ -1060,7 +1060,7 @@ static void atl2_getstat(message *m)
m->m_type = DL_STAT_REPLY;
if ((r = send(m->m_source, m)) != OK)
if ((r = ipc_send(m->m_source, m)) != OK)
printf("ATL2: unable to send reply (%d)\n", r);
}

View file

@ -182,7 +182,7 @@ static void do_get_stat_s(message * mp)
panic("%s %d", str_CopyErrMsg, rc);
mp->m_type = DL_STAT_REPLY;
rc = send(mp->m_source, mp);
rc = ipc_send(mp->m_source, mp);
if( rc != OK )
panic("%s %d", str_StatErrMsg, rc);
return;
@ -251,7 +251,7 @@ static void do_conf(const message * mp)
*(ether_addr_t *) reply_mess.DL_HWADDR = dep->de_address;
}
if (send(mp->m_source, &reply_mess) != OK)
if (ipc_send(mp->m_source, &reply_mess) != OK)
panic("%s %d", str_SendErrMsg, mp->m_source);
return;
@ -269,7 +269,7 @@ static void do_reply(dpeth_t * dep)
reply.DL_FLAGS = flags;
reply.DL_COUNT = dep->de_read_s;
r = send(dep->de_client, &reply);
r = ipc_send(dep->de_client, &reply);
if(r < 0)
panic("%s %d", str_SendErrMsg, r);

View file

@ -582,9 +582,9 @@ message *mp;
(vir_bytes) sizeof(dep->de_stat), &dep->de_stat);
mp->m_type= DL_STAT_REPLY;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != OK)
panic("do_getstat: send failed: %d", r);
panic("do_getstat: ipc_send failed: %d", r);
return;
}
assert(dep->de_mode == DEM_ENABLED);
@ -598,9 +598,9 @@ message *mp;
sizeof(dep->de_stat), &dep->de_stat);
mp->m_type= DL_STAT_REPLY;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != OK)
panic("do_getstat: send failed: %d", r);
panic("do_getstat: ipc_send failed: %d", r);
}
/*===========================================================================*
@ -1741,10 +1741,10 @@ dpeth_t *dep;
reply.m_type = DL_TASK_REPLY;
reply.DL_FLAGS = flags;
reply.DL_COUNT = dep->de_read_s;
r= send(dep->de_client, &reply);
r= ipc_send(dep->de_client, &reply);
if (r < 0)
panic("dp8390: send failed: %d", r);
panic("dp8390: ipc_send failed: %d", r);
dep->de_read_s = 0;
dep->de_flags &= ~(DEF_PACK_SEND | DEF_PACK_RECV);
@ -1757,7 +1757,7 @@ static void mess_reply(req, reply_mess)
message *req;
message *reply_mess;
{
if (send(req->m_source, reply_mess) != OK)
if (ipc_send(req->m_source, reply_mess) != OK)
panic("dp8390: unable to mess_reply");
}

View file

@ -67,7 +67,7 @@ static void reply(dpeth_t * dep)
DEBUG(printf("\t reply %d (%lx)\n", reply.m_type, reply.DL_FLAGS));
if ((r = send(dep->de_client, &reply)) != OK)
if ((r = ipc_send(dep->de_client, &reply)) != OK)
panic(SendErrMsg, r);
dep->de_read_s = 0;
@ -299,7 +299,7 @@ static void do_init(const message * mp)
if (r == OK)
*(ether_addr_t *) reply_mess.DL_HWADDR = dep->de_address;
DEBUG(printf("\t reply %d\n", reply_mess.m_type));
if (send(mp->m_source, &reply_mess) != OK) /* Can't send */
if (ipc_send(mp->m_source, &reply_mess) != OK) /* Can't send */
panic(SendErrMsg, mp->m_source);
return;
@ -437,9 +437,9 @@ static void do_getstat_s(const message * mp)
panic(CopyErrMsg, rc);
reply_mess.m_type = DL_STAT_REPLY;
rc= send(mp->m_source, &reply_mess);
rc= ipc_send(mp->m_source, &reply_mess);
if (rc != OK)
panic("do_getname: send failed: %d", rc);
panic("do_getname: ipc_send failed: %d", rc);
return;
}

View file

@ -793,8 +793,8 @@ message *mp;
sys_safecopyto(mp->m_source, mp->DL_GRANT, 0, (vir_bytes)&stats,
sizeof(stats));
mp->m_type = DL_STAT_REPLY;
if((r=send(mp->m_source, mp)) != OK)
panic("e1000_getstat: send() failed: %d", r);
if((r=ipc_send(mp->m_source, mp)) != OK)
panic("e1000_getstat: ipc_send() failed: %d", r);
}
/*===========================================================================*
@ -1183,9 +1183,9 @@ e1000_t *e;
}
/* Acknowledge to INET. */
if ((r = send(e->client, &msg)) != OK)
if ((r = ipc_send(e->client, &msg)) != OK)
{
panic("send() failed: %d", r);
panic("ipc_send() failed: %d", r);
}
}
@ -1196,7 +1196,7 @@ static void mess_reply(req, reply_mess)
message *req;
message *reply_mess;
{
if (send(req->m_source, reply_mess) != OK)
if (ipc_send(req->m_source, reply_mess) != OK)
{
panic("unable to send reply message");
}

View file

@ -96,9 +96,9 @@ do_read(endpoint_t driver_endpt, uint8_t *buf, size_t bufsize)
m.BDEV_ID = 0;
m.BDEV_MINOR = 0;
r = sendrec(driver_endpt, &m);
r = ipc_sendrec(driver_endpt, &m);
if (r != OK) {
log_debug(&log, "sendrec(BDEV_OPEN) failed (r=%d)\n", r);
log_debug(&log, "ipc_sendrec(BDEV_OPEN) failed (r=%d)\n", r);
return r;
}
@ -116,16 +116,16 @@ do_read(endpoint_t driver_endpt, uint8_t *buf, size_t bufsize)
m.BDEV_POS_LO = 0;
m.BDEV_POS_HI = 0;
r = sendrec(driver_endpt, &m);
r = ipc_sendrec(driver_endpt, &m);
cpf_revoke(grant_nr);
if (r != OK) {
log_debug(&log, "sendrec(BDEV_READ) failed (r=%d)\n", r);
log_debug(&log, "ipc_sendrec(BDEV_READ) failed (r=%d)\n", r);
/* Clean-up: try to close the device */
memset(&m, '\0', sizeof(message));
m.m_type = BDEV_CLOSE;
m.BDEV_MINOR = 0;
m.BDEV_ID = 0;
sendrec(driver_endpt, &m);
ipc_sendrec(driver_endpt, &m);
return r;
}
@ -134,9 +134,9 @@ do_read(endpoint_t driver_endpt, uint8_t *buf, size_t bufsize)
m.m_type = BDEV_CLOSE;
m.BDEV_MINOR = 0;
m.BDEV_ID = 0;
r = sendrec(driver_endpt, &m);
r = ipc_sendrec(driver_endpt, &m);
if (r != OK) {
log_debug(&log, "sendrec(BDEV_CLOSE) failed (r=%d)\n", r);
log_debug(&log, "ipc_sendrec(BDEV_CLOSE) failed (r=%d)\n", r);
return r;
}

View file

@ -153,8 +153,8 @@ static int fbd_open(devminor_t UNUSED(minor), int access)
m.BDEV_ACCESS = access;
m.BDEV_ID = 0;
if ((r = sendrec(driver_endpt, &m)) != OK)
panic("sendrec to driver failed (%d)\n", r);
if ((r = ipc_sendrec(driver_endpt, &m)) != OK)
panic("ipc_sendrec to driver failed (%d)\n", r);
if (m.m_type != BDEV_REPLY)
panic("invalid reply from driver (%d)\n", m.m_type);
@ -177,8 +177,8 @@ static int fbd_close(devminor_t UNUSED(minor))
m.BDEV_MINOR = driver_minor;
m.BDEV_ID = 0;
if ((r = sendrec(driver_endpt, &m)) != OK)
panic("sendrec to driver failed (%d)\n", r);
if ((r = ipc_sendrec(driver_endpt, &m)) != OK)
panic("ipc_sendrec to driver failed (%d)\n", r);
if (m.m_type != BDEV_REPLY)
panic("invalid reply from driver (%d)\n", m.m_type);
@ -218,8 +218,8 @@ static int fbd_ioctl(devminor_t UNUSED(minor), unsigned long request,
m.BDEV_USER = NONE;
m.BDEV_ID = 0;
if ((r = sendrec(driver_endpt, &m)) != OK)
panic("sendrec to driver failed (%d)\n", r);
if ((r = ipc_sendrec(driver_endpt, &m)) != OK)
panic("ipc_sendrec to driver failed (%d)\n", r);
if (m.m_type != BDEV_REPLY)
panic("invalid reply from driver (%d)\n", m.m_type);
@ -261,8 +261,8 @@ static ssize_t fbd_transfer_direct(int do_write, u64_t position,
m.BDEV_POS_LO = ex64lo(position);
m.BDEV_POS_HI = ex64hi(position);
if ((r = sendrec(driver_endpt, &m)) != OK)
panic("sendrec to driver failed (%d)\n", r);
if ((r = ipc_sendrec(driver_endpt, &m)) != OK)
panic("ipc_sendrec to driver failed (%d)\n", r);
if (m.m_type != BDEV_REPLY)
panic("invalid reply from driver (%d)\n", m.m_type);
@ -354,8 +354,8 @@ static ssize_t fbd_transfer_copy(int do_write, u64_t position,
m.BDEV_POS_LO = ex64lo(position);
m.BDEV_POS_HI = ex64hi(position);
if ((r = sendrec(driver_endpt, &m)) != OK)
panic("sendrec to driver failed (%d)\n", r);
if ((r = ipc_sendrec(driver_endpt, &m)) != OK)
panic("ipc_sendrec to driver failed (%d)\n", r);
if (m.m_type != BDEV_REPLY)
panic("invalid reply from driver (%d)\n", m.m_type);

View file

@ -19,8 +19,8 @@ static int problem_stats[BD_LAST] = { 0 };
static int driver_open(int which)
{
/* Perform an open or close operation on the driver. This is
* unfinished code: we should never be doing a blocking sendrec() to
* the driver.
* unfinished code: we should never be doing a blocking ipc_sendrec()
* to the driver.
*/
message msg;
cp_grant_id_t gid;
@ -33,17 +33,17 @@ static int driver_open(int which)
msg.BDEV_MINOR = driver[which].minor;
msg.BDEV_ACCESS = BDEV_R_BIT | BDEV_W_BIT;
msg.BDEV_ID = 0;
r = sendrec(driver[which].endpt, &msg);
r = ipc_sendrec(driver[which].endpt, &msg);
if (r != OK) {
/* Should we restart the driver now? */
printf("Filter: driver_open: sendrec returned %d\n", r);
printf("Filter: driver_open: ipc_sendrec returned %d\n", r);
return RET_REDO;
}
if(msg.m_type != BDEV_REPLY || msg.BDEV_STATUS != OK) {
printf("Filter: driver_open: sendrec returned %d, %d\n",
printf("Filter: driver_open: ipc_sendrec returned %d, %d\n",
msg.m_type, msg.BDEV_STATUS);
return RET_REDO;
@ -63,7 +63,7 @@ static int driver_open(int which)
msg.BDEV_USER = NONE;
msg.BDEV_ID = 0;
r = sendrec(driver[which].endpt, &msg);
r = ipc_sendrec(driver[which].endpt, &msg);
cpf_revoke(gid);
@ -113,17 +113,17 @@ static int driver_close(int which)
msg.m_type = BDEV_CLOSE;
msg.BDEV_MINOR = driver[which].minor;
msg.BDEV_ID = 0;
r = sendrec(driver[which].endpt, &msg);
r = ipc_sendrec(driver[which].endpt, &msg);
if (r != OK) {
/* Should we restart the driver now? */
printf("Filter: driver_close: sendrec returned %d\n", r);
printf("Filter: driver_close: ipc_sendrec returned %d\n", r);
return RET_REDO;
}
if(msg.m_type != BDEV_REPLY || msg.BDEV_STATUS != OK) {
printf("Filter: driver_close: sendrec returned %d, %d\n",
printf("Filter: driver_close: ipc_sendrec returned %d, %d\n",
msg.m_type, msg.BDEV_STATUS);
return RET_REDO;
@ -435,7 +435,7 @@ static void restart_driver(int which, int tell_rs)
driver[which].label);
#endif
r = sendrec(RS_PROC_NR, &msg);
r = ipc_sendrec(RS_PROC_NR, &msg);
if (r != OK || msg.m_type != OK)
panic("RS request failed: %d", r);
@ -531,10 +531,10 @@ static int flt_senda(message *mess, int which)
amp->dst = driver[which].endpt;
amp->msg = *mess;
amp->flags = AMF_VALID;
r = senda(amsgtable, 2);
r = ipc_senda(amsgtable, 2);
if(r != OK)
panic("senda returned error: %d", r);
panic("ipc_senda returned error: %d", r);
return r;
}

View file

@ -1433,9 +1433,9 @@ static void fxp_getstat_s(message *mp)
panic("fxp_getstat_s: sys_safecopyto failed: %d", r);
mp->m_type= DL_STAT_REPLY;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != OK)
panic("fxp_getstat_s: send failed: %d", r);
panic("fxp_getstat_s: ipc_send failed: %d", r);
}
/*===========================================================================*
@ -1939,10 +1939,10 @@ fxp_t *fp;
reply.DL_FLAGS = flags;
reply.DL_COUNT = fp->fxp_read_s;
r= send(fp->fxp_client, &reply);
r= ipc_send(fp->fxp_client, &reply);
if (r < 0)
panic("fxp: send failed: %d", r);
panic("fxp: ipc_send failed: %d", r);
fp->fxp_read_s = 0;
fp->fxp_flags &= ~(FF_PACK_SENT | FF_PACK_RECV);
@ -1955,7 +1955,7 @@ static void mess_reply(req, reply_mess)
message *req;
message *reply_mess;
{
if (send(req->m_source, reply_mess) != OK)
if (ipc_send(req->m_source, reply_mess) != OK)
panic("fxp: unable to mess_reply");
}
@ -2183,10 +2183,10 @@ int pci_func;
m.m2_l1= buf;
m.m2_l2= size;
r= sendrec(dev_e, &m);
r= ipc_sendrec(dev_e, &m);
if (r != OK)
{
printf("fxp`tell_dev: sendrec to %d failed: %d\n",
printf("fxp`tell_dev: ipc_sendrec to %d failed: %d\n",
dev_e, r);
return;
}

View file

@ -341,8 +341,8 @@ i2c_other(message * m, int ipc_status)
memset(&m_reply, 0, sizeof(m_reply));
m_reply.m_type = r;
if ((r = send(m->m_source, &m_reply)) != OK)
log_warn(&log, "send() to %d failed: %d\n", m->m_source, r);
if ((r = ipc_send(m->m_source, &m_reply)) != OK)
log_warn(&log, "ipc_send() to %d failed: %d\n", m->m_source, r);
}
/*

View file

@ -440,8 +440,8 @@ message *mp;
sizeof(stats));
mp->m_type = DL_STAT_REPLY;
if ((r=send(mp->m_source, mp)) != OK) {
panic("lan8710a_getstat: send() failed: %d", r);
if ((r=ipc_send(mp->m_source, mp)) != OK) {
panic("lan8710a_getstat: ipc_send() failed: %d", r);
}
}
@ -1189,7 +1189,7 @@ static void
mess_reply(req, reply)
message *req;message *reply;
{
if (send(req->m_source, reply) != OK) {
if (ipc_send(req->m_source, reply) != OK) {
panic("unable to send reply message");
}
}
@ -1235,7 +1235,7 @@ lan8710a_t *e;
}
/* Acknowledge to INET. */
if ((r = send(e->client, &msg) != OK)) {
panic("send() failed: %d", r);
if ((r = ipc_send(e->client, &msg) != OK)) {
panic("ipc_send() failed: %d", r);
}
}

View file

@ -677,9 +677,9 @@ ether_card_t *ec;
reply.DL_FLAGS = flags;
reply.DL_COUNT = ec->read_s;
r = send(ec->client, &reply);
r = ipc_send(ec->client, &reply);
if (r < 0)
panic("send failed: %d", r);
panic("ipc_send failed: %d", r);
ec->read_s = 0;
ec->flags &= ~(ECF_PACK_SEND | ECF_PACK_RECV);
@ -693,7 +693,7 @@ static void mess_reply(req, reply_mess)
message *req;
message *reply_mess;
{
if (send(req->m_source, reply_mess) != OK)
if (ipc_send(req->m_source, reply_mess) != OK)
panic("unable to mess_reply");
}
@ -1316,7 +1316,7 @@ message *mp;
panic("do_getstat_s: sys_safecopyto failed: %d", r);
mp->m_type= DL_STAT_REPLY;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != OK)
panic("do_getstat_s: send failed: %d", r);
}

View file

@ -400,7 +400,7 @@ static void or_dump (message *m)
m->m_type = TTY_FKEY_CONTROL;
m->FKEY_REQUEST = FKEY_EVENTS;
if(OK!=(sendrec(TTY_PROC_NR,m)) )
if(OK!=(ipc_sendrec(TTY_PROC_NR,m)) )
printf("Contacting the TTY failed\n");
if(bit_isset(m->FKEY_SFKEYS, 11)) {
@ -1131,7 +1131,7 @@ static void or_watchdog_f(minix_timer_t *tp)
*****************************************************************************/
static void mess_reply (message * req, message * reply_mess)
{
if (send (req->m_source, reply_mess) != 0)
if (ipc_send(req->m_source, reply_mess) != 0)
panic("orinoco: unable to mess_reply");
}
@ -1346,7 +1346,7 @@ static void reply (t_or * orp) {
reply.DL_FLAGS = flags;
reply.DL_COUNT = orp->or_read_s;
r = send (orp->or_client, &reply);
r = ipc_send(orp->or_client, &reply);
if (r < 0)
panic("orinoco: send failed: %d", r);
@ -1786,7 +1786,7 @@ static void or_getstat_s (message * mp) {
mp->m_type = DL_STAT_REPLY;
r = send(mp->m_source, mp);
r = ipc_send(mp->m_source, mp);
if(r != OK)
panic("orinoco: getstat_s failed: %d", r);
}

View file

@ -115,7 +115,7 @@ message *mp;
#endif
mp->m_type= 0;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
printf("PCI: do_init: unable to send to %d: %d\n",
mp->m_source, r);
@ -141,7 +141,7 @@ static void do_first_dev(message *mp)
mp->m1_i3= did;
}
mp->m_type= r;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("PCI: do_first_dev: unable to send to %d: %d\n",
@ -166,7 +166,7 @@ static void do_next_dev(message *mp)
mp->m1_i3= did;
}
mp->m_type= r;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("PCI: do_next_dev: unable to send to %d: %d\n",
@ -188,7 +188,7 @@ message *mp;
if (r == 1)
mp->m1_i1= devind;
mp->m_type= r;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("PCI: do_find_dev: unable to send to %d: %d\n",
@ -214,7 +214,7 @@ message *mp;
mp->m1_i1= vid;
mp->m1_i2= did;
mp->m_type= r;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("PCI: do_ids: unable to send to %d: %d\n",
@ -251,7 +251,7 @@ message *mp;
}
mp->m_type= r;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("PCI: do_dev_name: unable to send to %d: %d\n",
@ -287,7 +287,7 @@ message *mp;
}
mp->m_type= r;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("PCI: do_slot_name: unable to send to %d: %d\n",
@ -388,7 +388,7 @@ static void do_reserve(message *mp)
aclp= find_acl(mp->m_source);
mp->m_type= pci_reserve_a(devind, mp->m_source, aclp);
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("do_reserve: unable to send to %d: %d\n",
@ -414,7 +414,7 @@ message *mp;
}
mp->m2_l1= v;
mp->m_type= r;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("do_attr_r8: unable to send to %d: %d\n",
@ -434,7 +434,7 @@ message *mp;
v= pci_attr_r16(devind, port);
mp->m2_l1= v;
mp->m_type= OK;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("do_attr_r16: unable to send to %d: %d\n",
@ -460,7 +460,7 @@ message *mp;
}
mp->m2_l1= v;
mp->m_type= OK;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("do_attr_r32: unable to send to %d: %d\n",
@ -480,7 +480,7 @@ message *mp;
pci_attr_w8(devind, port, v);
mp->m_type= OK;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("do_attr_w8: unable to send to %d: %d\n",
@ -500,7 +500,7 @@ message *mp;
pci_attr_w16(devind, port, v);
mp->m_type= OK;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("do_attr_w16: unable to send to %d: %d\n",
@ -520,7 +520,7 @@ message *mp;
pci_attr_w32(devind, port, v);
mp->m_type= OK;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("do_attr_w32: unable to send to %d: %d\n",
@ -546,7 +546,7 @@ message *mp;
mp->BUSC_PGB_IOFLAG= ioflag;
}
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("do_get_bar: unable to send to %d: %d\n",
@ -563,7 +563,7 @@ message *mp;
pci_rescan_bus(busnr);
mp->m_type= OK;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != 0)
{
printf("do_rescan_bus: unable to send to %d: %d\n",
@ -580,7 +580,7 @@ int result;
message m;
m.m_type= result;
r= send(mp->m_source, &m);
r= ipc_send(mp->m_source, &m);
if (r != 0)
printf("reply: unable to send to %d: %d\n", mp->m_source, r);
}

View file

@ -960,7 +960,7 @@ static int acpi_get_irq(unsigned bus, unsigned dev, unsigned pin)
((struct acpi_get_irq_req *)&m)->dev = dev;
((struct acpi_get_irq_req *)&m)->pin = pin;
if ((err = sendrec(acpi_ep, &m)) != OK)
if ((err = ipc_sendrec(acpi_ep, &m)) != OK)
panic("PCI: error %d while receiveing from ACPI\n", err);
return ((struct acpi_get_irq_resp *)&m)->irq;
@ -1831,7 +1831,7 @@ static void acpi_map_bridge(unsigned pbnr, unsigned dev, unsigned sbnr)
((struct acpi_map_bridge_req *)&m)->secondary_bus = sbnr;
((struct acpi_map_bridge_req *)&m)->device = dev;
if ((err = sendrec(acpi_ep, &m)) != OK)
if ((err = ipc_sendrec(acpi_ep, &m)) != OK)
panic("PCI: error %d while receiveing from ACPI\n", err);
if (((struct acpi_map_bridge_resp *)&m)->err != OK)

View file

@ -120,9 +120,9 @@ main(int argc, char **argv)
log_debug(&log, "Sending Reply");
r = sendnb(caller, &m);
r = ipc_sendnb(caller, &m);
if (r != OK) {
log_warn(&log, "sendnb() failed\n");
log_warn(&log, "ipc_sendnb() failed\n");
continue;
}
}

View file

@ -1536,9 +1536,9 @@ message *mp;
panic("rl_getstat_s: sys_safecopyto failed: %d", r);
mp->m_type= DL_STAT_REPLY;
r= send(mp->m_source, mp);
r= ipc_send(mp->m_source, mp);
if (r != OK)
panic("rl_getstat_s: send failed: %d", r);
panic("rl_getstat_s: ipc_send failed: %d", r);
}
/*===========================================================================*
@ -1561,12 +1561,12 @@ re_t *rep;
reply.DL_FLAGS = flags;
reply.DL_COUNT = rep->re_read_s;
r= send(rep->re_client, &reply);
r= ipc_send(rep->re_client, &reply);
if (r < 0) {
printf("RTL8139 tried sending to %d, type %d\n",
rep->re_client, reply.m_type);
panic("send failed: %d", r);
panic("ipc_send failed: %d", r);
}
rep->re_read_s = 0;
@ -1580,7 +1580,7 @@ static void mess_reply(req, reply_mess)
message *req;
message *reply_mess;
{
if (send(req->m_source, reply_mess) != OK)
if (ipc_send(req->m_source, reply_mess) != OK)
panic("unable to mess_reply");
}
@ -2262,10 +2262,10 @@ int pci_func;
m.m2_l1= buf;
m.m2_l2= size;
r= sendrec(dev_e, &m);
r= ipc_sendrec(dev_e, &m);
if (r != OK)
{
printf("rtl8139`tell_dev: sendrec to %d failed: %d\n",
printf("rtl8139`tell_dev: ipc_sendrec to %d failed: %d\n",
dev_e, r);
return;
}

View file

@ -1535,9 +1535,9 @@ message *mp;
panic("rl_getstat_s: sys_safecopyto failed: %d", r);
mp->m_type = DL_STAT_REPLY;
r = send(mp->m_source, mp);
r = ipc_send(mp->m_source, mp);
if (r != OK)
panic("rl_getstat_s: send failed: %d", r);
panic("rl_getstat_s: ipc_send failed: %d", r);
}
/*===========================================================================*
@ -1560,12 +1560,12 @@ re_t *rep;
reply.DL_FLAGS = flags;
reply.DL_COUNT = rep->re_read_s;
r = send(rep->re_client, &reply);
r = ipc_send(rep->re_client, &reply);
if (r < 0) {
printf("RTL8169 tried sending to %d, type %d\n",
rep->re_client, reply.m_type);
panic("send failed: %d", r);
panic("ipc_send failed: %d", r);
}
rep->re_read_s = 0;
@ -1579,7 +1579,7 @@ static void mess_reply(req, reply_mess)
message *req;
message *reply_mess;
{
if (send(req->m_source, reply_mess) != OK)
if (ipc_send(req->m_source, reply_mess) != OK)
panic("unable to mess_reply");
}

View file

@ -347,9 +347,9 @@ main(int argc, char *argv[])
log_debug(&log, "Sending Reply");
r = sendnb(caller, &m);
r = ipc_sendnb(caller, &m);
if (r != OK) {
log_warn(&log, "sendnb() failed\n");
log_warn(&log, "ipc_sendnb() failed\n");
continue;
}
}

View file

@ -521,7 +521,7 @@ message *m_ptr; /* pointer to the request message */
/* Almost done, return result to caller. */
m_ptr->m_type = result;
if ((s = sendnb(m_ptr->m_source, m_ptr)) != OK)
if ((s = ipc_sendnb(m_ptr->m_source, m_ptr)) != OK)
printf("TTY: unable to reply to %d: %d", m_ptr->m_source, s);
}
@ -565,7 +565,7 @@ int scode; /* scan code for a function key */
/* See if an observer is registered and send it a message. */
if (proc_nr != NONE) {
notify(proc_nr);
ipc_notify(proc_nr);
}
return(TRUE);
}

View file

@ -172,7 +172,7 @@ struct uds_fd {
/* select() */
/* when a select is in progress, we notify() this endpoint
/* when a select is in progress, we notify this endpoint
* of new data.
*/
endpoint_t sel_endpt;

View file

@ -83,7 +83,7 @@ static void send_reply(endpoint_t endpt, int ipc_status, int result, int code,
m.VBOX_ID = id;
if (IPC_STATUS_CALL(ipc_status) == SENDREC)
r = sendnb(endpt, &m);
r = ipc_sendnb(endpt, &m);
else
r = asynsend3(endpt, &m, AMF_NOREPLY);

View file

@ -312,8 +312,8 @@ virtio_net_check_pending(void)
/* Only reply if a pending request was handled */
if (reply.DL_FLAGS != DL_NOFLAGS)
if ((r = send(dst, &reply)) != OK)
panic("%s: send to %d failed (%d)", name, dst, r);
if ((r = ipc_send(dst, &reply)) != OK)
panic("%s: ipc_send to %d failed (%d)", name, dst, r);
}
static void
@ -486,8 +486,8 @@ virtio_net_write(message *m)
tx_pending = 1;
}
if ((r = send(m->m_source, &reply)) != OK)
panic("%s: send to %d failed (%d)", name, m->m_source, r);
if ((r = ipc_send(m->m_source, &reply)) != OK)
panic("%s: ipc_send to %d failed (%d)", name, m->m_source, r);
}
static void
@ -509,8 +509,8 @@ virtio_net_read(message *m)
pending_rx_msg = *m;
}
if ((r = send(m->m_source, &reply)) != OK)
panic("%s: send to %d failed (%d)", name, m->m_source, r);
if ((r = ipc_send(m->m_source, &reply)) != OK)
panic("%s: ipc_send to %d failed (%d)", name, m->m_source, r);
}
static void
@ -538,8 +538,8 @@ virtio_net_conf(message *m)
reply.DL_STAT = OK;
reply.DL_COUNT = 0;
if ((r = send(m->m_source, &reply)) != OK)
panic("%s: send to %d failed (%d)", name, m->m_source, r);
if ((r = ipc_send(m->m_source, &reply)) != OK)
panic("%s: ipc_send to %d failed (%d)", name, m->m_source, r);
}
static void
@ -560,8 +560,8 @@ virtio_net_getstat(message *m)
if (r != OK)
panic("%s: copy to %d failed (%d)", name, m->m_source, r);
if ((r = send(m->m_source, &reply)) != OK)
panic("%s: send to %d failed (%d)", name, m->m_source, r);
if ((r = ipc_send(m->m_source, &reply)) != OK)
panic("%s: ipc_send to %d failed (%d)", name, m->m_source, r);
}
static void

View file

@ -1,8 +1,8 @@
#ifndef _ARM_IPCCONST_H_
#define _ARM_IPCCONST_H_
#define KERVEC 32 /* syscall trap to kernel */
#define IPCVEC 33 /* ipc trap to kernel */
#define KERVEC_INTR 32 /* syscall trap to kernel */
#define IPCVEC_INTR 33 /* ipc trap to kernel */
#define IPC_STATUS_REG r1

View file

@ -1,8 +1,11 @@
#ifndef _I386_IPCCONST_H_
#define _I386_IPCCONST_H_
#define KERVEC 32 /* syscall trap to kernel */
#define IPCVEC 33 /* ipc trap to kernel */
#define KERVEC_INTR 32 /* syscall trap to kernel */
#define IPCVEC_INTR 33 /* ipc trap to kernel */
#define KERVEC_UM 34 /* syscall trap to kernel, user-mapped code */
#define IPCVEC_UM 35 /* ipc trap to kernel, user-mapped code */
#define IPC_STATUS_REG bx

View file

@ -192,24 +192,27 @@ typedef struct asynmsg
#define AMF_NOTIFY_ERR 020 /* Send a notification when AMF_DONE is set and
* delivery of the message failed */
int _send_orig(endpoint_t dest, message *m_ptr);
int _receive_orig(endpoint_t src, message *m_ptr, int *status_ptr);
int _sendrec_orig(endpoint_t src_dest, message *m_ptr);
int _sendnb_orig(endpoint_t dest, message *m_ptr);
int _notify_orig(endpoint_t dest);
int _senda_orig(asynmsg_t *table, size_t count);
int _do_kernel_call_orig(message *m_ptr);
int _ipc_send_intr(endpoint_t dest, message *m_ptr);
int _ipc_receive_intr(endpoint_t src, message *m_ptr, int *status_ptr);
int _ipc_sendrec_intr(endpoint_t src_dest, message *m_ptr);
int _ipc_sendnb_intr(endpoint_t dest, message *m_ptr);
int _ipc_notify_intr(endpoint_t dest);
int _ipc_senda_intr(asynmsg_t *table, size_t count);
int _minix_kernel_info_struct(struct minix_kerninfo **);
int _do_kernel_call_intr(message *m_ptr);
int get_minix_kerninfo(struct minix_kerninfo **);
/* Hide names to avoid name space pollution. */
#define notify _notify
#define sendrec _sendrec
#define receive _receive
#define receivenb _receivenb
#define send _send
#define sendnb _sendnb
#define senda _senda
#define ipc_notify _ipc_notify
#define ipc_sendrec _ipc_sendrec
#define ipc_receive _ipc_receive
#define ipc_receivenb _ipc_receivenb
#define ipc_send _ipc_send
#define ipc_sendnb _ipc_sendnb
#define ipc_senda _ipc_senda
#define do_kernel_call _do_kernel_call
struct minix_ipcvecs {
int (*send)(endpoint_t dest, message *m_ptr);
@ -224,37 +227,37 @@ struct minix_ipcvecs {
/* kernel-set IPC vectors retrieved by a constructor in libc/sys-minix/init.c */
extern struct minix_ipcvecs _minix_ipcvecs;
static inline int _send(endpoint_t dest, message *m_ptr)
static inline int _ipc_send(endpoint_t dest, message *m_ptr)
{
return _minix_ipcvecs.send(dest, m_ptr);
}
static inline int _receive(endpoint_t src, message *m_ptr, int *st)
static inline int _ipc_receive(endpoint_t src, message *m_ptr, int *st)
{
return _minix_ipcvecs.receive(src, m_ptr, st);
}
static inline int _sendrec(endpoint_t src_dest, message *m_ptr)
static inline int _ipc_sendrec(endpoint_t src_dest, message *m_ptr)
{
return _minix_ipcvecs.sendrec(src_dest, m_ptr);
}
static inline int _sendnb(endpoint_t dest, message *m_ptr)
static inline int _ipc_sendnb(endpoint_t dest, message *m_ptr)
{
return _minix_ipcvecs.sendnb(dest, m_ptr);
}
static inline int _notify(endpoint_t dest)
static inline int _ipc_notify(endpoint_t dest)
{
return _minix_ipcvecs.notify(dest);
}
static inline int do_kernel_call(message *m_ptr)
static inline int _do_kernel_call(message *m_ptr)
{
return _minix_ipcvecs.do_kernel_call(m_ptr);
}
static inline int _senda(asynmsg_t *table, size_t count)
static inline int _ipc_senda(asynmsg_t *table, size_t count)
{
return _minix_ipcvecs.senda(table, count);
}

View file

@ -177,9 +177,9 @@ ENTRY(svc_entry)
/* save the pointer to the current process */
ldr fp, [sp]
cmp r3, #KERVEC
cmp r3, #KERVEC_INTR
beq kernel_call_entry
cmp r3, #IPCVEC
cmp r3, #IPCVEC_INTR
beq ipc_entry
/* return -1 to the current process as an invalid SWI was called .*/

View file

@ -29,6 +29,7 @@
#include "kernel/kernel.h"
#include <minix/config.h>
#include <minix/const.h>
#include <minix/ipcconst.h>
#include <minix/com.h>
#include <machine/asm.h>
#include <machine/interrupt.h>

View file

@ -178,7 +178,7 @@ struct proc {
/* Macro to return: on which process is a certain process blocked?
* return endpoint number (can be ANY) or NONE. It's important to
* check RTS_SENDING first, and then RTS_RECEIVING, as they could
* both be on (if a sendrec() blocks on sending), and p_getfrom_e
* both be on (if a ipc_sendrec() blocks on sending), and p_getfrom_e
* could be nonsense even though RTS_RECEIVING is on.
*/
#define P_BLOCKEDON(p) \

View file

@ -859,10 +859,10 @@ int pci_func;
m.m2_l1= buf;
m.m2_l2= size;
r= sendrec(dev_e, &m);
r= ipc_sendrec(dev_e, &m);
if (r != OK)
{
printf("tell_dev: sendrec to %d failed: %d\n", dev_e, r);
printf("tell_dev: ipc_sendrec to %d failed: %d\n", dev_e, r);
return;
}
if (m.m_type != OK)

View file

@ -158,7 +158,7 @@ int bdev_sendrec(dev_t dev, const message *m_orig)
m = *m_orig;
m.BDEV_ID = NO_ID;
r = sendrec(endpt, &m);
r = ipc_sendrec(endpt, &m);
/* If communication failed, the driver has died. We assume it will be
* restarted soon after, so we attempt recovery. Upon success, we let the

View file

@ -46,7 +46,7 @@ int bdev_minor_reopen(dev_t dev)
m.BDEV_ACCESS = open_dev[i].access;
m.BDEV_ID = NO_ID;
if ((r = sendrec(endpt, &m)) != OK) {
if ((r = ipc_sendrec(endpt, &m)) != OK) {
printf("bdev: IPC to driver (%d) failed (%d)\n",
endpt, r);
return r;

View file

@ -100,7 +100,7 @@ void blockdriver_announce(int type)
char label[DS_MAX_KEYLEN];
char *driver_prefix = "drv.blk.";
/* Callers are allowed to use sendrec to communicate with drivers.
/* Callers are allowed to use ipc_sendrec to communicate with drivers.
* For this reason, there may blocked callers when a driver restarts.
* Ask the kernel to unblock them (if any). Note that most block drivers
* will not restart statefully, and thus will skip this code.
@ -139,7 +139,7 @@ static void send_reply(endpoint_t endpt, message *m_ptr, int ipc_status)
* the SENDREC's receive part, after which our next SENDNB call would fail.
*/
if (IPC_STATUS_CALL(ipc_status) == SENDREC)
r = sendnb(endpt, m_ptr);
r = ipc_sendnb(endpt, m_ptr);
else
r = asynsend3(endpt, m_ptr, AMF_NOREPLY);

View file

@ -11,9 +11,10 @@ ucontext.o: ucontextoffsets.h
SRCS+= \
__sigreturn.S \
_do_kernel_call_intr.S \
_ipc.S \
_senda.S \
brksize.S \
get_minix_kerninfo.S \
ucontext.S
ucontextoffsets.h: ${CF}

View file

@ -0,0 +1,8 @@
#include <minix/ipcconst.h>
#include <machine/asm.h>
ENTRY(_do_kernel_call_intr)
/* r0 already holds msg ptr */
mov r3, #KERVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
bx lr

View file

@ -4,80 +4,71 @@
/**========================================================================* */
/* IPC assembly routines * */
/**========================================================================* */
ENTRY(_send_orig)
ENTRY(_ipc_send_intr)
push {fp}
mov fp, sp
mov r2, r1 /* r2 = msg ptr */
mov r1, r0 /* r1 = src_dest */
mov r0, #SEND /* _send(dest, ptr) */
mov r3, #IPCVEC /* r3 determines the SVC type */
mov r0, #SEND /* _ipc_send(dest, ptr) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_receive_orig)
ENTRY(_ipc_receive_intr)
push {fp}
mov fp, sp
push {r2} /* save status ptr */
mov r2, r1 /* r2 = msg ptr */
mov r1, r0 /* r1 = src_dest */
mov r0, #RECEIVE /* _receive(src, ptr) */
mov r3, #IPCVEC /* r3 determines the SVC type */
mov r0, #RECEIVE /* _ipc_receive(src, ptr) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {r2} /* restore status ptr */
str r1, [r2]
pop {fp}
bx lr
ENTRY(_sendrec_orig)
ENTRY(_ipc_sendrec_intr)
push {fp}
mov fp, sp
mov r2, r1 /* r2 = msg ptr */
mov r1, r0 /* r1 = src_dest */
mov r0, #SENDREC /* _sendrec(srcdest, ptr) */
mov r3, #IPCVEC /* r3 determines the SVC type */
mov r0, #SENDREC /* _ipc_sendrec(srcdest, ptr) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_minix_kernel_info_struct)
push {fp}
mov fp, sp
push {r0}
mov r1, #0
mov r2, #0
mov r0, #MINIX_KERNINFO /* kerninfo() */
mov r3, #IPCVEC /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {r2} /* r2 = return struct ptr (was r0) */
str r1, [r2]
pop {fp}
bx lr
ENTRY(_notify_orig)
ENTRY(_ipc_notify_intr)
push {fp}
mov fp, sp
mov r1, r0 /* r1 = src_dest */
mov r0, #NOTIFY /* _notify(srcdst) */
mov r3, #IPCVEC /* r3 determines the SVC type */
mov r0, #NOTIFY /* _ipc_notify(srcdst) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_sendnb_orig)
ENTRY(_ipc_sendnb_intr)
push {fp}
mov fp, sp
mov r2, r1 /* r2 = msg ptr */
mov r1, r0 /* r1 = src_dest */
mov r0, #SENDNB /* _sendnb(dest, ptr) */
mov r3, #IPCVEC /* r3 determines the SVC type */
mov r0, #SENDNB /* _ipc_sendnb(dest, ptr) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr
ENTRY(_do_kernel_call_orig)
/* r0 already holds msg ptr */
mov r3, #KERVEC /* r3 determines the SVC type */
svc #0 /* trap to kernel */
ENTRY(_ipc_senda_intr)
push {fp}
mov fp, sp
mov r2, r0 /* r2 = table */
/* r1 already holds count */
mov r0, #SENDA /* _ipc_senda(table, count) */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr

View file

@ -1,13 +0,0 @@
#include <minix/ipcconst.h>
#include <machine/asm.h>
ENTRY(_senda_orig)
push {fp}
mov fp, sp
mov r2, r0 /* r2 = table */
/* r1 already holds count */
mov r0, #SENDA /* _senda(table, count) */
mov r3, #IPCVEC /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {fp}
bx lr

View file

@ -0,0 +1,17 @@
#include <minix/ipcconst.h>
#include <machine/asm.h>
ENTRY(get_minix_kerninfo)
push {fp}
mov fp, sp
push {r0}
mov r1, #0
mov r2, #0
mov r0, #MINIX_KERNINFO /* _get_minix_kerninfo() */
mov r3, #IPCVEC_INTR /* r3 determines the SVC type */
svc #0 /* trap to kernel */
pop {r2} /* r2 = return struct ptr (was r0) */
str r1, [r2]
pop {fp}
bx lr

View file

@ -11,9 +11,10 @@ ucontext.o: ucontextoffsets.h
SRCS+= \
__sigreturn.S \
_do_kernel_call_intr.S \
_ipc.S \
_senda.S \
brksize.S \
get_minix_kerninfo.S \
ucontext.S
ucontextoffsets.h: ${CF}

View file

@ -0,0 +1,8 @@
#include <minix/ipcconst.h>
#include <machine/asm.h>
ENTRY(_do_kernel_call_intr)
/* pass the message pointer to kernel in the %eax register */
movl 4(%esp), %eax
int $KERVEC_INTR
ret

View file

@ -5,87 +5,84 @@
MESSAGE = 12 /* message pointer */
STATUS = 16 /* status pointer */
/* For _ipc_senda() */
MSGTAB = 8 /* message table */
TABCOUNT = 12 /* number of entries in message table */
/**========================================================================* */
/* IPC assembly routines * */
/**========================================================================* */
/* all message passing routines save ebx, but destroy eax and ecx. */
ENTRY(_send_orig)
ENTRY(_ipc_send_intr)
push %ebp
movl %esp, %ebp
push %ebx
movl SRC_DST(%ebp), %eax /* eax = dest-src */
movl MESSAGE(%ebp), %ebx /* ebx = message pointer */
movl $SEND, %ecx /* _send(dest, ptr) */
int $IPCVEC_ORIG /* trap to the kernel */
movl $SEND, %ecx /* _ipc_send(dest, ptr) */
int $IPCVEC_INTR /* trap to the kernel */
pop %ebx
pop %ebp
ret
ENTRY(_receive_orig)
ENTRY(_ipc_receive_intr)
push %ebp
movl %esp, %ebp
push %ebx
movl SRC_DST(%ebp), %eax /* eax = dest-src */
movl MESSAGE(%ebp), %ebx /* ebx = message pointer */
movl $RECEIVE, %ecx /* _receive(src, ptr) */
int $IPCVEC_ORIG /* trap to the kernel */
movl $RECEIVE, %ecx /* _ipc_receive(src, ptr) */
int $IPCVEC_INTR /* trap to the kernel */
movl STATUS(%ebp), %ecx /* ecx = status pointer */
movl %ebx, (%ecx)
pop %ebx
pop %ebp
ret
ENTRY(_sendrec_orig)
ENTRY(_ipc_sendrec_intr)
push %ebp
movl %esp, %ebp
push %ebx
movl SRC_DST(%ebp), %eax /* eax = dest-src */
movl MESSAGE(%ebp), %ebx /* ebx = message pointer */
movl $SENDREC, %ecx /* _sendrec(srcdest, ptr) */
int $IPCVEC_ORIG /* trap to the kernel */
movl $SENDREC, %ecx /* _ipc_sendrec(srcdest, ptr) */
int $IPCVEC_INTR /* trap to the kernel */
pop %ebx
pop %ebp
ret
ENTRY(_minix_kernel_info_struct)
push %ebp
movl %esp, %ebp
push %ebx
movl $0, %eax
movl $0, %ebx
movl $MINIX_KERNINFO, %ecx
int $IPCVEC_ORIG /* trap to the kernel */
movl 8(%ebp), %ecx /* ecx = return struct ptr */
movl %ebx, (%ecx)
pop %ebx
pop %ebp
ret
ENTRY(_notify_orig)
ENTRY(_ipc_notify_intr)
push %ebp
movl %esp, %ebp
push %ebx
movl SRC_DST(%ebp), %eax /* eax = destination */
movl $NOTIFY, %ecx /* _notify(srcdst) */
int $IPCVEC_ORIG /* trap to the kernel */
movl $NOTIFY, %ecx /* _ipc_notify(srcdst) */
int $IPCVEC_INTR /* trap to the kernel */
pop %ebx
pop %ebp
ret
ENTRY(_sendnb_orig)
ENTRY(_ipc_sendnb_intr)
push %ebp
movl %esp, %ebp
push %ebx
movl SRC_DST(%ebp), %eax /* eax = dest-src */
movl MESSAGE(%ebp), %ebx /* ebx = message pointer */
movl $SENDNB, %ecx /* _sendnb(dest, ptr) */
int $IPCVEC_ORIG /* trap to the kernel */
movl $SENDNB, %ecx /* _ipc_sendnb(dest, ptr) */
int $IPCVEC_INTR /* trap to the kernel */
pop %ebx
pop %ebp
ret
ENTRY(_do_kernel_call_orig)
/* pass the message pointer to kernel in the %eax register */
movl 4(%esp), %eax
int $KERVEC_ORIG
ENTRY(_ipc_senda_intr)
push %ebp
movl %esp, %ebp
push %ebx
movl TABCOUNT(%ebp), %eax /* eax = count */
movl MSGTAB(%ebp), %ebx /* ebx = table */
movl $SENDA, %ecx /* _ipc_senda(table, count) */
int $IPCVEC_INTR /* trap to the kernel */
pop %ebx
pop %ebp
ret

View file

@ -1,17 +0,0 @@
#include <minix/ipcconst.h>
#include <machine/asm.h>
MSGTAB = 8 /* message table */
TABCOUNT = 12 /* number of entries in message table */
ENTRY(_senda_orig)
push %ebp
movl %esp, %ebp
push %ebx
movl TABCOUNT(%ebp), %eax /* eax = count */
movl MSGTAB(%ebp), %ebx /* ebx = table */
movl $SENDA, %ecx /* _senda(table, count) */
int $IPCVEC /* trap to the kernel */
pop %ebx
pop %ebp
ret

View file

@ -0,0 +1,17 @@
#include <minix/ipcconst.h>
#include <machine/asm.h>
ENTRY(get_minix_kerninfo)
push %ebp
movl %esp, %ebp
push %ebx
movl $0, %eax
movl $0, %ebx
movl $MINIX_KERNINFO, %ecx
int $IPCVEC_INTR /* trap to the kernel */
movl 8(%ebp), %ecx /* ecx = return struct ptr */
movl %ebx, (%ecx)
pop %ebx
pop %ebp
ret

View file

@ -545,13 +545,7 @@
#define seed48 _seed48
#define seekdir _seekdir
#define select _select
#ifdef __minix
/* '_send' unfortunately collides with Minix IPC's _send function.
* This solution is fragile, a proper renaming of Minix IPCs should
* be done insted. */
#else /* !__minix */
#define send _send
#endif /* !__minix */
#define setdomainname _setdomainname
#define setenv _setenv
#define setfsent _setfsent

View file

@ -44,15 +44,9 @@ __RCSID("$NetBSD: send.c,v 1.10 2012/03/20 17:44:18 matt Exp $");
#include <stddef.h>
#ifdef __minix
/* UGLY: name clash with minix ipc.
* Better solution: redefine minix ipc.
*/
#else /* !__minix */
#ifdef __weak_alias
__weak_alias(send, _send)
#endif
#endif /* !__minix */
ssize_t
send(int s, const void *msg, size_t len, int flags)

View file

@ -8,23 +8,26 @@ struct minix_kerninfo *_minix_kerninfo = NULL;
void __minix_init(void) __attribute__((__constructor__, __used__));
struct minix_ipcvecs _minix_ipcvecs = {
.sendrec = _sendrec_orig,
.send = _send_orig,
.notify = _notify_orig,
.senda = _senda_orig,
.sendnb = _sendnb_orig,
.receive = _receive_orig,
.do_kernel_call = _do_kernel_call_orig,
.sendrec = _ipc_sendrec_intr,
.send = _ipc_send_intr,
.notify = _ipc_notify_intr,
.senda = _ipc_senda_intr,
.sendnb = _ipc_sendnb_intr,
.receive = _ipc_receive_intr,
.do_kernel_call = _do_kernel_call_intr,
};
void __minix_init(void)
{
if((_minix_kernel_info_struct(&_minix_kerninfo)) != 0
|| _minix_kerninfo->kerninfo_magic != KERNINFO_MAGIC) {
if((get_minix_kerninfo(&_minix_kerninfo) != 0) ||
(_minix_kerninfo->kerninfo_magic != KERNINFO_MAGIC))
{
_minix_kerninfo = NULL;
} else if((_minix_kerninfo->ki_flags & MINIX_KIF_IPCVECS) &&
_minix_kerninfo->minix_ipcvecs) {
}
else if((_minix_kerninfo->ki_flags & MINIX_KIF_IPCVECS) &&
(_minix_kerninfo->minix_ipcvecs != NULL))
{
_minix_ipcvecs = *_minix_kerninfo->minix_ipcvecs;
}
}
}

View file

@ -16,7 +16,7 @@ register struct sigcontext *scp;
sigset_t set;
/* The message can't be on the stack, because the stack will vanish out
* from under us. The send part of sendrec will succeed, but when
* from under us. The send part of ipc_sendrec will succeed, but when
* a message is sent to restart the current process, who knows what will
* be in the place formerly occupied by the message?
*/

View file

@ -11,9 +11,9 @@ int _syscall(endpoint_t who, int syscallnr, message *msgptr)
int status;
msgptr->m_type = syscallnr;
status = sendrec(who, msgptr);
status = ipc_sendrec(who, msgptr);
if (status != 0) {
/* 'sendrec' itself failed. */
/* 'ipc_sendrec' itself failed. */
/* XXX - strerror doesn't know all the codes */
msgptr->m_type = status;
}

View file

@ -102,7 +102,7 @@ void chardriver_announce(void)
char label[DS_MAX_KEYLEN];
char *driver_prefix = "drv.chr.";
/* Callers are allowed to use sendrec to communicate with drivers.
/* Callers are allowed to use ipc_sendrec to communicate with drivers.
* For this reason, there may blocked callers when a driver restarts.
* Ask the kernel to unblock them (if any).
*/
@ -179,7 +179,7 @@ static void send_reply(endpoint_t endpt, message *m_ptr, int ipc_status)
/* If we would block sending the message, send it asynchronously. */
if (IPC_STATUS_CALL(ipc_status) == SENDREC)
r = sendnb(endpt, m_ptr);
r = ipc_sendnb(endpt, m_ptr);
else
r = asynsend3(endpt, m_ptr, AMF_NOREPLY);

View file

@ -198,11 +198,11 @@ static void register_driver(message *msg)
if ( (drv = find_driver(ep)) != NULL) {
msg->m_type = USB_REPLY;
msg->USB_RESULT = OK;
send(ep,msg);
ipc_send(ep,msg);
} else {
msg->m_type = USB_REPLY;
msg->USB_RESULT = EPERM;
send(ep,msg);
ipc_send(ep,msg);
return;
}
@ -216,7 +216,7 @@ static void register_driver(message *msg)
msg->m_type = USB_ANNOUCE_DEV;
msg->USB_DEV_ID = drv->dev;
msg->USB_INTERFACES = drv->interfaces;
send(ep, msg);
ipc_send(ep, msg);
}
/*****************************************************************************
@ -397,7 +397,7 @@ out:
}
/* send reply */
send(ep, msg);
ipc_send(ep, msg);
}
}
@ -437,7 +437,7 @@ static void cancle_urb(message *msg)
}
}
send(ep, msg);
ipc_send(ep, msg);
}

View file

@ -116,7 +116,7 @@ int devman_add_device(struct devman_dev *dev)
msg.DEVMAN_GRANT_SIZE = grant_size;
/* send message */
res = sendrec(devman_ep, &msg);
res = ipc_sendrec(devman_ep, &msg);
if (res != 0) {
panic("devman_add_device: could not talk to devman: %d", res);
@ -156,7 +156,7 @@ int devman_del_device(struct devman_dev *dev)
msg.m_type = DEVMAN_DEL_DEV;
msg.DEVMAN_DEVICE_ID = dev->dev_id;
res = sendrec(devman_ep, &msg);
res = ipc_sendrec(devman_ep, &msg);
if (res != 0) {
panic("devman_del_device: could not talk to devman: %d", res);
@ -221,14 +221,14 @@ static void do_bind(message *m)
res = dev->bind_cb(dev->data, m->DEVMAN_ENDPOINT);
m->m_type = DEVMAN_REPLY;
m->DEVMAN_RESULT = res;
send(devman_ep, m);
ipc_send(devman_ep, m);
return;
}
}
}
m->m_type = DEVMAN_REPLY;
m->DEVMAN_RESULT = ENODEV;
send(devman_ep, m);
ipc_send(devman_ep, m);
return;
}
@ -247,14 +247,14 @@ static void do_unbind(message *m)
res = dev->unbind_cb(dev->data, m->DEVMAN_ENDPOINT);
m->m_type = DEVMAN_REPLY;
m->DEVMAN_RESULT = res;
send(devman_ep, m);
ipc_send(devman_ep, m);
return;
}
}
}
m->m_type = DEVMAN_REPLY;
m->DEVMAN_RESULT = ENODEV;
send(devman_ep, m);
ipc_send(devman_ep, m);
}
/****************************************************************************

View file

@ -84,7 +84,7 @@ int libexec_pm_newexec(endpoint_t proc_e, struct exec_info *e)
m.m_type = PM_EXEC_NEW;
m.PM_EXEC_NEW_ENDPT = proc_e;
m.PM_EXEC_NEW_PTR = (char *)e;
if ((r = sendrec(PM_PROC_NR, &m)) != OK) return(r);
if ((r = ipc_sendrec(PM_PROC_NR, &m)) != OK) return(r);
e->allow_setuid = !!m.PM_EXEC_NEW_SUID;

View file

@ -17,7 +17,7 @@ i2cdriver_announce(uint32_t bus)
char label[DS_MAX_KEYLEN];
char *driver_prefix = "drv.i2c.";
/* Callers are allowed to use sendrec to communicate with drivers.
/* Callers are allowed to use ipc_sendrec to communicate with drivers.
* For this reason, there may blocked callers when a driver restarts.
* Ask the kernel to unblock them (if any).
*/
@ -161,7 +161,7 @@ i2cdriver_reserve_device(endpoint_t bus_endpoint, i2c_addr_t address)
m.m_type = BUSC_I2C_RESERVE;
m.BUSC_I2C_ADDR = address;
r = sendrec(bus_endpoint, &m);
r = ipc_sendrec(bus_endpoint, &m);
if (r != OK) {
return EIO;
}
@ -184,7 +184,7 @@ i2cdriver_exec(endpoint_t bus_endpoint, minix_i2c_ioctl_exec_t * ioctl_exec)
m.m_type = BUSC_I2C_EXEC;
m.BUSC_I2C_GRANT = grant_nr;
r = sendrec(bus_endpoint, &m);
r = ipc_sendrec(bus_endpoint, &m);
cpf_revoke(grant_nr);
if (r != OK) {
return EIO;

View file

@ -69,7 +69,7 @@ inputdriver_send_event(int mouse, unsigned short page, unsigned short code,
* the input server has crashed, in which case we should stop sending
* more messages to it.
*/
if (send(input_endpt, &m) != OK)
if (ipc_send(input_endpt, &m) != OK)
input_endpt = NONE;
}

View file

@ -149,7 +149,7 @@ CPPFLAGS.${i}+= -I${LIBCDIR}/locale
mmap.c nanosleep.c open.c pread.c pwrite.c read.c reboot.c sbrk.c \
select.c setuid.c sigprocmask.c stack_utils.c stat.c stime.c \
syscall.c _ucontext.c umask.c unlink.c waitpid.c write.c \
brksize.S _ipc.S _senda.S ucontext.S
brksize.S _do_kernel_call_intr.S get_minix_kerninfo.S _ipc.S ucontext.S
.PATH.c: ${LIBCDIR}/sys-minix
.PATH.S: ${ARCHDIR}/sys-minix
SRCS+= ${i}

View file

@ -767,7 +767,7 @@ static void reply(
message *m_out /* report result */
)
{
if (OK != send(who, m_out)) /* send the message */
if (OK != ipc_send(who, m_out)) /* send the message */
lpuffs_debug("libpuffs(%d) was unable to send reply\n", sef_self());
last_request_transid = 0;

View file

@ -99,8 +99,8 @@ int transid;
/* If a transaction ID was set, reset it */
m_out.m_type = TRNS_ADD_ID(m_out.m_type, transid);
}
if ((r = send(m_in.m_source, &m_out)) != OK)
printf("%s: send failed (%d)\n", sffs_name, r);
if ((r = ipc_send(m_in.m_source, &m_out)) != OK)
printf("%s: ipc_send failed (%d)\n", sffs_name, r);
}
/*===========================================================================*

View file

@ -47,7 +47,7 @@ vbox_conn_t vbox_open(char *name)
m.VBOX_COUNT = len;
m.VBOX_ID = 0;
r = sendrec(vbox_endpt, &m);
r = ipc_sendrec(vbox_endpt, &m);
cpf_revoke(grant);
@ -75,7 +75,7 @@ int vbox_close(vbox_conn_t conn)
m.VBOX_CONN = conn;
m.VBOX_ID = 0;
r = sendrec(vbox_endpt, &m);
r = ipc_sendrec(vbox_endpt, &m);
if (r != OK)
return r;
@ -134,7 +134,7 @@ int vbox_call(vbox_conn_t conn, u32_t function, vbox_param_t *param, int count,
m.VBOX_ID = 0;
m.VBOX_FUNCTION = function;
r = sendrec(vbox_endpt, &m);
r = ipc_sendrec(vbox_endpt, &m);
if (GRANT_VALID(grant))
cpf_revoke(grant);

View file

@ -76,8 +76,8 @@ int fl;
/* Can the table handle one more message? */
if (next_slot >= ASYN_NR) {
/* We're full; tell the kernel to stop processing for now */
if ((r = senda(NULL, 0)) != OK)
panic("asynsend: senda failed: %d", r);
if ((r = ipc_senda(NULL, 0)) != OK)
panic("asynsend: ipc_senda failed: %d", r);
/* Move all unprocessed messages to the beginning */
dst_ind = 0;
@ -139,7 +139,7 @@ int fl;
inside = 0;
/* Tell the kernel to rescan the table */
return senda(&msgtable[first_slot], len);
return ipc_senda(&msgtable[first_slot], len);
}
/*===========================================================================*

View file

@ -155,6 +155,6 @@ int do_gcov_flush_impl(message *msg)
assert(msg->m_source == VFS_PROC_NR);
replymsg.m_type = gcov_flush(msg->GCOV_GRANT, msg->GCOV_BUFF_SZ);
return send(msg->m_source, &replymsg);
return ipc_send(msg->m_source, &replymsg);
}

View file

@ -20,7 +20,7 @@ int port;
m.m2_i1= devind;
m.m2_i2= port;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_attr_r16: can't talk to PCI: %d", r);

View file

@ -20,7 +20,7 @@ int port;
m.m2_i1= devind;
m.m2_i2= port;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_attr_r32: can't talk to PCI: %d", r);

View file

@ -20,7 +20,7 @@ int port;
m.m2_i1= devind;
m.m2_i2= port;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_attr_r8: can't talk to PCI: %d", r);

View file

@ -19,7 +19,7 @@ void pci_attr_w16(int devind, int port, u16_t value)
m.m2_i2= port;
m.m2_l1= value;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_attr_w16: can't talk to PCI: %d", r);

View file

@ -19,7 +19,7 @@ void pci_attr_w32(int devind, int port, u32_t value)
m.m2_i2= port;
m.m2_l1= value;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_attr_w32: can't talk to PCI: %d", r);

View file

@ -19,7 +19,7 @@ void pci_attr_w8(int devind, int port, u8_t value)
m.m2_i2= port;
m.m2_l1= value;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_attr_w8: can't talk to PCI: %d", r);

View file

@ -33,7 +33,7 @@ endpoint_t proc_ep;
m.m_type= BUSC_PCI_DEL_ACL;
m.m1_i1= proc_ep;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_del_acl: can't talk to PCI: %d", r);

View file

@ -32,7 +32,7 @@ char *pci_dev_name(u16_t vid, u16_t did)
m.m7_i3= sizeof(name);
m.m7_i4= gid;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
cpf_revoke(gid);
if (r != 0)
panic("pci_dev_name: can't talk to PCI: %d", r);

View file

@ -19,7 +19,7 @@ int pci_find_dev(u8_t bus, u8_t dev, u8_t func, int *devindp)
m.m1_i2= dev;
m.m1_i3= func;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_find_dev: can't talk to PCI: %d", r);

View file

@ -18,7 +18,7 @@ u16_t *didp;
message m;
m.m_type= BUSC_PCI_FIRST_DEV;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_first_dev: can't talk to PCI: %d", r);
if (m.m_type == 1)

View file

@ -23,7 +23,7 @@ int *ioflag;
m.BUSC_PGB_DEVIND= devind;
m.BUSC_PGB_PORT= port;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_get_bar: can't talk to PCI: %d", r);

View file

@ -20,7 +20,7 @@ u16_t *didp;
m.m_type= BUSC_PCI_IDS;
m.m1_i1= devind;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_ids: can't talk to PCI: %d", r);

View file

@ -21,7 +21,7 @@ void pci_init(void)
panic("pci_init: unable to obtain label for 'pci': %d", r);
m.m_type= BUSC_PCI_INIT;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_init: can't talk to PCI: %d", r);
if (m.m_type != 0)

View file

@ -20,7 +20,7 @@ u16_t *didp;
m.m_type= BUSC_PCI_NEXT_DEV;
m.m1_i1= *devindp;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_next_dev: can't talk to PCI: %d", r);

View file

@ -17,7 +17,7 @@ void pci_rescan_bus(u8_t busnr)
m.m_type= BUSC_PCI_RESCAN;
m.m1_i1= busnr;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_rescan_bus: can't talk to PCI: %d", r);

View file

@ -18,7 +18,7 @@ int devind;
m.m_type= BUSC_PCI_RESERVE;
m.m1_i1= devind;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
if (r != 0)
panic("pci_reserve: can't talk to PCI: %d", r);

View file

@ -43,7 +43,7 @@ struct rs_pci *rs_pci;
m.m_type= BUSC_PCI_SET_ACL;
m.m1_i1= gid;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
cpf_revoke(gid);
if (r != 0)
panic("pci_set_acl: can't talk to PCI: %d", r);

View file

@ -32,7 +32,7 @@ int devind;
m.m1_i2= sizeof(name);
m.m1_i3= gid;
r= sendrec(pci_procnr, &m);
r= ipc_sendrec(pci_procnr, &m);
cpf_revoke(gid);
if (r != 0)
panic("pci_slot_name: can't talk to PCI: %d", r);

View file

@ -96,9 +96,9 @@ void sef_startup()
* these messages and block till a proper initialization request arrives.
*/
do {
r = receive(RS_PROC_NR, &m, &status);
r = ipc_receive(RS_PROC_NR, &m, &status);
if(r != OK) {
panic("unable to receive from RS: %d", r);
panic("unable to ipc_receive from RS: %d", r);
}
} while(!IS_SEF_INIT_REQUEST(&m));
@ -137,7 +137,7 @@ int sef_receive_status(endpoint_t src, message *m_ptr, int *status_ptr)
#endif
/* Receive and return in case of error. */
r = receive(src, m_ptr, &status);
r = ipc_receive(src, m_ptr, &status);
if(status_ptr) *status_ptr = status;
if(!sef_self_first_receive_done) sef_self_first_receive_done = TRUE;
if(r != OK) {

View file

@ -210,7 +210,7 @@ int sef_cb_init_response_rs_reply(message *m_ptr)
int r;
/* Inform RS that we completed initialization with the given result. */
r = sendrec(RS_PROC_NR, m_ptr);
r = ipc_sendrec(RS_PROC_NR, m_ptr);
return r;
}

View file

@ -333,7 +333,7 @@ int sef_cb_lu_response_rs_reply(message *m_ptr)
int r;
/* Inform RS that we're ready with the given result. */
r = sendrec(RS_PROC_NR, m_ptr);
r = ipc_sendrec(RS_PROC_NR, m_ptr);
if ( r != OK) {
return r;
}

View file

@ -58,6 +58,6 @@ void sef_cb_ping_reply_null(endpoint_t UNUSED(source))
*===========================================================================*/
void sef_cb_ping_reply_pong(endpoint_t source)
{
notify(source);
ipc_notify(source);
}

View file

@ -4,5 +4,5 @@
#include <lib.h> /* common to all libraries */
#include <minix/com.h> /* need task numbers + message types */
#include <minix/syslib.h> /* need sendrec, _taskcall, etc */
#include <minix/syslib.h> /* need ipc_sendrec, _taskcall, etc */
#include <minix/sysutil.h> /* prototypes in this library */

View file

@ -14,7 +14,7 @@ register message *msgptr;
int status;
msgptr->m_type = syscallnr;
status = sendrec(who, msgptr);
status = ipc_sendrec(who, msgptr);
if (status != 0) return(status);
return(msgptr->m_type);
}

View file

@ -48,7 +48,7 @@ int usb_send_urb(struct usb_urb* urb)
msg.USB_GRANT_SIZE = urb->urb_size-sizeof(void*);
/* send message */
res = sendrec(hcd_ep, &msg);
res = ipc_sendrec(hcd_ep, &msg);
if (res != 0) {
panic("usb_send_urb: could not talk to hcd: %d", res);
@ -95,7 +95,7 @@ int usb_cancle_urb(struct usb_urb* urb)
msg.USB_URB_ID = urb->urb_id;
/* send message */
res = sendrec(hcd_ep, &msg);
res = ipc_sendrec(hcd_ep, &msg);
if (res != 0) {
panic("usb_cancle_urb: could not talk to hcd: %d", res);
@ -134,7 +134,7 @@ int usb_init(char *name)
strncpy(msg.USB_RB_INIT_NAME, name, M3_LONG_STRING);
res = sendrec(hcd_ep, &msg);
res = ipc_sendrec(hcd_ep, &msg);
if (res != 0) {
panic("usb_init: can't talk to USB: %d", res);

View file

@ -134,7 +134,7 @@ static void send_reply(int err, int transid)
fs_m_out.m_type = TRNS_ADD_ID(fs_m_out.m_type, transid);
}
if ((r = send(fs_m_in.m_source, &fs_m_out)) != OK)
if ((r = ipc_send(fs_m_in.m_source, &fs_m_out)) != OK)
panic("unable to send reply: %d", r);
}

View file

@ -29,7 +29,7 @@ int do_bind_device(message *m)
dev->owner, m->DEVMAN_DEVICE_ID);
#endif
res = sendrec(dev->owner, m);
res = ipc_sendrec(dev->owner, m);
if (res != OK) {
printf("[W] devman.do_bind_device(): could not send "
"message to device owner (%d)\n", res);
@ -45,7 +45,7 @@ int do_bind_device(message *m)
m->DEVMAN_RESULT = ENODEV;
}
m->m_type = DEVMAN_REPLY;
send(RS_PROC_NR, m);
ipc_send(RS_PROC_NR, m);
}
return 0;
}
@ -77,7 +77,7 @@ int do_unbind_device(message *m)
printf("devman: unbind call to %d for dev %d\n",
dev->owner, m->DEVMAN_DEVICE_ID);
#endif
res = sendrec(dev->owner, m);
res = ipc_sendrec(dev->owner, m);
if (res != OK) {
printf("[W] devman.do_unbind_device(): could not send "
"message to device owner (%d)\n", res);
@ -99,7 +99,7 @@ int do_unbind_device(message *m)
m->DEVMAN_RESULT = ENODEV;
}
m->m_type = DEVMAN_REPLY;
send(RS_PROC_NR, m);
ipc_send(RS_PROC_NR, m);
}
return 0;
}

View file

@ -221,7 +221,7 @@ static void do_reply(message *msg, int res)
{
msg->m_type = DEVMAN_REPLY;
msg->DEVMAN_RESULT = res;
send(msg->m_source, msg);
ipc_send(msg->m_source, msg);
}
/*===========================================================================*

View file

@ -124,7 +124,7 @@ static void reply(
message *m_ptr /* message buffer */
)
{
int s = send(who_e, m_ptr); /* send the message */
int s = ipc_send(who_e, m_ptr); /* send the message */
if (OK != s)
printf("DS: unable to send reply to %d: %d\n", who_e, s);
}

View file

@ -205,7 +205,7 @@ static void update_subscribers(struct data_store *dsp, int set)
} else {
UNSET_BIT(ds_subs[i].old_subs, nr);
}
notify(ep);
ipc_notify(ep);
}
}
@ -502,7 +502,7 @@ int do_subscribe(message *m_ptr)
/* Notify in case of match. */
if(match_found)
notify(m_ptr->m_source);
ipc_notify(m_ptr->m_source);
}
return OK;

View file

@ -211,6 +211,6 @@ static void reply(
message *m_out /* report result */
)
{
if (OK != send(who, m_out)) /* send the message */
if (OK != ipc_send(who, m_out)) /* send the message */
printf("ext2(%d) was unable to send reply\n", sef_self());
}

View file

@ -408,7 +408,7 @@ input_event(message *m)
else {
m->m_type = TTY_INPUT_EVENT;
if ((r = send(TTY_PROC_NR, m)) != OK)
if ((r = ipc_send(TTY_PROC_NR, m)) != OK)
printf("INPUT: send to TTY failed (%d)\n", r);
}
}
@ -665,7 +665,7 @@ input_init(int UNUSED(type), sef_init_info_t *UNUSED(info))
m.m_type = TTY_INPUT_UP;
if ((r = send(TTY_PROC_NR, &m)) != OK)
if ((r = ipc_send(TTY_PROC_NR, &m)) != OK)
printf("INPUT: send to TTY failed (%d)\n", r);
return OK;

View file

@ -99,7 +99,7 @@ int main(int argc, char *argv[])
printf("IPC: error for %d: %d\n",
call_type, result);
if ((r = sendnb(who_e, &m)) != OK)
if ((r = ipc_sendnb(who_e, &m)) != OK)
printf("IPC send error %d.\n", r);
}
} else {

View file

@ -103,7 +103,7 @@ static void send_message_to_process(endpoint_t who, int ret, int ignore)
message m;
m.m_type = ret;
sendnb(who, &m);
ipc_sendnb(who, &m);
}
static void remove_semaphore(struct sem_struct *sem)
@ -576,7 +576,7 @@ out:
if (r != OK || !no_reply) {
m->m_type = r;
sendnb(who_e, m);
ipc_sendnb(who_e, m);
}
/* awaken process if possible */

View file

@ -79,8 +79,8 @@ message *m; /* notification message */
*/
m->m_type = TTY_FKEY_CONTROL;
m->FKEY_REQUEST = FKEY_EVENTS;
if (OK != (s=sendrec(TTY_PROC_NR, m)))
printf("IS: warning, sendrec to TTY failed: %d\n", s);
if (OK != (s=ipc_sendrec(TTY_PROC_NR, m)))
printf("IS: warning, ipc_sendrec to TTY failed: %d\n", s);
/* Now check which keys were pressed: F1-F12, SF1-SF12. */
for(h=0; h < NHOOKS; h++)

View file

@ -140,7 +140,7 @@ int result; /* report result to replyee */
{
int send_status;
m_out.m_type = result; /* build reply message */
send_status = send(who, &m_out); /* send the message */
send_status = ipc_send(who, &m_out); /* send the message */
if (OK != send_status)
panic("unable to send reply!: %d", send_status);
}

View file

@ -142,6 +142,6 @@ void reply(who, m_out)
int who;
message *m_out; /* report result */
{
if (OK != send(who, m_out)) /* send the message */
if (OK != ipc_send(who, m_out)) /* send the message */
printf("ISOFS(%d) was unable to send reply\n", sef_self());
}

View file

@ -175,7 +175,7 @@ static void reply(
message *m_out /* report result */
)
{
if (OK != send(who, m_out)) /* send the message */
if (OK != ipc_send(who, m_out)) /* send the message */
printf("MFS(%d) was unable to send reply\n", sef_self());
}

Some files were not shown because too many files have changed in this diff Show more