mostly renaming message field names to the new names.
tty stored process numbers in chars in tty and pty structs - now ints.
continue;
}
- printf("init_params_pci: found device %04x/%04x at index %d\n",
+ if(w_pci_debug)
+ printf("init_params_pci: found device %04x/%04x at index %d\n",
vid, did, devind);
/* Found a controller.
}
if (m->REQUEST == DIOCTIMEOUT) {
- if ((r=sys_datacopy(m->PROC_NR, (vir_bytes)m->ADDRESS,
+ if ((r=sys_datacopy(m->IO_ENDPT, (vir_bytes)m->ADDRESS,
SELF, (vir_bytes)&timeout, sizeof(timeout))) != OK)
return r;
}
if ((r=sys_datacopy(SELF, (vir_bytes)&prev,
- m->PROC_NR, (vir_bytes)m->ADDRESS, sizeof(prev))) != OK)
+ m->IO_ENDPT, (vir_bytes)m->ADDRESS, sizeof(prev))) != OK)
return r;
}
if (w_prepare(m->DEVICE) == NIL_DEV) return ENXIO;
count = w_wn->open_ct;
if ((r=sys_datacopy(SELF, (vir_bytes)&count,
- m->PROC_NR, (vir_bytes)m->ADDRESS, sizeof(count))) != OK)
+ m->IO_ENDPT, (vir_bytes)m->ADDRESS, sizeof(count))) != OK)
return r;
return OK;
}
if (w_prepare(m->DEVICE) == NIL_DEV) return ENXIO;
count = w_wn->open_ct;
if ((r=sys_datacopy(SELF, (vir_bytes)&count,
- m->PROC_NR, (vir_bytes)m->ADDRESS, sizeof(count))) != OK)
+ m->IO_ENDPT, (vir_bytes)m->ADDRESS, sizeof(count))) != OK)
return r;
return OK;
}
case DEV_OPEN:
case DEV_CLOSE:
case CANCEL:
- reply(TASK_REPLY, m.m_source, m.PROC_NR, OK);
+ reply(TASK_REPLY, m.m_source, m.IO_ENDPT, OK);
break;
case DEV_PING:
* requests at a time.
*/
if (suspended != NONE) {
- reply(TASK_REPLY, m.m_source, m.PROC_NR, EBUSY);
+ reply(TASK_REPLY, m.m_source, m.IO_ENDPT, EBUSY);
break;
}
- suspended = m.PROC_NR;
- reply(TASK_REPLY, m.m_source, m.PROC_NR, SUSPEND);
+ suspended = m.IO_ENDPT;
+ reply(TASK_REPLY, m.m_source, m.IO_ENDPT, SUSPEND);
switch(m.REQUEST) {
case CIOCGETTIME: /* get CMOS time */
case CIOCGETTIMEY2K:
y2kflag = (m.REQUEST = CIOCGETTIME) ? 0 : 1;
- result = gettime(m.PROC_NR, y2kflag, (vir_bytes) m.ADDRESS);
+ result = gettime(m.IO_ENDPT, y2kflag, (vir_bytes) m.ADDRESS);
break;
case CIOCSETTIME:
case CIOCSETTIMEY2K:
continue;
default:
- reply(TASK_REPLY, m.m_source, m.PROC_NR, EINVAL);
+ reply(TASK_REPLY, m.m_source, m.IO_ENDPT, EINVAL);
}
}
}
m.m_type = code; /* TASK_REPLY or REVIVE */
m.REP_STATUS = status; /* result of device operation */
- m.REP_PROC_NR = process; /* which user made the request */
+ m.REP_ENDPT = process; /* which user made the request */
if (OK != (s=send(replyee, &m)))
panic("CMOS", "sending reply failed", s);
}
*
* The drivers support the following operations (using message format m2):
*
- * m_type DEVICE PROC_NR COUNT POSITION ADRRESS
+ * m_type DEVICE IO_ENDPT COUNT POSITION ADRRESS
* ----------------------------------------------------------------
* | DEV_OPEN | device | proc nr | | | |
* |------------+---------+---------+---------+---------+---------|
if (receive(ANY, &mess) != OK) continue;
device_caller = mess.m_source;
- proc_nr = mess.PROC_NR;
+ proc_nr = mess.IO_ENDPT;
/* Now carry out the work. */
switch(mess.m_type) {
/* Finally, prepare and send the reply message. */
if (r != EDONTREPLY) {
mess.m_type = TASK_REPLY;
- mess.REP_PROC_NR = proc_nr;
+ mess.REP_ENDPT = proc_nr;
/* Status is # of bytes transferred or error code. */
mess.REP_STATUS = r;
send(device_caller, &mess);
if (mp->COUNT < 0) return(EINVAL);
/* Check the user buffer. */
- sys_umap(mp->PROC_NR, D, (vir_bytes) mp->ADDRESS, mp->COUNT, &phys_addr);
+ sys_umap(mp->IO_ENDPT, D, (vir_bytes) mp->ADDRESS, mp->COUNT, &phys_addr);
if (phys_addr == 0) return(EFAULT);
/* Prepare for I/O. */
iovec1.iov_size = mp->COUNT;
/* Transfer bytes from/to the device. */
- r = (*dp->dr_transfer)(mp->PROC_NR, opcode, mp->POSITION, &iovec1, 1);
+ r = (*dp->dr_transfer)(mp->IO_ENDPT, opcode, mp->POSITION, &iovec1, 1);
/* Return the number of bytes transferred or an error code. */
return(r == OK ? (mp->COUNT - iovec1.iov_size) : r);
nr_req = mp->COUNT; /* Length of I/O vector */
+#if 0
if (mp->m_source < 0) {
/* Called by a task, no need to copy vector. */
iov = (iovec_t *) mp->ADDRESS;
- } else {
+ } else
+#endif
+ {
/* Copy the vector from the caller to kernel space. */
if (nr_req > NR_IOREQS) nr_req = NR_IOREQS;
iovec_size = (phys_bytes) (nr_req * sizeof(iovec[0]));
if ((*dp->dr_prepare)(mp->DEVICE) == NIL_DEV) return(ENXIO);
/* Transfer bytes from/to the device. */
- r = (*dp->dr_transfer)(mp->PROC_NR, mp->m_type, mp->POSITION, iov, nr_req);
+ r = (*dp->dr_transfer)(mp->IO_ENDPT, mp->m_type, mp->POSITION, iov, nr_req);
/* Copy the I/O vector back to the caller. */
+#if 0
if (mp->m_source >= 0) {
+#endif
sys_datacopy(SELF, (vir_bytes) iovec,
mp->m_source, (vir_bytes) mp->ADDRESS, iovec_size);
- }
return(r);
}
if (mp->REQUEST == DIOCSETP) {
/* Copy just this one partition table entry. */
- if (OK != (s=sys_datacopy(mp->PROC_NR, (vir_bytes) mp->ADDRESS,
+ if (OK != (s=sys_datacopy(mp->IO_ENDPT, (vir_bytes) mp->ADDRESS,
SELF, (vir_bytes) &entry, sizeof(entry))))
return s;
dv->dv_base = entry.base;
entry.size = dv->dv_size;
(*dp->dr_geometry)(&entry);
if (OK != (s=sys_datacopy(SELF, (vir_bytes) &entry,
- mp->PROC_NR, (vir_bytes) mp->ADDRESS, sizeof(entry))))
+ mp->IO_ENDPT, (vir_bytes) mp->ADDRESS, sizeof(entry))))
return s;
}
return(OK);
cd $d/libdriver && $(MAKE)
# install with other drivers
-install: /sbin/$(DRIVER)
-/sbin/$(DRIVER): $(DRIVER)
- install -o root -cs $? $@
+install: $(DRIVER)
+ install -o root -cs $? /sbin/$(DRIVER)
# clean up local files
clean:
* user. It also saves a copy in a local buffer so that messages can be
* reviewed at a later time.
*/
- int proc_nr;
+ int proc_nr_e;
vir_bytes src;
int count;
char c;
static char diagbuf[10240];
/* Change SELF to actual process number. */
- if ((proc_nr = m->DIAG_PROC_NR) == SELF)
- m->DIAG_PROC_NR = proc_nr = m->m_source;
+ if ((proc_nr_e = m->DIAG_ENDPT) == SELF)
+ m->DIAG_ENDPT = proc_nr_e = m->m_source;
/* Now also make a copy for the private buffer at the LOG server, so
* that the messages can be reviewed at a later time.
src = (vir_bytes) m->DIAG_PRINT_BUF;
count = m->DIAG_BUF_COUNT;
while (count > 0 && i < sizeof(diagbuf)-1) {
- if (sys_datacopy(proc_nr, src, SELF, (vir_bytes) &c, 1) != OK)
+ if (sys_datacopy(proc_nr_e, src, SELF, (vir_bytes) &c, 1) != OK)
break; /* stop copying on error */
src ++;
count --;
if ((c == 0 && buf_count > 0) || buf_count == sizeof(print_buf)) {
m.DIAG_BUF_COUNT = buf_count;
m.DIAG_PRINT_BUF = print_buf;
- m.DIAG_PROC_NR = SELF;
+ m.DIAG_ENDPT = SELF;
m.m_type = DIAGNOSTICS; /* request TTY to output this buffer */
_sendrec(TTY_PROC_NR, &m); /* if it fails, we give up */
buf_count = 0; /* clear buffer for next batch */
if(logdevices[d].log_proc_nr && logdevices[d].log_revive_alerted
&& logdevices[d].log_source == m_ptr->m_source) {
m.m_type = DEV_REVIVE;
- m.REP_PROC_NR = logdevices[d].log_proc_nr;
+ m.REP_ENDPT = logdevices[d].log_proc_nr;
m.REP_STATUS = logdevices[d].log_status;
send(m_ptr->m_source, &m);
logdevices[d].log_proc_nr = 0;
logdevices[d].log_revive_alerted = 0;
#if LOG_DEBUG
printf("revived %d with %d bytes\n",
- m.REP_PROC_NR, m.REP_STATUS);
+ m.REP_ENDPT, m.REP_STATUS);
#endif
return;
}
return EINVAL;
}
- ops = m_ptr->PROC_NR & (SEL_RD|SEL_WR|SEL_ERR);
+ ops = m_ptr->IO_ENDPT & (SEL_RD|SEL_WR|SEL_ERR);
/* Read blocks when there is no log. */
- if((m_ptr->PROC_NR & SEL_RD) && logdevices[d].log_size > 0) {
+ if((m_ptr->IO_ENDPT & SEL_RD) && logdevices[d].log_size > 0) {
#if LOG_DEBUG
printf("log can read; size %d\n", logdevices[d].log_size);
#endif
}
/* Write never blocks. */
- if(m_ptr->PROC_NR & SEL_WR) ready_ops |= SEL_WR;
+ if(m_ptr->IO_ENDPT & SEL_WR) ready_ops |= SEL_WR;
/* Enable select calback if no operations were
* ready to go, but operations were requested,
* and notify was enabled.
*/
- if((m_ptr->PROC_NR & SEL_NOTIFY) && ops && !ready_ops) {
+ if((m_ptr->IO_ENDPT & SEL_NOTIFY) && ops && !ready_ops) {
logdevices[d].log_selected |= ops;
logdevices[d].log_select_proc = m_ptr->m_source;
#if LOG_DEBUG
if (m_prepare(m_ptr->DEVICE) == NIL_DEV) return(ENXIO);
if (m_device == MEM_DEV)
{
- r = sys_enable_iop(m_ptr->PROC_NR);
+ r = sys_enable_iop(m_ptr->IO_ENDPT);
if (r != OK)
{
printf("m_do_open: sys_enable_iop failed for %d: %d\n",
- m_ptr->PROC_NR, r);
+ m_ptr->IO_ENDPT, r);
return r;
}
}
ramdev_size= m_ptr->POSITION;
#else
/* Get request structure */
- s= sys_vircopy(m_ptr->PROC_NR, D, (vir_bytes)m_ptr->ADDRESS,
+ s= sys_vircopy(m_ptr->IO_ENDPT, D, (vir_bytes)m_ptr->ADDRESS,
SELF, D, (vir_bytes)&ramdev_size, sizeof(ramdev_size));
if (s != OK)
return s;
do_map= (m_ptr->REQUEST == MIOCMAP); /* else unmap */
/* Get request structure */
- r= sys_vircopy(m_ptr->PROC_NR, D, (vir_bytes)m_ptr->ADDRESS,
+ r= sys_vircopy(m_ptr->IO_ENDPT, D, (vir_bytes)m_ptr->ADDRESS,
SELF, D, (vir_bytes)&mapreq, sizeof(mapreq));
if (r != OK)
return r;
- r= sys_vm_map(m_ptr->PROC_NR, do_map,
+ r= sys_vm_map(m_ptr->IO_ENDPT, do_map,
(phys_bytes)mapreq.base, mapreq.size, mapreq.offset);
return r;
}
ior.ior_limit= ior.ior_base +
pcidev[devind].pd_bar[i].pb_size-1;
- printf(
+ if(debug) {
+ printf(
"pci_reserve3: for proc %d, adding I/O range [0x%x..0x%x]\n",
proc, ior.ior_base, ior.ior_limit);
+ }
r= sys_privctl(proc, SYS_PRIV_ADD_IO, 0, &ior);
if (r != OK)
{
mr.mr_limit= mr.mr_base +
pcidev[devind].pd_bar[i].pb_size-1;
- printf(
+ if(debug) {
+ printf(
"pci_reserve3: for proc %d, should add memory range [0x%x..0x%x]\n",
proc, mr.mr_base, mr.mr_limit);
+ }
r= sys_privctl(proc, SYS_PRIV_ADD_MEM, 0, &mr);
if (r != OK)
{
ilr= pcidev[devind].pd_ilr;
if (ilr != PCI_ILR_UNKNOWN)
{
- printf("pci_reserve3: adding IRQ %d\n", ilr);
+ if(debug) printf("pci_reserve3: adding IRQ %d\n", ilr);
r= sys_privctl(proc, SYS_PRIV_ADD_IRQ, ilr, NULL);
if (r != OK)
{
return;
}
}
- printf(
+ if(debug) {
+ printf(
"PCI: device %d.%d.%d uses INT%c but is not assigned any IRQ\n",
pcidev[devind].pd_busnr, pcidev[devind].pd_dev,
pcidev[devind].pd_func, 'A' + ipr-1);
+ }
}
}
* DEV_WRITE: a process wants to write on a terminal
* CANCEL: terminate a previous incomplete system call immediately
*
- * m_type TTY_LINE PROC_NR COUNT ADDRESS
+ * m_type TTY_LINE IO_ENDPT COUNT ADDRESS
* |-------------+---------+---------+---------+---------|
* | DEV_OPEN | | | | |
* |-------------+---------+---------+---------+---------|
do_initialize(); /* initialize */
/* fall through */
case DEV_CLOSE:
- reply(TASK_REPLY, pr_mess.m_source, pr_mess.PROC_NR, OK);
+ reply(TASK_REPLY, pr_mess.m_source, pr_mess.IO_ENDPT, OK);
break;
case DEV_WRITE: do_write(&pr_mess); break;
case DEV_STATUS: do_status(&pr_mess); break;
case SYS_SIG: do_signal(&pr_mess); break;
case DEV_PING: notify(pr_mess.m_source); break;
default:
- reply(TASK_REPLY, pr_mess.m_source, pr_mess.PROC_NR, EINVAL);
+ reply(TASK_REPLY, pr_mess.m_source, pr_mess.IO_ENDPT, EINVAL);
}
}
}
else if (m_ptr->COUNT <= 0) r = EINVAL;
/* Reply to FS, no matter what happened, possible SUSPEND caller. */
- reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, r);
+ reply(TASK_REPLY, m_ptr->m_source, m_ptr->IO_ENDPT, r);
/* If no errors occurred, continue printing with SUSPENDED caller.
* First wait until the printer is online to prevent stupid errors.
*/
if (SUSPEND == r) {
caller = m_ptr->m_source;
- proc_nr = m_ptr->PROC_NR;
+ proc_nr = m_ptr->IO_ENDPT;
user_left = m_ptr->COUNT;
orig_count = m_ptr->COUNT;
user_vir = (vir_bytes) m_ptr->ADDRESS;
{
if (revive_pending) {
m_ptr->m_type = DEV_REVIVE; /* build message */
- m_ptr->REP_PROC_NR = proc_nr;
+ m_ptr->REP_ENDPT = proc_nr;
m_ptr->REP_STATUS = revive_status;
writing = FALSE; /* unmark event */
* but rely on FS to handle the EINTR reply and de-suspension properly.
*/
- if (writing && m_ptr->PROC_NR == proc_nr) {
+ if (writing && m_ptr->IO_ENDPT == proc_nr) {
oleft = 0; /* cancel output by interrupt handler */
writing = FALSE;
revive_pending = FALSE;
}
- reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, EINTR);
+ reply(TASK_REPLY, m_ptr->m_source, m_ptr->IO_ENDPT, EINTR);
}
/*===========================================================================*
pr_mess.m_type = code; /* TASK_REPLY or REVIVE */
pr_mess.REP_STATUS = status; /* count or EIO */
- pr_mess.REP_PROC_NR = process; /* which user does this pertain to */
+ pr_mess.REP_ENDPT = process; /* which user does this pertain to */
send(replyee, &pr_mess); /* send the message */
}
*
* The driver supports the following operations (using message format m2):
*
- * m_type DEVICE PROC_NR COUNT POSITION ADRRESS
+ * m_type DEVICE IO_ENDPT COUNT POSITION ADRRESS
* ----------------------------------------------------------------
* | DEV_OPEN | device | proc nr | | | |
* |------------+---------+---------+---------+---------+---------|
receive(ANY, &mess);
caller = mess.m_source;
- proc_nr = mess.PROC_NR;
+ proc_nr = mess.IO_ENDPT;
/* Now carry out the work. */
switch(mess.m_type) {
/* Get user data */
if(m_ptr->REQUEST != DSPIORESET) {
- sys_vircopy(m_ptr->PROC_NR, D, (vir_bytes)m_ptr->ADDRESS, SELF, D, (vir_bytes)&val, sizeof(val));
+ sys_vircopy(m_ptr->IO_ENDPT, D, (vir_bytes)m_ptr->ADDRESS, SELF, D, (vir_bytes)&val, sizeof(val));
}
dprint("dsp_ioctl: got ioctl %d, argument: %d\n", m_ptr->REQUEST, val);
case DSPIOSIGN: status = dsp_set_sign(val); break;
case DSPIOMAX:
val = DSP_MAX_FRAGMENT_SIZE;
- sys_vircopy(SELF, D, (vir_bytes)&val, m_ptr->PROC_NR, D, (vir_bytes)m_ptr->ADDRESS, sizeof(val));
+ sys_vircopy(SELF, D, (vir_bytes)&val, m_ptr->IO_ENDPT, D, (vir_bytes)m_ptr->ADDRESS, sizeof(val));
status = OK;
break;
case DSPIORESET: status = dsp_reset(); break;
dprint("sb16_dsp.c: dsp_write()\n");
if(m_ptr->COUNT != DspFragmentSize) {
- reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, EINVAL);
+ reply(TASK_REPLY, m_ptr->m_source, m_ptr->IO_ENDPT, EINVAL);
return;
}
if(m_ptr->m_type != DmaMode && DmaBusy >= 0) {
- reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, EBUSY);
+ reply(TASK_REPLY, m_ptr->m_source, m_ptr->IO_ENDPT, EBUSY);
return;
}
- reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, SUSPEND);
+ reply(TASK_REPLY, m_ptr->m_source, m_ptr->IO_ENDPT, SUSPEND);
if(DmaBusy < 0) { /* Dma tranfer not yet started */
DmaMode = DEV_WRITE; /* Dma mode is writing */
- sys_datacopy(m_ptr->PROC_NR, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)DmaPtr, (phys_bytes)DspFragmentSize);
+ sys_datacopy(m_ptr->IO_ENDPT, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)DmaPtr, (phys_bytes)DspFragmentSize);
dsp_dma_setup(DmaPhys, DspFragmentSize * DMA_NR_OF_BUFFERS);
dsp_setup();
DmaBusy = 0; /* Dma is busy */
} else if(DmaBusy != DmaFillNext) { /* Dma transfer started, but Dma buffer not yet full */
- sys_datacopy(m_ptr->PROC_NR, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)DmaPtr + DmaFillNext * DspFragmentSize, (phys_bytes)DspFragmentSize);
+ sys_datacopy(m_ptr->IO_ENDPT, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)DmaPtr + DmaFillNext * DspFragmentSize, (phys_bytes)DspFragmentSize);
dprint(" filled dma[%d]\n", DmaFillNext);
DmaFillNext = (DmaFillNext + 1) % DMA_NR_OF_BUFFERS;
} else if(BufReadNext < 0) { /* Dma buffer full, fill first element of second buffer */
- sys_datacopy(m_ptr->PROC_NR, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)Buffer, (phys_bytes)DspFragmentSize);
+ sys_datacopy(m_ptr->IO_ENDPT, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)Buffer, (phys_bytes)DspFragmentSize);
dprint(" filled buf[0]\n");
BufReadNext = 0;
BufFillNext = 1;
receive(HARDWARE, &mess);
dsp_hardware_msg();
}
- sys_datacopy(m_ptr->PROC_NR, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)Buffer + BufFillNext * DspFragmentSize, (phys_bytes)DspFragmentSize);
+ sys_datacopy(m_ptr->IO_ENDPT, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)Buffer + BufFillNext * DspFragmentSize, (phys_bytes)DspFragmentSize);
dprint(" filled buf[%d]\n", BufFillNext);
BufFillNext = (BufFillNext + 1) % DSP_NR_OF_BUFFERS;
revivePending = 1;
reviveStatus = DspFragmentSize;
- reviveProcNr = m_ptr->PROC_NR;
+ reviveProcNr = m_ptr->IO_ENDPT;
notify(m_ptr->m_source);
}
{
if(revivePending) {
m_ptr->m_type = DEV_REVIVE; /* build message */
- m_ptr->REP_PROC_NR = reviveProcNr;
+ m_ptr->REP_ENDPT = reviveProcNr;
m_ptr->REP_STATUS = reviveStatus;
revivePending = 0; /* unmark event */
m.m_type = code; /* TASK_REPLY or REVIVE */
m.REP_STATUS = status; /* result of device operation */
- m.REP_PROC_NR = process; /* which user made the request */
+ m.REP_ENDPT = process; /* which user made the request */
send(replyee, &m);
}
*
* The driver supports the following operations (using message format m2):
*
- * m_type DEVICE PROC_NR COUNT POSITION ADRRESS
+ * m_type DEVICE IO_ENDPT COUNT POSITION ADRRESS
* ----------------------------------------------------------------
* | DEV_OPEN | device | proc nr | | | |
* |------------+---------+---------+---------+---------+---------|
receive(ANY, &mess);
caller = mess.m_source;
- proc_nr = mess.PROC_NR;
+ proc_nr = mess.IO_ENDPT;
switch (caller) {
case HARDWARE: /* Leftover interrupt. */
/* Finally, prepare and send the reply message. */
mess.m_type = TASK_REPLY;
- mess.REP_PROC_NR = proc_nr;
+ mess.REP_ENDPT = proc_nr;
dprint("%d %d", err, OK);
struct volume_level level;
int cmd_left, cmd_right, shift, max_level;
- sys_datacopy(m_ptr->PROC_NR, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)&level, (phys_bytes)sizeof(level));
+ sys_datacopy(m_ptr->IO_ENDPT, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)&level, (phys_bytes)sizeof(level));
shift = 3;
max_level = 0x1F;
level.right >>= shift;
/* Copy back to user */
- sys_datacopy(SELF, (vir_bytes)&level, m_ptr->PROC_NR, (vir_bytes)m_ptr->ADDRESS, (phys_bytes)sizeof(level));
+ sys_datacopy(SELF, (vir_bytes)&level, m_ptr->IO_ENDPT, (vir_bytes)m_ptr->ADDRESS, (phys_bytes)sizeof(level));
}
return OK;
struct inout_ctrl input;
int input_cmd, input_mask, mask, del_mask, shift;
- sys_datacopy(m_ptr->PROC_NR, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)&input, (phys_bytes)sizeof(input));
+ sys_datacopy(m_ptr->IO_ENDPT, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)&input, (phys_bytes)sizeof(input));
input_cmd = (channel == 0 ? MIXER_IN_LEFT : MIXER_IN_RIGHT);
}
/* Copy back to user */
- sys_datacopy(SELF, (vir_bytes)&input, m_ptr->PROC_NR, (vir_bytes)m_ptr->ADDRESS, (phys_bytes)sizeof(input));
+ sys_datacopy(SELF, (vir_bytes)&input, m_ptr->IO_ENDPT, (vir_bytes)m_ptr->ADDRESS, (phys_bytes)sizeof(input));
}
return OK;
struct inout_ctrl output;
int output_mask, mask, del_mask, shift;
- sys_datacopy(m_ptr->PROC_NR, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)&output, (phys_bytes)sizeof(output));
+ sys_datacopy(m_ptr->IO_ENDPT, (vir_bytes)m_ptr->ADDRESS, SELF, (vir_bytes)&output, (phys_bytes)sizeof(output));
mask = mixer_get(MIXER_OUTPUT_CTRL);
}
/* Copy back to user */
- sys_datacopy(SELF, (vir_bytes)&output, m_ptr->PROC_NR, (vir_bytes)m_ptr->ADDRESS, (phys_bytes)sizeof(output));
+ sys_datacopy(SELF, (vir_bytes)&output, m_ptr->IO_ENDPT, (vir_bytes)m_ptr->ADDRESS, (phys_bytes)sizeof(output));
}
return OK;
-}
\ No newline at end of file
+}
do_map= (m->REQUEST == MIOCMAP); /* else unmap */
/* Get request structure */
- r= sys_vircopy(m->PROC_NR, D,
+ r= sys_vircopy(m->IO_ENDPT, D,
(vir_bytes)m->ADDRESS,
SELF, D, (vir_bytes)&mapreq, sizeof(mapreq));
if (r != OK)
{
- tty_reply(TASK_REPLY, m->m_source, m->PROC_NR,
+ tty_reply(TASK_REPLY, m->m_source, m->IO_ENDPT,
r);
return;
}
- r= sys_vm_map(m->PROC_NR, do_map,
+ r= sys_vm_map(m->IO_ENDPT, do_map,
(phys_bytes)mapreq.base, mapreq.size,
mapreq.offset);
- tty_reply(TASK_REPLY, m->m_source, m->PROC_NR, r);
+ tty_reply(TASK_REPLY, m->m_source, m->IO_ENDPT, r);
return;
}
r= ENOTTY;
m->m_type, m->m_source);
r= EINVAL;
}
- tty_reply(TASK_REPLY, m->m_source, m->PROC_NR, r);
+ tty_reply(TASK_REPLY, m->m_source, m->IO_ENDPT, r);
}
vir_bytes src;
int count;
int result = OK;
- int proc_nr = m_ptr->DIAG_PROC_NR;
+ int proc_nr = m_ptr->DIAG_ENDPT;
if (proc_nr == SELF) proc_nr = m_ptr->m_source;
src = (vir_bytes) m_ptr->DIAG_PRINT_BUF;
if (!machine.vdu_ega) return(ENOTTY);
result = ga_program(seq1); /* bring font memory into view */
- result = sys_physcopy(m->PROC_NR, D, (vir_bytes) m->ADDRESS,
+ result = sys_physcopy(m->IO_ENDPT, D, (vir_bytes) m->ADDRESS,
NONE, PHYS_SEG, (phys_bytes) GA_VIDEO_ADDRESS, (phys_bytes)GA_FONT_SIZE);
result = ga_program(seq2); /* restore */
{
/* Should record proc */
kbdp->req_size= m->COUNT;
- kbdp->req_proc= m->PROC_NR;
+ kbdp->req_proc= m->IO_ENDPT;
kbdp->req_addr= (vir_bytes)m->ADDRESS;
kbdp->incaller= m->m_source;
r= SUSPEND;
if (n <= 0)
panic("TTY", "do_kbd(READ): bad n", n);
r= sys_vircopy(SELF, D, (vir_bytes)&kbdp->buf[kbdp->offset],
- m->PROC_NR, D, (vir_bytes) m->ADDRESS, n);
+ m->IO_ENDPT, D, (vir_bytes) m->ADDRESS, n);
if (r == OK)
{
kbdp->offset= (kbdp->offset+n) % KBD_BUFSZ;
*/
for (i= 0; i<m->COUNT; i++)
{
- r= sys_vircopy(m->PROC_NR, D, (vir_bytes) m->ADDRESS+i,
+ r= sys_vircopy(m->IO_ENDPT, D, (vir_bytes) m->ADDRESS+i,
SELF, D, (vir_bytes)&c, 1);
if (r != OK)
break;
r= OK;
break;
case DEV_SELECT:
- ops = m->PROC_NR & (SEL_RD|SEL_WR|SEL_ERR);
- watch = (m->PROC_NR & SEL_NOTIFY) ? 1 : 0;
+ ops = m->IO_ENDPT & (SEL_RD|SEL_WR|SEL_ERR);
+ watch = (m->IO_ENDPT & SEL_NOTIFY) ? 1 : 0;
r= 0;
if (kbdp->avail && (ops & SEL_RD))
kio_leds_t leds;
unsigned char b;
- r= sys_vircopy(m->PROC_NR, D, (vir_bytes) m->ADDRESS,
+ r= sys_vircopy(m->IO_ENDPT, D, (vir_bytes) m->ADDRESS,
SELF, D, (vir_bytes)&leds, sizeof(leds));
if (r != OK)
break;
kio_bell_t bell;
clock_t ticks;
- r= sys_vircopy(m->PROC_NR, D, (vir_bytes) m->ADDRESS,
+ r= sys_vircopy(m->IO_ENDPT, D, (vir_bytes) m->ADDRESS,
SELF, D, (vir_bytes)&bell, sizeof(bell));
if (r != OK)
break;
m->m_type, m->m_source);
r= EINVAL;
}
- tty_reply(TASK_REPLY, m->m_source, m->PROC_NR, r);
+ tty_reply(TASK_REPLY, m->m_source, m->IO_ENDPT, r);
}
}
m->m_type = DEV_REVIVE;
- m->REP_PROC_NR= kbdp->req_proc;
+ m->REP_ENDPT= kbdp->req_proc;
m->REP_STATUS= r;
return 1;
}
{
/* Load a new keymap. */
int result;
- result = sys_vircopy(m->PROC_NR, D, (vir_bytes) m->ADDRESS,
+ result = sys_vircopy(m->IO_ENDPT, D, (vir_bytes) m->ADDRESS,
SELF, D, (vir_bytes) keymap,
(vir_bytes) sizeof(keymap));
return(result);
/* Read call on /dev/ptypX. */
char rdsendreply; /* send a reply (instead of notify) */
- char rdcaller; /* process making the call (usually FS) */
- char rdproc; /* process that wants to read from the pty */
+ int rdcaller; /* process making the call (usually FS) */
+ int rdproc; /* process that wants to read from the pty */
vir_bytes rdvir; /* virtual address in readers address space */
int rdleft; /* # bytes yet to be read */
int rdcum; /* # bytes written so far */
/* Write call to /dev/ptypX. */
char wrsendreply; /* send a reply (instead of notify) */
- char wrcaller; /* process making the call (usually FS) */
- char wrproc; /* process that wants to write to the pty */
+ int wrcaller; /* process making the call (usually FS) */
+ int wrproc; /* process that wants to write to the pty */
vir_bytes wrvir; /* virtual address in writers address space */
int wrleft; /* # bytes yet to be written */
int wrcum; /* # bytes written so far */
break;
}
#if DEAD_CODE
- if (numap_local(m_ptr->PROC_NR, (vir_bytes) m_ptr->ADDRESS,
+ if (numap_local(m_ptr->IO_ENDPT, (vir_bytes) m_ptr->ADDRESS,
m_ptr->COUNT) == 0) {
#else
- if ((r = sys_umap(m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS,
+ if ((r = sys_umap(m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
m_ptr->COUNT, &p)) != OK) {
#endif
break;
}
pp->rdsendreply = TRUE;
pp->rdcaller = m_ptr->m_source;
- pp->rdproc = m_ptr->PROC_NR;
+ pp->rdproc = m_ptr->IO_ENDPT;
pp->rdvir = (vir_bytes) m_ptr->ADDRESS;
pp->rdleft = m_ptr->COUNT;
pty_start(pp);
break;
}
#if DEAD_CODE
- if (numap_local(m_ptr->PROC_NR, (vir_bytes) m_ptr->ADDRESS,
+ if (numap_local(m_ptr->IO_ENDPT, (vir_bytes) m_ptr->ADDRESS,
m_ptr->COUNT) == 0) {
r = EFAULT;
#else
- if ((r = sys_umap(m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS,
+ if ((r = sys_umap(m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
m_ptr->COUNT, &p)) != OK) {
#endif
break;
}
pp->wrsendreply = TRUE;
pp->wrcaller = m_ptr->m_source;
- pp->wrproc = m_ptr->PROC_NR;
+ pp->wrproc = m_ptr->IO_ENDPT;
pp->wrvir = (vir_bytes) m_ptr->ADDRESS;
pp->wrleft = m_ptr->COUNT;
handle_events(tp);
break;
case CANCEL:
- if (m_ptr->PROC_NR == pp->rdproc) {
+ if (m_ptr->IO_ENDPT == pp->rdproc) {
/* Cancel a read from a PTY. */
pp->rdleft = pp->rdcum = 0;
}
- if (m_ptr->PROC_NR == pp->wrproc) {
+ if (m_ptr->IO_ENDPT == pp->wrproc) {
/* Cancel a write to a PTY. */
pp->wrleft = pp->wrcum = 0;
}
default:
r = EINVAL;
}
- tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, r);
+ tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->IO_ENDPT, r);
}
/*===========================================================================*
pp->rdcaller == m_ptr->m_source)
{
m_ptr->m_type = DEV_REVIVE;
- m_ptr->REP_PROC_NR = pp->rdproc;
+ m_ptr->REP_ENDPT = pp->rdproc;
m_ptr->REP_STATUS = pp->rdcum;
pp->rdleft = pp->rdcum = 0;
pp->wrcaller == m_ptr->m_source)
{
m_ptr->m_type = DEV_REVIVE;
- m_ptr->REP_PROC_NR = pp->wrproc;
+ m_ptr->REP_ENDPT = pp->wrproc;
if (pp->wrcum == 0)
m_ptr->REP_STATUS = EIO;
else
pty_t *pp = tp->tty_priv;
int ops, ready_ops = 0, watch;
- ops = m->PROC_NR & (SEL_RD|SEL_WR|SEL_ERR);
- watch = (m->PROC_NR & SEL_NOTIFY) ? 1 : 0;
+ ops = m->IO_ENDPT & (SEL_RD|SEL_WR|SEL_ERR);
+ watch = (m->IO_ENDPT & SEL_NOTIFY) ? 1 : 0;
ready_ops = select_try_pty(tp, ops);
* DEV_STATUS: FS wants to know status for SELECT or REVIVE
* CANCEL: terminate a previous incomplete system call immediately
*
- * m_type TTY_LINE PROC_NR COUNT TTY_SPEK TTY_FLAGS ADDRESS
+ * m_type TTY_LINE IO_ENDPT COUNT TTY_SPEK TTY_FLAGS ADDRESS
* ---------------------------------------------------------------------------
* | HARD_INT | | | | | | |
* |-------------+---------+---------+---------+---------+---------+---------|
if (tty_mess.m_source != LOG_PROC_NR)
{
tty_reply(TASK_REPLY, tty_mess.m_source,
- tty_mess.PROC_NR, ENXIO);
+ tty_mess.IO_ENDPT, ENXIO);
}
continue;
}
printf("Warning, TTY got unexpected request %d from %d\n",
tty_mess.m_type, tty_mess.m_source);
tty_reply(TASK_REPLY, tty_mess.m_source,
- tty_mess.PROC_NR, EINVAL);
+ tty_mess.IO_ENDPT, EINVAL);
}
}
}
/* Suspended request finished. Send a REVIVE. */
m_ptr->m_type = DEV_REVIVE;
- m_ptr->REP_PROC_NR = tp->tty_inproc;
+ m_ptr->REP_ENDPT = tp->tty_inproc;
m_ptr->REP_STATUS = tp->tty_incum;
tp->tty_inleft = tp->tty_incum = 0;
/* Suspended request finished. Send a REVIVE. */
m_ptr->m_type = DEV_REVIVE;
- m_ptr->REP_PROC_NR = tp->tty_outproc;
+ m_ptr->REP_ENDPT = tp->tty_outproc;
m_ptr->REP_STATUS = tp->tty_outcum;
tp->tty_outcum = 0;
if (more_verbose) printf("do_read: EINVAL\n");
r = EINVAL;
} else
- if (sys_umap(m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS, m_ptr->COUNT,
+ if (sys_umap(m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS, m_ptr->COUNT,
&phys_addr) != OK) {
if (more_verbose) printf("do_read: EFAULT\n");
r = EFAULT;
/* Copy information from the message to the tty struct. */
tp->tty_inrepcode = TASK_REPLY;
tp->tty_incaller = m_ptr->m_source;
- tp->tty_inproc = m_ptr->PROC_NR;
+ tp->tty_inproc = m_ptr->IO_ENDPT;
tp->tty_in_vir = (vir_bytes) m_ptr->ADDRESS;
tp->tty_inleft = m_ptr->COUNT;
}
}
if (more_verbose) printf("do_read: replying %d\n", r);
- tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, r);
+ tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->IO_ENDPT, r);
if (tp->tty_select_ops)
select_retry(tp);
}
if (m_ptr->COUNT <= 0) {
r = EINVAL;
} else
- if (sys_umap(m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS, m_ptr->COUNT,
+ if (sys_umap(m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS, m_ptr->COUNT,
&phys_addr) != OK) {
r = EFAULT;
} else {
/* Copy message parameters to the tty structure. */
tp->tty_outrepcode = TASK_REPLY;
tp->tty_outcaller = m_ptr->m_source;
- tp->tty_outproc = m_ptr->PROC_NR;
+ tp->tty_outproc = m_ptr->IO_ENDPT;
tp->tty_out_vir = (vir_bytes) m_ptr->ADDRESS;
tp->tty_outleft = m_ptr->COUNT;
tp->tty_outrepcode = REVIVE;
}
}
- tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, r);
+ tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->IO_ENDPT, r);
}
/*===========================================================================*
case TCGETS:
/* Get the termios attributes. */
r = sys_vircopy(SELF, D, (vir_bytes) &tp->tty_termios,
- m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS,
+ m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
(vir_bytes) size);
break;
if (tp->tty_outleft > 0) {
/* Wait for all ongoing output processing to finish. */
tp->tty_iocaller = m_ptr->m_source;
- tp->tty_ioproc = m_ptr->PROC_NR;
+ tp->tty_ioproc = m_ptr->IO_ENDPT;
tp->tty_ioreq = m_ptr->REQUEST;
tp->tty_iovir = (vir_bytes) m_ptr->ADDRESS;
r = SUSPEND;
/*FALL THROUGH*/
case TCSETS:
/* Set the termios attributes. */
- r = sys_vircopy( m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS,
+ r = sys_vircopy( m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
SELF, D, (vir_bytes) &tp->tty_termios, (vir_bytes) size);
if (r != OK) break;
setattr(tp);
break;
case TCFLSH:
- r = sys_vircopy( m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS,
+ r = sys_vircopy( m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
SELF, D, (vir_bytes) ¶m.i, (vir_bytes) size);
if (r != OK) break;
switch (param.i) {
break;
case TCFLOW:
- r = sys_vircopy( m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS,
+ r = sys_vircopy( m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
SELF, D, (vir_bytes) ¶m.i, (vir_bytes) size);
if (r != OK) break;
switch (param.i) {
case TIOCGWINSZ:
r = sys_vircopy(SELF, D, (vir_bytes) &tp->tty_winsize,
- m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS,
+ m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
(vir_bytes) size);
break;
case TIOCSWINSZ:
- r = sys_vircopy( m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS,
+ r = sys_vircopy( m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
SELF, D, (vir_bytes) &tp->tty_winsize, (vir_bytes) size);
sigchar(tp, SIGWINCH);
break;
case TIOCGETP:
compat_getp(tp, ¶m.sg);
r = sys_vircopy(SELF, D, (vir_bytes) ¶m.sg,
- m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS,
+ m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
(vir_bytes) size);
break;
case TIOCSETP:
- r = sys_vircopy( m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS,
+ r = sys_vircopy( m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
SELF, D, (vir_bytes) ¶m.sg, (vir_bytes) size);
if (r != OK) break;
compat_setp(tp, ¶m.sg);
case TIOCGETC:
compat_getc(tp, ¶m.tc);
r = sys_vircopy(SELF, D, (vir_bytes) ¶m.tc,
- m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS,
+ m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
(vir_bytes) size);
break;
case TIOCSETC:
- r = sys_vircopy( m_ptr->PROC_NR, D, (vir_bytes) m_ptr->ADDRESS,
+ r = sys_vircopy( m_ptr->IO_ENDPT, D, (vir_bytes) m_ptr->ADDRESS,
SELF, D, (vir_bytes) ¶m.tc, (vir_bytes) size);
if (r != OK) break;
compat_setc(tp, ¶m.tc);
}
/* Send the reply. */
- tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, r);
+ tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->IO_ENDPT, r);
}
/*===========================================================================*
if (m_ptr->COUNT & R_BIT) r = EACCES;
} else {
if (!(m_ptr->COUNT & O_NOCTTY)) {
- tp->tty_pgrp = m_ptr->PROC_NR;
+ tp->tty_pgrp = m_ptr->IO_ENDPT;
r = 1;
}
tp->tty_openct++;
}
- tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, r);
+ tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->IO_ENDPT, r);
}
/*===========================================================================*
tp->tty_winsize = winsize_defaults;
setattr(tp);
}
- tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, OK);
+ tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->IO_ENDPT, OK);
}
/*===========================================================================*
int mode;
/* Check the parameters carefully, to avoid cancelling twice. */
- proc_nr = m_ptr->PROC_NR;
+ proc_nr = m_ptr->IO_ENDPT;
mode = m_ptr->COUNT;
if ((mode & R_BIT) && tp->tty_inleft != 0 && proc_nr == tp->tty_inproc) {
/* Process was reading when killed. Clean up input. */
message tty_mess;
tty_mess.m_type = code;
- tty_mess.REP_PROC_NR = proc_nr;
+ tty_mess.REP_ENDPT = proc_nr;
tty_mess.REP_STATUS = status;
if ((status = send(replyee, &tty_mess)) != OK) {
{
int ops, ready_ops = 0, watch;
- ops = m_ptr->PROC_NR & (SEL_RD|SEL_WR|SEL_ERR);
- watch = (m_ptr->PROC_NR & SEL_NOTIFY) ? 1 : 0;
+ ops = m_ptr->IO_ENDPT & (SEL_RD|SEL_WR|SEL_ERR);
+ watch = (m_ptr->IO_ENDPT & SEL_NOTIFY) ? 1 : 0;
ready_ops = select_try(tp, ops);
tp->tty_select_proc = m_ptr->m_source;
}
- tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->PROC_NR, ready_ops);
+ tty_reply(TASK_REPLY, m_ptr->m_source, m_ptr->IO_ENDPT, ready_ops);
return;
}
message reply_mess;
minor = m_ptr->TTY_LINE;
- proc = m_ptr->PROC_NR;
+ proc = m_ptr->IO_ENDPT;
func = m_ptr->REQUEST;
spek = m_ptr->m2_l1;
flags = m_ptr->m2_l2;
r = ENOTTY;
}
reply_mess.m_type = TASK_REPLY;
- reply_mess.REP_PROC_NR = m_ptr->PROC_NR;
+ reply_mess.REP_ENDPT = m_ptr->IO_ENDPT;
reply_mess.REP_STATUS = r;
reply_mess.m2_l1 = erki;
reply_mess.m2_l2 = flags;
char tty_reprint; /* 1 when echoed input messed up, else 0 */
char tty_escaped; /* 1 when LNEXT (^V) just seen, else 0 */
char tty_inhibited; /* 1 when STOP (^S) just seen (stops output) */
- char tty_pgrp; /* slot number of controlling process */
+ int tty_pgrp; /* slot number of controlling process */
char tty_openct; /* count of number of opens of this tty */
/* Information about incomplete I/O requests is stored here. */
char tty_inrepcode; /* reply code, TASK_REPLY or REVIVE */
char tty_inrevived; /* set to 1 if revive callback is pending */
- char tty_incaller; /* process that made the call (usually FS) */
- char tty_inproc; /* process that wants to read from tty */
+ int tty_incaller; /* process that made the call (usually FS) */
+ int tty_inproc; /* process that wants to read from tty */
vir_bytes tty_in_vir; /* virtual address where data is to go */
int tty_inleft; /* how many chars are still needed */
int tty_incum; /* # chars input so far */
- char tty_outrepcode; /* reply code, TASK_REPLY or REVIVE */
- char tty_outrevived; /* set to 1 if revive callback is pending */
- char tty_outcaller; /* process that made the call (usually FS) */
- char tty_outproc; /* process that wants to write to tty */
+ int tty_outrepcode; /* reply code, TASK_REPLY or REVIVE */
+ int tty_outrevived; /* set to 1 if revive callback is pending */
+ int tty_outcaller; /* process that made the call (usually FS) */
+ int tty_outproc; /* process that wants to write to tty */
vir_bytes tty_out_vir; /* virtual address where data comes from */
int tty_outleft; /* # chars yet to be output */
int tty_outcum; /* # chars output so far */
- char tty_iocaller; /* process that made the call (usually FS) */
- char tty_ioproc; /* process that wants to do an ioctl */
+ int tty_iocaller; /* process that made the call (usually FS) */
+ int tty_ioproc; /* process that wants to do an ioctl */
int tty_ioreq; /* ioctl request code */
vir_bytes tty_iovir; /* virtual address of ioctl buffer */