((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);
}
}
}
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);
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);
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);
}
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);
}
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;
*(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;
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);
(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);
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);
}
/*===========================================================================*
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);
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");
}
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;
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;
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;
}
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);
}
/*===========================================================================*
}
/* 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);
}
}
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");
}
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;
}
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;
}
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;
}
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);
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);
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);
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);
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);
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;
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;
msg.BDEV_USER = NONE;
msg.BDEV_ID = 0;
- r = sendrec(driver[which].endpt, &msg);
+ r = ipc_sendrec(driver[which].endpt, &msg);
cpf_revoke(gid);
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;
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);
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;
}
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);
}
/*===========================================================================*
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);
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");
}
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;
}
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);
}
/*
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);
}
}
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");
}
}
}
/* 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);
}
}
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);
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");
}
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);
}
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)) {
*****************************************************************************/
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");
}
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);
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);
}
#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);
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",
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",
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",
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",
}
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",
}
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",
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",
}
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",
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",
}
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",
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",
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",
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",
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",
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",
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);
}
((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;
((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)
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;
}
}
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);
}
/*===========================================================================*
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;
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");
}
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;
}
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);
}
/*===========================================================================*
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;
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");
}
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;
}
}
/* 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);
}
/* See if an observer is registered and send it a message. */
if (proc_nr != NONE) {
- notify(proc_nr);
+ ipc_notify(proc_nr);
}
return(TRUE);
}
/* 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;
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);
/* 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
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
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
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
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
#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
#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
#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);
/* 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);
}
/* 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 .*/
#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>
/* 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) \
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)
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
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;
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.
* 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);
SRCS+= \
__sigreturn.S \
+ _do_kernel_call_intr.S \
_ipc.S \
- _senda.S \
brksize.S \
+ get_minix_kerninfo.S \
ucontext.S
ucontextoffsets.h: ${CF}
--- /dev/null
+#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
/**========================================================================* */
/* 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)
+ENTRY(_ipc_notify_intr)
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 */
+ mov r1, r0 /* r1 = src_dest */
+ mov r0, #NOTIFY /* _ipc_notify(srcdst) */
+ 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
-ENTRY(_notify_orig)
+ENTRY(_ipc_sendnb_intr)
push {fp}
mov fp, sp
+ mov r2, r1 /* r2 = msg ptr */
mov r1, r0 /* r1 = src_dest */
- mov r0, #NOTIFY /* _notify(srcdst) */
- 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(_sendnb_orig)
+ENTRY(_ipc_senda_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 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
-
-ENTRY(_do_kernel_call_orig)
- /* r0 already holds msg ptr */
- mov r3, #KERVEC /* r3 determines the SVC type */
- svc #0 /* trap to kernel */
- bx lr
+++ /dev/null
-#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
--- /dev/null
+#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
+
SRCS+= \
__sigreturn.S \
+ _do_kernel_call_intr.S \
_ipc.S \
- _senda.S \
brksize.S \
+ get_minix_kerninfo.S \
ucontext.S
ucontextoffsets.h: ${CF}
--- /dev/null
+#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
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)
+ENTRY(_ipc_notify_intr)
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)
+ movl SRC_DST(%ebp), %eax /* eax = destination */
+ movl $NOTIFY, %ecx /* _ipc_notify(srcdst) */
+ int $IPCVEC_INTR /* trap to the kernel */
pop %ebx
pop %ebp
ret
-ENTRY(_notify_orig)
+ENTRY(_ipc_sendnb_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 SRC_DST(%ebp), %eax /* eax = dest-src */
+ movl MESSAGE(%ebp), %ebx /* ebx = message pointer */
+ movl $SENDNB, %ecx /* _ipc_sendnb(dest, ptr) */
+ int $IPCVEC_INTR /* trap to the kernel */
pop %ebx
pop %ebp
ret
-ENTRY(_sendnb_orig)
+ENTRY(_ipc_senda_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 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
-ENTRY(_do_kernel_call_orig)
- /* pass the message pointer to kernel in the %eax register */
- movl 4(%esp), %eax
- int $KERVEC_ORIG
- ret
+++ /dev/null
-#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
--- /dev/null
+#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
+
#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
#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)
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;
- }
+ }
}
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?
*/
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;
}
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).
*/
/* 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);
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;
}
msg->m_type = USB_ANNOUCE_DEV;
msg->USB_DEV_ID = drv->dev;
msg->USB_INTERFACES = drv->interfaces;
- send(ep, msg);
+ ipc_send(ep, msg);
}
/*****************************************************************************
}
/* send reply */
- send(ep, msg);
+ ipc_send(ep, msg);
}
}
}
}
- send(ep, msg);
+ ipc_send(ep, msg);
}
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);
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);
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;
}
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);
}
/****************************************************************************
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;
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).
*/
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;
}
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;
* 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;
}
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}
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;
/* 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);
}
/*===========================================================================*
m.VBOX_COUNT = len;
m.VBOX_ID = 0;
- r = sendrec(vbox_endpt, &m);
+ r = ipc_sendrec(vbox_endpt, &m);
cpf_revoke(grant);
m.VBOX_CONN = conn;
m.VBOX_ID = 0;
- r = sendrec(vbox_endpt, &m);
+ r = ipc_sendrec(vbox_endpt, &m);
if (r != OK)
return r;
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);
/* 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;
inside = 0;
/* Tell the kernel to rescan the table */
- return senda(&msgtable[first_slot], len);
+ return ipc_senda(&msgtable[first_slot], len);
}
/*===========================================================================*
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);
}
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);
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);
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);
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);
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);
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);
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);
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);
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);
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)
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);
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);
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)
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);
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);
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);
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);
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);
* 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));
#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) {
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;
}
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;
}
*===========================================================================*/
void sef_cb_ping_reply_pong(endpoint_t source)
{
- notify(source);
+ ipc_notify(source);
}
#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 */
int status;
msgptr->m_type = syscallnr;
- status = sendrec(who, msgptr);
+ status = ipc_sendrec(who, msgptr);
if (status != 0) return(status);
return(msgptr->m_type);
}
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);
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);
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);
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);
}
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);
m->DEVMAN_RESULT = ENODEV;
}
m->m_type = DEVMAN_REPLY;
- send(RS_PROC_NR, m);
+ ipc_send(RS_PROC_NR, m);
}
return 0;
}
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);
m->DEVMAN_RESULT = ENODEV;
}
m->m_type = DEVMAN_REPLY;
- send(RS_PROC_NR, m);
+ ipc_send(RS_PROC_NR, m);
}
return 0;
}
{
msg->m_type = DEVMAN_REPLY;
msg->DEVMAN_RESULT = res;
- send(msg->m_source, msg);
+ ipc_send(msg->m_source, msg);
}
/*===========================================================================*
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);
}
} else {
UNSET_BIT(ds_subs[i].old_subs, nr);
}
- notify(ep);
+ ipc_notify(ep);
}
}
/* Notify in case of match. */
if(match_found)
- notify(m_ptr->m_source);
+ ipc_notify(m_ptr->m_source);
}
return OK;
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());
}
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);
}
}
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;
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 {
message m;
m.m_type = ret;
- sendnb(who, &m);
+ ipc_sendnb(who, &m);
}
static void remove_semaphore(struct sem_struct *sem)
if (r != OK || !no_reply) {
m->m_type = r;
- sendnb(who_e, m);
+ ipc_sendnb(who_e, m);
}
/* awaken process if possible */
*/
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++)
{
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);
}
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());
}
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());
}
{
int r;
- if (OK != (r = send(who, m_out))) /* send the message */
+ if (OK != (r = ipc_send(who, m_out))) /* send the message */
printf("PFS: unable to send reply: %d\n", r);
}
mess.VFS_PM_SLOT = ip->proc_nr;
mess.VFS_PM_PID = rmp->mp_pid;
mess.VFS_PM_ENDPT = rmp->mp_endpoint;
- if (OK != (s=send(VFS_PROC_NR, &mess)))
+ if (OK != (s=ipc_send(VFS_PROC_NR, &mess)))
panic("can't sync up with VFS: %d", s);
}
}
memset(&mess, 0, sizeof(mess));
mess.m_type = VFS_PM_INIT;
mess.VFS_PM_ENDPT = NONE;
- if (sendrec(VFS_PROC_NR, &mess) != OK || mess.m_type != OK)
+ if (ipc_sendrec(VFS_PROC_NR, &mess) != OK || mess.m_type != OK)
panic("can't sync up with VFS");
#if defined(__i386__)
rmp = &mproc[proc_nr];
rmp->mp_reply.m_type = result;
- if ((r = sendnb(rmp->mp_endpoint, &rmp->mp_reply)) != OK)
+ if ((r = ipc_sendnb(rmp->mp_endpoint, &rmp->mp_reply)) != OK)
printf("PM can't reply to %d (%s): %d\n", rmp->mp_endpoint,
rmp->mp_name, r);
}
m.PM_EXEC_RESTART_PC = (void *)pc;
m.PM_EXEC_RESTART_PS_STR = (void *)ps_str;
- r = sendrec(PM_PROC_NR, &m);
+ r = ipc_sendrec(PM_PROC_NR, &m);
if (r != OK)
return r;
/* If the service is a driver, map it. */
if (rpub->dev_nr > 0) {
/* The purpose of non-blocking forks is to avoid involving VFS in the
- * forking process, because VFS may be blocked on a sendrec() to a MFS
+ * forking process, because VFS may be blocked on a ipc_sendrec() to a MFS
* that is waiting for a endpoint update for a dead driver. We have just
* published that update, but VFS may still be blocked. As a result, VFS
* may not yet have received PM's fork message. Hence, if we call
m.m_type = DEVMAN_BIND;
m.DEVMAN_ENDPOINT = rpub->endpoint;
m.DEVMAN_DEVICE_ID = rpub->devman_id;
- r = sendrec(ep, &m);
+ r = ipc_sendrec(ep, &m);
if (r != OK || m.DEVMAN_RESULT != OK) {
return kill_service(rp, "devman bind device failed", r);
}
m.m_type = DEVMAN_UNBIND;
m.DEVMAN_ENDPOINT = rpub->endpoint;
m.DEVMAN_DEVICE_ID = rpub->devman_id;
- r = sendrec(ep, &m);
+ r = ipc_sendrec(ep, &m);
if (r != OK || m.DEVMAN_RESULT != OK) {
printf("RS: devman unbind device failed");
* check and, if so request the system service's status.
*/
else if (now - rp->r_check_tm > rp->r_period) {
- notify(rpub->endpoint); /* request status */
+ ipc_notify(rpub->endpoint); /* request status */
rp->r_check_tm = now; /* mark time */
}
}
if(rs_verbose && rp)
printf("RS: %s being replied to\n", srv_to_string(rp));
- r = sendnb(who, m_ptr); /* send the message */
+ r = ipc_sendnb(who, m_ptr); /* send the message */
if (r != OK)
printf("RS: unable to send reply to %d: %d\n", who, r);
}
*===========================================================================*/
static void reply(endpoint_t who_e, message *m_ptr)
{
- 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("SCHED: unable to send reply to %d: %d\n", who_e, s);
}
service_pm();
continue;
} else if (is_notify(call_nr)) {
- /* A task notify()ed us */
+ /* A task ipc_notify()ed us */
switch (who_e) {
case DS_PROC_NR:
/* Start a thread to handle DS events, if no thread
continue;
} else if (who_p < 0) { /* i.e., message comes from a task */
/* We're going to ignore this message. Tasks should
- * send notify()s only.
+ * send ipc_notify()s only.
*/
printf("VFS: ignoring message from %d (%d)\n", who_e, call_nr);
continue;
rfp->fp_umask = ~0;
} while (TRUE); /* continue until process NONE */
mess.m_type = OK; /* tell PM that we succeeded */
- s = send(PM_PROC_NR, &mess); /* send synchronization message */
+ s = ipc_send(PM_PROC_NR, &mess); /* send synchronization message */
system_hz = sys_hz();
else fp = &fproc[proc_p];
if (m_in.m_type == EDEADSRCDST) {
- printf("VFS: failed sendrec\n");
- return; /* Failed 'sendrec' */
+ printf("VFS: failed ipc_sendrec\n");
+ return; /* Failed 'ipc_sendrec' */
}
/* Negative who_p is never used to access the fproc array. Negative
int r;
m_out->m_type = result;
- r = sendnb(whom, m_out);
+ r = ipc_sendnb(whom, m_out);
if (r != OK) {
printf("VFS: %d couldn't send reply %d to %d: %d\n", mthread_self(),
result, whom, r);
panic("Unhandled postponed PM call %d", job_m_in.m_type);
}
- r = send(PM_PROC_NR, &m_out);
+ r = ipc_send(PM_PROC_NR, &m_out);
if (r != OK)
- panic("service_pm_postponed: send failed: %d", r);
+ panic("service_pm_postponed: ipc_send failed: %d", r);
}
/*===========================================================================*
return;
}
- r = send(PM_PROC_NR, &m_out);
+ r = ipc_send(PM_PROC_NR, &m_out);
if (r != OK)
- panic("service_pm: send failed: %d", r);
+ panic("service_pm: ipc_send failed: %d", r);
}
job_m_out.VMV_RESULT = result;
job_m_out.VMV_REQID = req_id;
- /* reply asynchronously as VM may not be able to receive
- * a sendnb() message
+ /* Reply asynchronously as VM may not be able to receive
+ * an ipc_sendnb() message.
*/
job_m_out.m_type = VM_VFS_REPLY;
r = asynsend3(VM_PROC_NR, &job_m_out, 0);
m_out.m_type = VFS_PM_REBOOT_REPLY;
- if ((r = send(PM_PROC_NR, &m_out)) != OK)
- panic("pm_reboot: send failed: %d", r);
+ if ((r = ipc_send(PM_PROC_NR, &m_out)) != OK)
+ panic("pm_reboot: ipc_send failed: %d", r);
}
/*===========================================================================*
panic("sef_receive_status() error: %d", r);
if (is_ipc_notify(rcv_sts)) {
- /* Unexpected notify(). */
- printf("VM: ignoring notify() from %d\n", msg.m_source);
+ /* Unexpected ipc_notify(). */
+ printf("VM: ignoring ipc_notify() from %d\n", msg.m_source);
continue;
}
who_e = msg.m_source;
*/
if(result != SUSPEND) {
msg.m_type = result;
- if((r=send(who_e, &msg)) != OK) {
+ if((r=ipc_send(who_e, &msg)) != OK) {
printf("VM: couldn't send %d to %d (err %d)\n",
msg.m_type, who_e, r);
- panic("send() error");
+ panic("ipc_send() error");
}
}
}
/* RS expects this response that it then again wants to reply to: */
m->RS_INIT_RESULT = OK;
- sendrec(RS_PROC_NR, m);
+ ipc_sendrec(RS_PROC_NR, m);
return(SUSPEND);
}
mmap_reply.m_type = result;
mmap_reply.VMM_ADDR = v;
- if(send(vmp->vm_endpoint, &mmap_reply) != OK)
- panic("VM: mmap_file_cont: send() failed");
+ if(ipc_send(vmp->vm_endpoint, &mmap_reply) != OK)
+ panic("VM: mmap_file_cont: ipc_send() failed");
}
/*===========================================================================*
* and bypass the process to be signal is IPC itself.
*/
if (ipc_ep != 0 && ep != ipc_ep) {
- r = notify(ipc_ep);
+ r = ipc_notify(ipc_ep);
if (r != OK)
- printf("VM: notify IPC error!\n");
+ printf("VM: ipc_notify error!\n");
}
return OK;
}
if(reply_e == src_e) reply_e = dst_e;
else if(reply_e == dst_e) reply_e = src_e;
m_ptr->m_type = OK;
- r = send(reply_e, m_ptr);
+ r = ipc_send(reply_e, m_ptr);
if(r != OK) {
- panic("send() error");
+ panic("ipc_send() error");
}
return SUSPEND;
#define _LABEL(x) \
.globl x; x:
#define LABEL(y) _LABEL(_C_LABEL(y))
-
#endif /* defined(__minix) */
+
#define ASMSTR .asciz
#if defined(PIC)
#ifdef __minix
#define IMPORT(sym) \
.extern _C_LABEL(sym)
-
-#define KERVEC_ORIG 32 /* syscall trap to kernel */
-#define IPCVEC_ORIG 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 */
-
#endif
#endif /* !_I386_ASM_H_ */
output("- driver died\n");
break;
case RESULT_COMMFAIL:
- output("- communication failed; sendrec returned %d\n",
+ output("- communication failed; ipc_sendrec returned %d\n",
res->value);
break;
case RESULT_BADTYPE:
m.BDEV_ACCESS = (may_write) ? (BDEV_R_BIT | BDEV_W_BIT) : BDEV_R_BIT;
m.BDEV_ID = 0;
- (void) sendrec(driver_endpt, &m);
+ (void) ipc_sendrec(driver_endpt, &m);
}
static int sendrec_driver(message *m_ptr, ssize_t exp, result_t *res)
m_orig = *m_ptr;
- r = sendrec(driver_endpt, m_ptr);
+ r = ipc_sendrec(driver_endpt, m_ptr);
if (r == EDEADSRCDST) {
/* The driver has died. Find its new endpoint, and reopen all
m.m_type = do_request(&m);
- send(m.m_source, &m);
+ ipc_send(m.m_source, &m);
}
return 0;
m.VTR_PGRANT = pgrant;
m.VTR_PCOUNT = *pcount;
- r = sendrec(endpt, &m);
+ r = ipc_sendrec(endpt, &m);
cpf_revoke(pgrant);
cpf_revoke(vgrant);