More use of endpoint_t. Other code cleanup.
This commit is contained in:
parent
2ff73172b4
commit
4865e3f4f9
34 changed files with 120 additions and 133 deletions
|
@ -56,8 +56,8 @@ static void write_reg(int function, int index, u32_t value);
|
|||
static void init_domain(int index);
|
||||
static void init_map(unsigned int ix);
|
||||
static int do_add4pci(message *m);
|
||||
static void add_range(u32_t busaddr, u32_t size);
|
||||
static void del_range(u32_t busaddr, u32_t size);
|
||||
static void add_range(phys_bytes busaddr, phys_bytes size);
|
||||
static void del_range(phys_bytes busaddr, phys_bytes size);
|
||||
static void report_exceptions(void);
|
||||
|
||||
/* SEF functions and variables. */
|
||||
|
@ -428,9 +428,9 @@ static int do_add4pci(message *m)
|
|||
}
|
||||
|
||||
|
||||
static void add_range(u32_t busaddr, u32_t size)
|
||||
static void add_range(phys_bytes busaddr, phys_bytes size)
|
||||
{
|
||||
u32_t o;
|
||||
phys_bytes o;
|
||||
|
||||
#if 0
|
||||
printf("add_range: mapping 0x%x@0x%x\n", size, busaddr);
|
||||
|
@ -443,9 +443,9 @@ static void add_range(u32_t busaddr, u32_t size)
|
|||
}
|
||||
}
|
||||
|
||||
static void del_range(u32_t busaddr, u32_t size)
|
||||
static void del_range(phys_bytes busaddr, phys_bytes size)
|
||||
{
|
||||
u32_t o, bit;
|
||||
phys_bytes o;
|
||||
|
||||
#if 0
|
||||
printf("del_range: mapping 0x%x@0x%x\n", size, busaddr);
|
||||
|
@ -453,7 +453,7 @@ static void del_range(u32_t busaddr, u32_t size)
|
|||
|
||||
for (o= 0; o<size; o += I386_PAGE_SIZE)
|
||||
{
|
||||
bit= (busaddr+o)/I386_PAGE_SIZE;
|
||||
u32_t bit= (busaddr+o)/I386_PAGE_SIZE;
|
||||
table[bit/8] |= (1 << (bit % 8));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ PRIVATE phys_bytes dma_buf_phys;
|
|||
|
||||
PRIVATE struct prdte
|
||||
{
|
||||
u32_t prdte_base;
|
||||
phys_bytes prdte_base;
|
||||
u16_t prdte_count;
|
||||
u8_t prdte_reserved;
|
||||
u8_t prdte_flags;
|
||||
|
@ -145,11 +145,11 @@ FORWARD _PROTOTYPE( int w_identify, (void) );
|
|||
FORWARD _PROTOTYPE( char *w_name, (void) );
|
||||
FORWARD _PROTOTYPE( int w_specify, (void) );
|
||||
FORWARD _PROTOTYPE( int w_io_test, (void) );
|
||||
FORWARD _PROTOTYPE( int w_transfer, (int proc_nr, int opcode, u64_t position,
|
||||
iovec_t *iov, unsigned nr_req));
|
||||
FORWARD _PROTOTYPE( int w_transfer, (endpoint_t proc_nr, int opcode,
|
||||
u64_t position, iovec_t *iov, unsigned nr_req) );
|
||||
FORWARD _PROTOTYPE( int com_out, (struct command *cmd) );
|
||||
FORWARD _PROTOTYPE( int com_out_ext, (struct command *cmd) );
|
||||
FORWARD _PROTOTYPE( void setup_dma, (unsigned *sizep, int proc_nr,
|
||||
FORWARD _PROTOTYPE( void setup_dma, (unsigned *sizep, endpoint_t proc_nr,
|
||||
iovec_t *iov, size_t addr_offset, int do_write,
|
||||
int *do_copyoutp) );
|
||||
FORWARD _PROTOTYPE( void w_need_reset, (void) );
|
||||
|
@ -1151,7 +1151,7 @@ PRIVATE int error_dma(struct wini *wn)
|
|||
* w_transfer *
|
||||
*===========================================================================*/
|
||||
PRIVATE int w_transfer(proc_nr, opcode, position, iov, nr_req)
|
||||
int proc_nr; /* process doing the request */
|
||||
endpoint_t proc_nr; /* process doing the request */
|
||||
int opcode; /* DEV_GATHER_S or DEV_SCATTER_S */
|
||||
u64_t position; /* offset on device to read or write */
|
||||
iovec_t *iov; /* pointer to read or write request vector */
|
||||
|
@ -1268,7 +1268,8 @@ unsigned nr_req; /* length of request vector */
|
|||
if(proc_nr != SELF) {
|
||||
s= sys_safecopyto(proc_nr, iov->iov_addr,
|
||||
addr_offset,
|
||||
(vir_bytes)dma_buf+dma_buf_offset, n, D);
|
||||
(vir_bytes)(dma_buf+dma_buf_offset),
|
||||
n, D);
|
||||
if (s != OK) {
|
||||
panic("w_transfer: sys_vircopy failed: %d", s);
|
||||
}
|
||||
|
@ -1485,7 +1486,7 @@ struct command *cmd; /* Command block */
|
|||
PRIVATE void setup_dma(sizep, proc_nr, iov, addr_offset, do_write,
|
||||
do_copyoutp)
|
||||
unsigned *sizep;
|
||||
int proc_nr;
|
||||
endpoint_t proc_nr;
|
||||
iovec_t *iov;
|
||||
size_t addr_offset;
|
||||
int do_write;
|
||||
|
@ -2137,8 +2138,8 @@ unsigned nr_req; /* length of request vector */
|
|||
} else {
|
||||
dmabytes += nbytes;
|
||||
while (nbytes > 0) {
|
||||
size_t chunk;
|
||||
chunk = nbytes;
|
||||
vir_bytes chunk = nbytes;
|
||||
|
||||
if (chunk > iov->iov_size)
|
||||
chunk = iov->iov_size;
|
||||
position= add64ul(position, chunk);
|
||||
|
|
|
@ -865,7 +865,8 @@ PRIVATE void atl2_writev(message *m, int from_int)
|
|||
/* Write packet data.
|
||||
*/
|
||||
iovec_s_t *iovp;
|
||||
size_t off, count, left, pos, size, skip;
|
||||
size_t off, count, left, pos, skip;
|
||||
vir_bytes size;
|
||||
u8_t *sizep;
|
||||
int i, j, r, batch, maxnum;
|
||||
|
||||
|
|
|
@ -188,7 +188,8 @@ unsigned nr_req; /* length of request vector */
|
|||
struct wini *wn = w_wn;
|
||||
iovec_t *iop, *iov_end = iov + nr_req;
|
||||
int r, errors;
|
||||
unsigned nbytes, count, chunk;
|
||||
unsigned count;
|
||||
vir_bytes chunk, nbytes;
|
||||
unsigned long block;
|
||||
vir_bytes i13e_rw_off, rem_buf_size;
|
||||
unsigned secspcyl = wn->heads * wn->sectors;
|
||||
|
|
|
@ -273,8 +273,7 @@ PRIVATE void do_conf(message * mp)
|
|||
}
|
||||
|
||||
|
||||
PRIVATE void do_get_name(mp)
|
||||
message *mp;
|
||||
PRIVATE void do_get_name(message *mp)
|
||||
{
|
||||
int r;
|
||||
strncpy(mp->DL_NAME, progname, sizeof(mp->DL_NAME));
|
||||
|
@ -460,7 +459,8 @@ PRIVATE void do_vread_s(message * mp, int from_int)
|
|||
{
|
||||
char *buffer;
|
||||
u32_t size;
|
||||
int r, bytes, ix = 0;
|
||||
int r, ix = 0;
|
||||
vir_bytes bytes;
|
||||
dpeth_t *dep = NULL;
|
||||
de_loc_descr_t *descr = NULL;
|
||||
iovec_dat_s_t *iovp = NULL;
|
||||
|
|
|
@ -120,7 +120,7 @@ typedef struct dpeth {
|
|||
iovec_dat_s_t de_write_iovec;
|
||||
vir_bytes de_read_s;
|
||||
vir_bytes de_send_s;
|
||||
int de_client;
|
||||
endpoint_t de_client;
|
||||
|
||||
} dpeth_t;
|
||||
|
||||
|
|
|
@ -141,9 +141,9 @@ _PROTOTYPE( static void dp_pio8_getblock, (dpeth_t *dep, int page,
|
|||
_PROTOTYPE( static void dp_pio16_getblock, (dpeth_t *dep, int page,
|
||||
size_t offset, size_t size, void *dst) );
|
||||
_PROTOTYPE( static int dp_pkt2user, (dpeth_t *dep, int page,
|
||||
int length) );
|
||||
vir_bytes length) );
|
||||
_PROTOTYPE( static int dp_pkt2user_s, (dpeth_t *dep, int page,
|
||||
int length) );
|
||||
vir_bytes length) );
|
||||
_PROTOTYPE( static void dp_user2nic, (dpeth_t *dep, iovec_dat_t *iovp,
|
||||
vir_bytes offset, int nic_addr, vir_bytes count) );
|
||||
_PROTOTYPE( static void dp_user2nic_s, (dpeth_t *dep, iovec_dat_s_t *iovp,
|
||||
|
@ -792,8 +792,7 @@ message *mp;
|
|||
/*===========================================================================*
|
||||
* do_init *
|
||||
*===========================================================================*/
|
||||
static void do_init(mp)
|
||||
message *mp;
|
||||
static void do_init(message *mp)
|
||||
{
|
||||
int port;
|
||||
dpeth_t *dep;
|
||||
|
@ -1541,9 +1540,7 @@ void *dst;
|
|||
/*===========================================================================*
|
||||
* dp_pkt2user *
|
||||
*===========================================================================*/
|
||||
static int dp_pkt2user(dep, page, length)
|
||||
dpeth_t *dep;
|
||||
int page, length;
|
||||
static int dp_pkt2user(dpeth_t *dep, int page, vir_bytes length)
|
||||
{
|
||||
int last, count;
|
||||
|
||||
|
@ -1579,9 +1576,7 @@ int page, length;
|
|||
/*===========================================================================*
|
||||
* dp_pkt2user_s *
|
||||
*===========================================================================*/
|
||||
static int dp_pkt2user_s(dep, page, length)
|
||||
dpeth_t *dep;
|
||||
int page, length;
|
||||
static int dp_pkt2user_s(dpeth_t *dep, int page, vir_bytes length)
|
||||
{
|
||||
int last, count;
|
||||
|
||||
|
@ -1625,7 +1620,8 @@ int nic_addr;
|
|||
vir_bytes count;
|
||||
{
|
||||
vir_bytes vir_hw;
|
||||
int bytes, i, r;
|
||||
int i, r;
|
||||
vir_bytes bytes;
|
||||
|
||||
vir_hw = (vir_bytes)dep->de_locmem + nic_addr;
|
||||
|
||||
|
|
|
@ -285,7 +285,7 @@ typedef struct dpeth
|
|||
iovec_dat_t de_tmp_iovec;
|
||||
iovec_dat_s_t de_tmp_iovec_s;
|
||||
vir_bytes de_read_s;
|
||||
int de_client;
|
||||
endpoint_t de_client;
|
||||
message de_sendmsg;
|
||||
dp_user2nicf_t de_user2nicf;
|
||||
dp_user2nicf_s_t de_user2nicf_s;
|
||||
|
|
|
@ -53,7 +53,8 @@ PUBLIC unsigned int inw(unsigned short port)
|
|||
** Name: unsigned int insb(unsigned short int port, int proc_nr, void *buffer, int count);
|
||||
** Function: Reads a sequence of bytes from specified i/o port to user space buffer.
|
||||
*/
|
||||
PUBLIC void insb(unsigned short int port, int proc_nr, void *buffer, int count)
|
||||
PUBLIC void insb(unsigned short int port, endpoint_t proc_nr,
|
||||
void *buffer, int count)
|
||||
{
|
||||
int rc;
|
||||
|
||||
|
@ -91,7 +92,7 @@ PUBLIC void outw(unsigned short port, unsigned long value)
|
|||
** Name: void outsb(unsigned short int port, int proc_nr, void *buffer, int count);
|
||||
** Function: Writes a sequence of bytes from user space to specified i/o port.
|
||||
*/
|
||||
PUBLIC void outsb(unsigned short port, int proc_nr, void *buffer, int count)
|
||||
PUBLIC void outsb(unsigned short port, endpoint_t proc_nr, void *buffer, int count)
|
||||
{
|
||||
int rc;
|
||||
|
||||
|
|
|
@ -228,11 +228,11 @@ void dp_next_iovec(iovec_dat_s_t * iovp);
|
|||
#else
|
||||
unsigned int inb(unsigned short int);
|
||||
unsigned int inw(unsigned short int);
|
||||
void insb(unsigned short int, int, void *, int);
|
||||
void insb(unsigned short int, endpoint_t, void *, int);
|
||||
void insw(unsigned short int, int, void *, int);
|
||||
void outb(unsigned short int, unsigned long);
|
||||
void outw(unsigned short int, unsigned long);
|
||||
void outsb(unsigned short int, int, void *, int);
|
||||
void outsb(unsigned short int, endpoint_t, void *, int);
|
||||
void outsw(unsigned short int, int, void *, int);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ PUBLIC int ioapic_enabled;
|
|||
PUBLIC u32_t ioapic_id_mask[8], lapic_id_mask[8];
|
||||
PUBLIC u32_t lapic_addr_vaddr;
|
||||
PUBLIC vir_bytes lapic_addr;
|
||||
PUBLIC u32_t lapic_eoi_addr;
|
||||
PUBLIC vir_bytes lapic_eoi_addr;
|
||||
PUBLIC u32_t lapic_taskpri_addr;
|
||||
PUBLIC int bsp_lapic_id;
|
||||
|
||||
|
|
|
@ -27,12 +27,12 @@
|
|||
#define DR7_LN_4(bp) (3 << (18+4*(bp))) /* 4 bytes */
|
||||
|
||||
/* debugreg.S */
|
||||
void ld_dr0(u32_t value);
|
||||
void ld_dr1(u32_t value);
|
||||
void ld_dr2(u32_t value);
|
||||
void ld_dr3(u32_t value);
|
||||
void ld_dr6(u32_t value);
|
||||
void ld_dr7(u32_t value);
|
||||
void ld_dr0(phys_bytes value);
|
||||
void ld_dr1(phys_bytes value);
|
||||
void ld_dr2(phys_bytes value);
|
||||
void ld_dr3(phys_bytes value);
|
||||
void ld_dr6(phys_bytes value);
|
||||
void ld_dr7(phys_bytes value);
|
||||
u32_t st_dr0(void);
|
||||
u32_t st_dr1(void);
|
||||
u32_t st_dr2(void);
|
||||
|
|
|
@ -55,7 +55,7 @@ PUBLIC void main()
|
|||
}
|
||||
for (sp = BEG_PRIV_ADDR, i = 0; sp < END_PRIV_ADDR; ++sp, ++i) {
|
||||
sp->s_proc_nr = NONE; /* initialize as free */
|
||||
sp->s_id = (proc_nr_t) i; /* priv structure index */
|
||||
sp->s_id = (sys_id_t) i; /* priv structure index */
|
||||
ppriv_addr[i] = sp; /* priv ptr from number */
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ FORWARD _PROTOTYPE( int mini_receive, (struct proc *caller_ptr, int src,
|
|||
FORWARD _PROTOTYPE( int mini_senda, (struct proc *caller_ptr,
|
||||
asynmsg_t *table, size_t size));
|
||||
FORWARD _PROTOTYPE( int deadlock, (int function,
|
||||
register struct proc *caller, int src_dst));
|
||||
register struct proc *caller, proc_nr_t src_dst));
|
||||
FORWARD _PROTOTYPE( int try_async, (struct proc *caller_ptr));
|
||||
FORWARD _PROTOTYPE( int try_one, (struct proc *src_ptr, struct proc *dst_ptr,
|
||||
int *postponed));
|
||||
|
@ -245,7 +245,7 @@ check_misc_flags:
|
|||
*===========================================================================*/
|
||||
PUBLIC int do_ipc(call_nr, src_dst_e, m_ptr, bit_map)
|
||||
int call_nr; /* system call number and flags */
|
||||
int src_dst_e; /* src to receive from or dst to send to */
|
||||
endpoint_t src_dst_e; /* src to receive from or dst to send to */
|
||||
message *m_ptr; /* pointer to message in the caller's space */
|
||||
long bit_map; /* notification event set or flags */
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ _PROTOTYPE( void prepare_shutdown, (int how) );
|
|||
_PROTOTYPE( void minix_shutdown, (struct timer *tp) );
|
||||
|
||||
/* proc.c */
|
||||
_PROTOTYPE( int do_ipc, (int call_nr, int src_dst,
|
||||
_PROTOTYPE( int do_ipc, (int call_nr, endpoint_t src_dst,
|
||||
message *m_ptr, long bit_map) );
|
||||
_PROTOTYPE( int mini_notify, (const struct proc *src, endpoint_t dst) );
|
||||
_PROTOTYPE( void enqueue, (struct proc *rp) );
|
||||
|
@ -60,7 +60,7 @@ _PROTOTYPE( void cstart, (U16_t cs, U16_t ds, U16_t mds,
|
|||
_PROTOTYPE( int get_priv, (register struct proc *rc, int proc_type) );
|
||||
_PROTOTYPE( void set_sendto_bit, (const struct proc *rc, int id) );
|
||||
_PROTOTYPE( void unset_sendto_bit, (const struct proc *rc, int id) );
|
||||
_PROTOTYPE( void send_sig, (int proc_nr, int sig_nr) );
|
||||
_PROTOTYPE( void send_sig, (endpoint_t proc_nr, int sig_nr) );
|
||||
_PROTOTYPE( void cause_sig, (proc_nr_t proc_nr, int sig_nr) );
|
||||
_PROTOTYPE( void sig_delay_done, (struct proc *rp) );
|
||||
_PROTOTYPE( void kernel_call, (message *m_user, struct proc * caller) );
|
||||
|
@ -165,7 +165,7 @@ _PROTOTYPE( void arch_pre_exec, (struct proc *pr, u32_t, u32_t));
|
|||
_PROTOTYPE( int arch_umap, (struct proc *pr, vir_bytes, vir_bytes,
|
||||
int, phys_bytes *));
|
||||
_PROTOTYPE( int arch_do_vmctl, (message *m_ptr, struct proc *p));
|
||||
_PROTOTYPE( int vm_contiguous, (struct proc *targetproc, u32_t vir_buf, size_t count));
|
||||
_PROTOTYPE( int vm_contiguous, (struct proc *targetproc, vir_bytes vir_buf, size_t count));
|
||||
_PROTOTYPE( void proc_stacktrace, (struct proc *proc) );
|
||||
_PROTOTYPE( int vm_lookup, (const struct proc *proc, vir_bytes virtual, vir_bytes *result, u32_t *ptent));
|
||||
_PROTOTYPE( int delivermsg, (struct proc *target));
|
||||
|
|
|
@ -326,7 +326,7 @@ PUBLIC void unset_sendto_bit(const struct proc *rp, int id)
|
|||
/*===========================================================================*
|
||||
* send_sig *
|
||||
*===========================================================================*/
|
||||
PUBLIC void send_sig(int proc_nr, int sig_nr)
|
||||
PUBLIC void send_sig(endpoint_t proc_nr, int sig_nr)
|
||||
{
|
||||
/* Notify a system process about a signal. This is straightforward. Simply
|
||||
* set the signal that is to be delivered in the pending signals map and
|
||||
|
@ -392,8 +392,7 @@ int sig_nr; /* signal to be sent */
|
|||
/*===========================================================================*
|
||||
* sig_delay_done *
|
||||
*===========================================================================*/
|
||||
PUBLIC void sig_delay_done(rp)
|
||||
struct proc *rp;
|
||||
PUBLIC void sig_delay_done(struct proc *rp)
|
||||
{
|
||||
/* A process is now known not to send any direct messages.
|
||||
* Tell PM that the stop delay has ended, by sending a signal to the process.
|
||||
|
|
|
@ -17,7 +17,7 @@ PRIVATE int callnr; /* system call number */
|
|||
|
||||
/* Declare some local functions. */
|
||||
FORWARD _PROTOTYPE(void get_work, (message *m_ptr) );
|
||||
FORWARD _PROTOTYPE(void reply, (int whom, message *m_ptr) );
|
||||
FORWARD _PROTOTYPE(void reply, (endpoint_t whom, message *m_ptr) );
|
||||
|
||||
/* SEF functions and variables. */
|
||||
FORWARD _PROTOTYPE( void sef_local_startup, (void) );
|
||||
|
@ -108,11 +108,11 @@ PRIVATE void sef_local_startup()
|
|||
/*===========================================================================*
|
||||
* get_work *
|
||||
*===========================================================================*/
|
||||
PRIVATE void get_work(m_ptr)
|
||||
message *m_ptr; /* message buffer */
|
||||
PRIVATE void get_work(
|
||||
message *m_ptr /* message buffer */
|
||||
)
|
||||
{
|
||||
int status = 0;
|
||||
status = sef_receive(ANY, m_ptr); /* this blocks until message arrives */
|
||||
int status = sef_receive(ANY, m_ptr); /* blocks until message arrives */
|
||||
if (OK != status)
|
||||
panic("failed to receive message!: %d", status);
|
||||
who_e = m_ptr->m_source; /* message arrived! set sender */
|
||||
|
@ -122,12 +122,12 @@ message *m_ptr; /* message buffer */
|
|||
/*===========================================================================*
|
||||
* reply *
|
||||
*===========================================================================*/
|
||||
PRIVATE void reply(who_e, m_ptr)
|
||||
int who_e; /* destination */
|
||||
message *m_ptr; /* message buffer */
|
||||
PRIVATE void reply(
|
||||
endpoint_t who_e, /* destination */
|
||||
message *m_ptr /* message buffer */
|
||||
)
|
||||
{
|
||||
int s;
|
||||
s = send(who_e, m_ptr); /* send the message */
|
||||
int s = send(who_e, m_ptr); /* send the message */
|
||||
if (OK != s)
|
||||
printf("DS: unable to send reply to %d: %d\n", who_e, s);
|
||||
}
|
||||
|
|
|
@ -113,14 +113,14 @@ PRIVATE char *ds_getprocname(endpoint_t e)
|
|||
/*===========================================================================*
|
||||
* ds_getprocep *
|
||||
*===========================================================================*/
|
||||
PRIVATE endpoint_t ds_getprocep(char *s)
|
||||
PRIVATE endpoint_t ds_getprocep(const char *s)
|
||||
{
|
||||
/* Get a process endpoint given its name. */
|
||||
struct data_store *dsp;
|
||||
|
||||
if((dsp = lookup_entry(s, DSF_TYPE_LABEL)) != NULL)
|
||||
return dsp->u.u32;
|
||||
return -1;
|
||||
return (endpoint_t) -1;
|
||||
}
|
||||
|
||||
/*===========================================================================*
|
||||
|
|
|
@ -74,7 +74,7 @@ THIS_FILE
|
|||
|
||||
#define RANDOM_DEV_NAME "/dev/random"
|
||||
|
||||
int this_proc; /* Process number of this server. */
|
||||
endpoint_t this_proc; /* Process number of this server. */
|
||||
|
||||
/* Killing Solaris */
|
||||
int killer_inet= 0;
|
||||
|
@ -100,7 +100,8 @@ PUBLIC void main()
|
|||
{
|
||||
mq_t *mq;
|
||||
int r;
|
||||
int source, m_type;
|
||||
endpoint_t source;
|
||||
int m_type;
|
||||
|
||||
/* SEF local startup. */
|
||||
sef_local_startup();
|
||||
|
|
|
@ -31,13 +31,13 @@ FORWARD _PROTOTYPE( void write_int, (eth_port_t *eth_port) );
|
|||
FORWARD _PROTOTYPE( void eth_recvev, (event_t *ev, ev_arg_t ev_arg) );
|
||||
FORWARD _PROTOTYPE( void eth_sendev, (event_t *ev, ev_arg_t ev_arg) );
|
||||
FORWARD _PROTOTYPE( eth_port_t *find_port, (message *m) );
|
||||
FORWARD _PROTOTYPE( void eth_restart, (eth_port_t *eth_port, int tasknr) );
|
||||
FORWARD _PROTOTYPE( void eth_restart, (eth_port_t *eth_port, endpoint_t tasknr) );
|
||||
FORWARD _PROTOTYPE( void send_getstat, (eth_port_t *eth_port) );
|
||||
|
||||
PUBLIC void osdep_eth_init()
|
||||
{
|
||||
int i, j, r, rport;
|
||||
u32_t tasknr;
|
||||
endpoint_t tasknr;
|
||||
struct eth_conf *ecp;
|
||||
eth_port_t *eth_port, *rep;
|
||||
message mess;
|
||||
|
@ -475,9 +475,8 @@ PUBLIC void eth_rec(message *m)
|
|||
|
||||
PUBLIC void eth_check_drivers(message *m)
|
||||
{
|
||||
int r, tasknr;
|
||||
|
||||
tasknr= m->m_source;
|
||||
int r;
|
||||
endpoint_t tasknr= m->m_source;
|
||||
#if 0
|
||||
if (notification_count < 100)
|
||||
{
|
||||
|
@ -674,8 +673,7 @@ eth_port_t *eth_port;
|
|||
eth_port->etp_osdep.etp_state= OEPS_SEND_SENT;
|
||||
}
|
||||
|
||||
PRIVATE void write_int(eth_port)
|
||||
eth_port_t *eth_port;
|
||||
PRIVATE void write_int(eth_port_t *eth_port)
|
||||
{
|
||||
acc_t *pack;
|
||||
int multicast;
|
||||
|
@ -886,9 +884,7 @@ message *m;
|
|||
return loc_port;
|
||||
}
|
||||
|
||||
static void eth_restart(eth_port, tasknr)
|
||||
eth_port_t *eth_port;
|
||||
int tasknr;
|
||||
static void eth_restart(eth_port_t *eth_port, endpoint_t tasknr)
|
||||
{
|
||||
int r;
|
||||
unsigned flags, dl_flags;
|
||||
|
|
|
@ -18,7 +18,7 @@ typedef struct osdep_eth_port
|
|||
{
|
||||
int etp_state;
|
||||
int etp_flags;
|
||||
int etp_task;
|
||||
endpoint_t etp_task;
|
||||
int etp_port;
|
||||
int etp_recvconf;
|
||||
int etp_send_ev;
|
||||
|
|
|
@ -97,10 +97,10 @@ FORWARD _PROTOTYPE ( int walk_queue, (sr_fd_t *sr_fd, mq_t **q_head_ptr,
|
|||
FORWARD _PROTOTYPE ( void process_req_q, (mq_t *mq, mq_t *tail,
|
||||
mq_t **tail_ptr) );
|
||||
FORWARD _PROTOTYPE ( void sr_event, (event_t *evp, ev_arg_t arg) );
|
||||
FORWARD _PROTOTYPE ( int cp_u2b, (int proc, int gid, vir_bytes offset,
|
||||
acc_t **var_acc_ptr, int size) );
|
||||
FORWARD _PROTOTYPE ( int cp_b2u, (acc_t *acc_ptr, int proc, int gid,
|
||||
vir_bytes offset) );
|
||||
FORWARD _PROTOTYPE ( int cp_u2b, (endpoint_t proc, cp_grant_id_t gid,
|
||||
vir_bytes offset, acc_t **var_acc_ptr, int size) );
|
||||
FORWARD _PROTOTYPE ( int cp_b2u, (acc_t *acc_ptr, endpoint_t proc,
|
||||
cp_grant_id_t gid, vir_bytes offset) );
|
||||
|
||||
PUBLIC void sr_init()
|
||||
{
|
||||
|
@ -809,9 +809,7 @@ int for_ioctl;
|
|||
(int)(*head_ptr)->mq_mess.IO_GRANT, offset);
|
||||
}
|
||||
|
||||
PRIVATE void sr_select_res(fd, ops)
|
||||
int fd;
|
||||
unsigned ops;
|
||||
PRIVATE void sr_select_res(int fd, unsigned ops)
|
||||
{
|
||||
sr_fd_t *sr_fd;
|
||||
|
||||
|
@ -891,8 +889,8 @@ ev_arg_t arg;
|
|||
}
|
||||
|
||||
PRIVATE int cp_u2b(proc, gid, offset, var_acc_ptr, size)
|
||||
int proc;
|
||||
int gid;
|
||||
endpoint_t proc;
|
||||
cp_grant_id_t gid;
|
||||
vir_bytes offset;
|
||||
acc_t **var_acc_ptr;
|
||||
int size;
|
||||
|
@ -955,8 +953,8 @@ int size;
|
|||
|
||||
PRIVATE int cp_b2u(acc_ptr, proc, gid, offset)
|
||||
acc_t *acc_ptr;
|
||||
int proc;
|
||||
int gid;
|
||||
endpoint_t proc;
|
||||
cp_grant_id_t gid;
|
||||
vir_bytes offset;
|
||||
{
|
||||
acc_t *acc;
|
||||
|
|
|
@ -13,7 +13,7 @@ typedef struct sr_fd
|
|||
int srf_flags;
|
||||
int srf_fd;
|
||||
int srf_port;
|
||||
int srf_select_proc;
|
||||
endpoint_t srf_select_proc;
|
||||
sr_open_t srf_open;
|
||||
sr_close_t srf_close;
|
||||
sr_write_t srf_write;
|
||||
|
|
|
@ -117,7 +117,7 @@ PRIVATE void sef_local_startup()
|
|||
/*===========================================================================*
|
||||
* sef_cb_init_fresh *
|
||||
*===========================================================================*/
|
||||
PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
|
||||
PRIVATE int sef_cb_init_fresh(int UNUSED(type), sef_init_info_t *UNUSED(info))
|
||||
{
|
||||
/* Initialize the ipc server. */
|
||||
|
||||
|
|
|
@ -11,10 +11,10 @@
|
|||
#include <minix/endpoint.h>
|
||||
|
||||
/* Allocate space for the global variables. */
|
||||
message m_in; /* the input message itself */
|
||||
message m_out; /* the output message used for reply */
|
||||
int who_e; /* caller's proc number */
|
||||
int callnr; /* system call number */
|
||||
PRIVATE message m_in; /* the input message itself */
|
||||
PRIVATE message m_out; /* the output message used for reply */
|
||||
PRIVATE endpoint_t who_e; /* caller's proc number */
|
||||
PRIVATE int callnr; /* system call number */
|
||||
|
||||
extern int errno; /* error number set by system library */
|
||||
|
||||
|
|
|
@ -286,7 +286,7 @@ int flags; /* mode bits and flags */
|
|||
* gen_io *
|
||||
*===========================================================================*/
|
||||
PRIVATE int gen_io(task_nr, mess_ptr)
|
||||
int task_nr; /* which task to call */
|
||||
endpoint_t task_nr; /* which task to call */
|
||||
message *mess_ptr; /* pointer to message for task */
|
||||
{
|
||||
/* All file system I/O ultimately comes down to I/O on major/minor device
|
||||
|
@ -330,9 +330,7 @@ message *mess_ptr; /* pointer to message for task */
|
|||
/*===========================================================================*
|
||||
* dev_close *
|
||||
*===========================================================================*/
|
||||
PUBLIC void dev_close(driver_e, dev)
|
||||
endpoint_t driver_e;
|
||||
dev_t dev; /* device to close */
|
||||
PUBLIC void dev_close(endpoint_t driver_e, dev_t dev)
|
||||
{
|
||||
(void) gen_opcl(driver_e, DEV_CLOSE, dev, 0, 0);
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ FORWARD _PROTOTYPE( int sef_cb_init_fresh, (int type, sef_init_info_t *info) );
|
|||
* main *
|
||||
*===========================================================================*/
|
||||
PUBLIC int main(void) {
|
||||
int who_e, ind, error;
|
||||
endpoint_t who_e, ind, error;
|
||||
message m;
|
||||
|
||||
/* SEF local startup. */
|
||||
|
|
|
@ -18,7 +18,7 @@ _PROTOTYPE( int block_dev_io, (int op, Dev_t dev, int proc, void *buf,
|
|||
u64_t pos, int bytes, int flags) );
|
||||
_PROTOTYPE( int dev_open, (endpoint_t driver_e, Dev_t dev, int proc,
|
||||
int flags) );
|
||||
_PROTOTYPE( void dev_close, (endpoint_t driver_e, Dev_t dev) );
|
||||
_PROTOTYPE( void dev_close, (endpoint_t driver_e, dev_t dev) );
|
||||
_PROTOTYPE( int fs_new_driver, (void) );
|
||||
|
||||
/* inode.c */
|
||||
|
|
|
@ -8,18 +8,15 @@
|
|||
#include <minix/vfsif.h>
|
||||
|
||||
|
||||
FORWARD _PROTOTYPE(int stat_dir_record, (struct dir_record *dir, int pipe_pos,
|
||||
int who_e, cp_grant_id_t gid) );
|
||||
|
||||
|
||||
/*===========================================================================*
|
||||
* stat_dir_record *
|
||||
*===========================================================================*/
|
||||
PRIVATE int stat_dir_record(dir, pipe_pos, who_e, gid)
|
||||
register struct dir_record *dir; /* pointer to dir record to stat */
|
||||
int pipe_pos; /* position in a pipe, supplied by fstat() */
|
||||
int who_e; /* Caller endpoint */
|
||||
cp_grant_id_t gid; /* grant for the stat buf */
|
||||
PRIVATE int stat_dir_record(
|
||||
register struct dir_record *dir, /* pointer to dir record to stat */
|
||||
int pipe_pos, /* position in a pipe, supplied by fstat() */
|
||||
endpoint_t who_e, /* Caller endpoint */
|
||||
cp_grant_id_t gid /* grant for the stat buf */
|
||||
)
|
||||
{
|
||||
/* This function returns all the info about a particular inode. It's missing
|
||||
* the recording date because of a bug in the standard functions stdtime.
|
||||
|
|
|
@ -24,7 +24,7 @@ FORWARD _PROTOTYPE( void safe_io_cleanup, (cp_grant_id_t, cp_grant_id_t *,
|
|||
int));
|
||||
FORWARD _PROTOTYPE( int gen_opcl, (endpoint_t driver_e, int op,
|
||||
Dev_t dev, int proc_e, int flags) );
|
||||
FORWARD _PROTOTYPE( int gen_io, (int task_nr, message *mess_ptr) );
|
||||
FORWARD _PROTOTYPE( int gen_io, (endpoint_t task_nr, message *mess_ptr) );
|
||||
|
||||
|
||||
/*===========================================================================*
|
||||
|
@ -314,9 +314,10 @@ int flags; /* mode bits and flags */
|
|||
/*===========================================================================*
|
||||
* gen_io *
|
||||
*===========================================================================*/
|
||||
PRIVATE int gen_io(task_nr, mess_ptr)
|
||||
int task_nr; /* which task to call */
|
||||
message *mess_ptr; /* pointer to message for task */
|
||||
PRIVATE int gen_io(
|
||||
endpoint_t task_nr, /* which task to call */
|
||||
message *mess_ptr /* pointer to message for task */
|
||||
)
|
||||
{
|
||||
/* All file system I/O ultimately comes down to I/O on major/minor device
|
||||
* pairs. These lead to calls on the following routines via the dmap table.
|
||||
|
|
|
@ -167,9 +167,10 @@ message *m_in; /* pointer to message */
|
|||
/*===========================================================================*
|
||||
* reply *
|
||||
*===========================================================================*/
|
||||
PUBLIC void reply(who, m_out)
|
||||
int who;
|
||||
message *m_out; /* report result */
|
||||
PUBLIC void reply(
|
||||
endpoint_t who,
|
||||
message *m_out /* report result */
|
||||
)
|
||||
{
|
||||
if (OK != send(who, m_out)) /* send the message */
|
||||
printf("MFS(%d) was unable to send reply\n", SELF_E);
|
||||
|
|
|
@ -52,7 +52,7 @@ _PROTOTYPE( int fs_unlink, (void) );
|
|||
_PROTOTYPE( int truncate_inode, (struct inode *rip, off_t len) );
|
||||
|
||||
/* main.c */
|
||||
_PROTOTYPE( void reply, (int who, message *m_out) );
|
||||
_PROTOTYPE( void reply, (endpoint_t who, message *m_out) );
|
||||
|
||||
/* misc.c */
|
||||
_PROTOTYPE( int fs_flush, (void) );
|
||||
|
|
|
@ -8,17 +8,15 @@
|
|||
#include "super.h"
|
||||
#include <minix/vfsif.h>
|
||||
|
||||
FORWARD _PROTOTYPE( int stat_inode, (struct inode *rip, int who_e,
|
||||
cp_grant_id_t gid) );
|
||||
|
||||
|
||||
/*===========================================================================*
|
||||
* stat_inode *
|
||||
*===========================================================================*/
|
||||
PRIVATE int stat_inode(rip, who_e, gid)
|
||||
register struct inode *rip; /* pointer to inode to stat */
|
||||
int who_e; /* Caller endpoint */
|
||||
cp_grant_id_t gid; /* grant for the stat buf */
|
||||
PRIVATE int stat_inode(
|
||||
register struct inode *rip, /* pointer to inode to stat */
|
||||
endpoint_t who_e, /* Caller endpoint */
|
||||
cp_grant_id_t gid /* grant for the stat buf */
|
||||
)
|
||||
{
|
||||
/* Common code for stat and fstat system calls. */
|
||||
|
||||
|
|
|
@ -2,17 +2,15 @@
|
|||
#include "inode.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
FORWARD _PROTOTYPE( int stat_inode, (struct inode *rip, int who_e,
|
||||
cp_grant_id_t gid) );
|
||||
|
||||
|
||||
/*===========================================================================*
|
||||
* stat_inode *
|
||||
*===========================================================================*/
|
||||
PRIVATE int stat_inode(rip, who_e, gid)
|
||||
register struct inode *rip; /* pointer to inode to stat */
|
||||
int who_e; /* Caller endpoint */
|
||||
cp_grant_id_t gid; /* grant for the stat buf */
|
||||
PRIVATE int stat_inode(
|
||||
register struct inode *rip, /* pointer to inode to stat */
|
||||
endpoint_t who_e, /* Caller endpoint */
|
||||
cp_grant_id_t gid /* grant for the stat buf */
|
||||
)
|
||||
{
|
||||
/* Common code for stat and fstat system calls. */
|
||||
|
||||
|
|
Loading…
Reference in a new issue