Project

General

Profile

Bug #6 ยป sys.emulation.diff

slynko, 12/09/2005 07:42 AM

View differences:

ibcs2/i386/ibcs2_fcntl.c 8 Dec 2005 22:31:33 -0000
static int ioflags2oflags (int);
static int
cvt_o_flags(flags)
int flags;
cvt_o_flags(int flags)
{
int r = 0;
......
}
static void
cvt_flock2iflock(flp, iflp)
struct flock *flp;
struct ibcs2_flock *iflp;
cvt_flock2iflock(struct flock *flp, struct ibcs2_flock *iflp)
{
switch (flp->l_type) {
case F_RDLCK:
......
#endif
static void
cvt_iflock2flock(iflp, flp)
struct ibcs2_flock *iflp;
struct flock *flp;
cvt_iflock2flock(struct ibcs2_flock *iflp, struct flock *flp)
{
flp->l_start = (off_t)iflp->l_start;
flp->l_len = (off_t)iflp->l_len;
......
/* convert iBCS2 mode into NetBSD mode */
static int
ioflags2oflags(flags)
int flags;
ioflags2oflags(int flags)
{
int r = 0;
......
/* convert NetBSD mode into iBCS2 mode */
static int
oflags2ioflags(flags)
int flags;
oflags2ioflags(int flags)
{
int r = 0;
ibcs2/i386/ibcs2_ioctl.c 8 Dec 2005 22:34:33 -0000
};
static void
stios2btios(st, bt)
struct ibcs2_termios *st;
struct termios *bt;
stios2btios(struct ibcs2_termios *st, struct termios *bt)
{
u_long l, r;
......
}
static void
btios2stios(bt, st)
struct termios *bt;
struct ibcs2_termios *st;
btios2stios(struct termios *bt, struct ibcs2_termios *st)
{
u_long l, r;
......
}
static void
stios2stio(ts, t)
struct ibcs2_termios *ts;
struct ibcs2_termio *t;
stios2stio(struct ibcs2_termios *ts, struct ibcs2_termio *t)
{
t->c_iflag = ts->c_iflag;
t->c_oflag = ts->c_oflag;
......
}
static void
stio2stios(t, ts)
struct ibcs2_termio *t;
struct ibcs2_termios *ts;
stio2stios(struct ibcs2_termio *t, struct ibcs2_termios *ts)
{
ts->c_iflag = t->c_iflag;
ts->c_oflag = t->c_oflag;
ibcs2/i386/ibcs2_ipc.c 8 Dec 2005 22:29:14 -0000
*/
static void
cvt_msqid2imsqid(bp, ibp)
struct msqid_ds *bp;
struct ibcs2_msqid_ds *ibp;
cvt_msqid2imsqid(struct msqid_ds *bp, struct ibcs2_msqid_ds *ibp)
{
cvt_perm2iperm(&bp->msg_perm, &ibp->msg_perm);
ibp->msg_first = bp->msg_first;
......
}
static void
cvt_imsqid2msqid(ibp, bp)
struct ibcs2_msqid_ds *ibp;
struct msqid_ds *bp;
cvt_imsqid2msqid(struct ibcs2_msqid_ds *ibp, struct msqid_ds *bp)
{
cvt_iperm2perm(&ibp->msg_perm, &bp->msg_perm);
bp->msg_first = ibp->msg_first;
......
*/
#ifdef unused
static void
cvt_sem2isem(bp, ibp)
struct sem *bp;
struct ibcs2_sem *ibp;
cvt_sem2isem(struct sem *bp, struct ibcs2_sem *ibp)
{
ibp->semval = bp->semval;
ibp->sempid = bp->sempid;
......
}
static void
cvt_isem2sem(ibp, bp)
struct ibcs2_sem *ibp;
struct sem *bp;
cvt_isem2sem(struct ibcs2_sem *ibp, struct sem *bp)
{
bp->semval = ibp->semval;
bp->sempid = ibp->sempid;
......
#endif
static void
cvt_iperm2perm(ipp, pp)
struct ibcs2_ipc_perm *ipp;
struct ipc_perm *pp;
cvt_iperm2perm(struct ibcs2_ipc_perm *ipp, struct ipc_perm *pp)
{
pp->uid = ipp->uid;
pp->gid = ipp->gid;
......
}
static void
cvt_perm2iperm(pp, ipp)
struct ipc_perm *pp;
struct ibcs2_ipc_perm *ipp;
cvt_perm2iperm(struct ipc_perm *pp, struct ibcs2_ipc_perm *ipp)
{
ipp->uid = pp->uid;
ipp->gid = pp->gid;
......
}
static void
cvt_semid2isemid(bp, ibp)
struct semid_ds *bp;
struct ibcs2_semid_ds *ibp;
cvt_semid2isemid(struct semid_ds *bp, struct ibcs2_semid_ds *ibp)
{
cvt_perm2iperm(&bp->sem_perm, &ibp->sem_perm);
ibp->sem_base = (struct ibcs2_sem *)bp->sem_base;
......
}
static void
cvt_isemid2semid(ibp, bp)
struct ibcs2_semid_ds *ibp;
struct semid_ds *bp;
cvt_isemid2semid(struct ibcs2_semid_ds *ibp, struct semid_ds *bp)
{
cvt_iperm2perm(&ibp->sem_perm, &bp->sem_perm);
bp->sem_base = (struct sem *)ibp->sem_base;
......
*/
static void
cvt_shmid2ishmid(bp, ibp)
struct shmid_ds *bp;
struct ibcs2_shmid_ds *ibp;
cvt_shmid2ishmid(struct shmid_ds *bp, struct ibcs2_shmid_ds *ibp)
{
cvt_perm2iperm(&bp->shm_perm, &ibp->shm_perm);
ibp->shm_segsz = bp->shm_segsz;
......
}
static void
cvt_ishmid2shmid(ibp, bp)
struct ibcs2_shmid_ds *ibp;
struct shmid_ds *bp;
cvt_ishmid2shmid(struct ibcs2_shmid_ds *ibp, struct shmid_ds *bp)
{
cvt_iperm2perm(&ibp->shm_perm, &bp->shm_perm);
bp->shm_segsz = ibp->shm_segsz;
ibcs2/i386/ibcs2_signal.c 8 Dec 2005 22:33:14 -0000
};
void
ibcs2_to_bsd_sigset(iss, bss)
const ibcs2_sigset_t *iss;
sigset_t *bss;
ibcs2_to_bsd_sigset(const ibcs2_sigset_t *iss, sigset_t *bss)
{
int i, newsig;
......
}
static void
bsd_to_ibcs2_sigset(bss, iss)
const sigset_t *bss;
ibcs2_sigset_t *iss;
bsd_to_ibcs2_sigset(const sigset_t *bss, ibcs2_sigset_t *iss)
{
int i, newsig;
......
}
static void
ibcs2_to_bsd_sigaction(isa, bsa)
struct ibcs2_sigaction *isa;
struct sigaction *bsa;
ibcs2_to_bsd_sigaction(struct ibcs2_sigaction *isa,
struct sigaction *bsa)
{
bsa->sa_handler = isa->isa_handler;
......
}
static void
bsd_to_ibcs2_sigaction(bsa, isa)
struct sigaction *bsa;
struct ibcs2_sigaction *isa;
bsd_to_ibcs2_sigaction(struct sigaction *bsa,
struct ibcs2_sigaction *isa)
{
isa->isa_handler = bsa->sa_handler;
ibcs2/i386/ibcs2_stat.c 8 Dec 2005 22:30:14 -0000
static int cvt_statfs (struct statfs *, caddr_t, int);
static void
bsd_stat2ibcs_stat(st, st4)
struct stat *st;
struct ibcs2_stat *st4;
bsd_stat2ibcs_stat(struct stat *st, struct ibcs2_stat *st4)
{
bzero(st4, sizeof(*st4));
st4->st_dev = (ibcs2_dev_t)st->st_dev;
......
}
static int
cvt_statfs(sp, buf, len)
struct statfs *sp;
caddr_t buf;
int len;
cvt_statfs(struct statfs *sp, caddr_t buf, int len)
{
struct ibcs2_statfs ssfs;
ibcs2/i386/ibcs2_util.c 9 Dec 2005 00:07:43 -0000
* If cflag is set, we check if an attempt can be made to create
* the named file, i.e. we check if the directory it should
* be in exists.
*
* Parameters:
* sgp: Pointer to stackgap memory
*/
int
ibcs2_emul_find(sgp, prefix, path, pbuf, cflag)
caddr_t *sgp; /* Pointer to stackgap memory */
const char *prefix;
char *path;
char **pbuf;
int cflag;
ibcs2_emul_find(caddr_t *sgp, const char *prefix, char *path,
char **pbuf, int cflag)
{
struct nlookupdata nd;
struct nlookupdata ndroot;
ibcs2/i386/ibcs2_util.h 8 Dec 2005 22:26:29 -0000
static __inline void *stackgap_alloc(caddr_t *, size_t);
static __inline caddr_t
stackgap_init()
stackgap_init(void)
{
#define szsigcode (*(curproc->p_sysent->sv_szsigcode))
return (caddr_t)(PS_STRINGS - szsigcode - SPARE_USRSPACE);
}
static __inline void *
stackgap_alloc(sgp, sz)
caddr_t *sgp;
size_t sz;
stackgap_alloc(caddr_t *sgp, size_t sz)
{
void *p = (void *) *sgp;
*sgp += ALIGN(sz);
linux/linux_util.h 8 Dec 2005 22:35:17 -0000
#define szsigcode(p) (*((p)->p_sysent->sv_szsigcode))
static __inline caddr_t
stackgap_init()
stackgap_init(void)
{
return (caddr_t)(PS_STRINGS - szsigcode(curproc) - SPARE_USRSPACE);
}
static __inline void *
stackgap_alloc(sgp, sz)
caddr_t *sgp;
size_t sz;
stackgap_alloc(caddr_t *sgp, size_t sz)
{
void *p = (void *) *sgp;
linux/i386/imgact_linux.c 8 Dec 2005 22:36:55 -0000
static int exec_linux_imgact (struct image_params *iparams);
static int
exec_linux_imgact(imgp)
struct image_params *imgp;
exec_linux_imgact(struct image_params *imgp)
{
const struct exec *a_out = (const struct exec *) imgp->image_header;
struct vmspace *vmspace;
linux/i386/linux_sysvec.c 8 Dec 2005 22:36:16 -0000
static int exec_linux_imgact_try (struct image_params *iparams);
static int
exec_linux_imgact_try(imgp)
struct image_params *imgp;
exec_linux_imgact_try(struct image_params *imgp)
{
const char *head = (const char *)imgp->image_header;
int error = -1;
linux/i386/linprocfs/linprocfs_misc.c 8 Dec 2005 22:40:57 -0000
#define P2K(x) ((x) << (PAGE_SHIFT - 10)) /* pages to kbytes */
int
linprocfs_domeminfo(curp, p, pfs, uio)
struct proc *curp;
struct proc *p;
struct pfsnode *pfs;
struct uio *uio;
linprocfs_domeminfo(struct proc *curp, struct proc *p, struct pfsnode *pfs,
struct uio *uio)
{
char *ps;
char psbuf[512]; /* XXX - conservative */
......
}
int
linprocfs_docpuinfo(curp, p, pfs, uio)
struct proc *curp;
struct proc *p;
struct pfsnode *pfs;
struct uio *uio;
linprocfs_docpuinfo(struct proc *curp, struct proc *p, struct pfsnode *pfs,
struct uio *uio)
{
char *ps;
char psbuf[512]; /* XXX - conservative */
......
}
int
linprocfs_dostat(curp, p, pfs, uio)
struct proc *curp;
struct proc *p;
struct pfsnode *pfs;
struct uio *uio;
linprocfs_dostat(struct proc *curp, struct proc *p, struct pfsnode *pfs,
struct uio *uio)
{
char *ps;
char psbuf[512];
......
}
int
linprocfs_douptime(curp, p, pfs, uio)
struct proc *curp;
struct proc *p;
struct pfsnode *pfs;
struct uio *uio;
linprocfs_douptime(struct proc *curp, struct proc *p, struct pfsnode *pfs,
struct uio *uio)
{
char *ps;
char psbuf[64];
......
}
int
linprocfs_doversion(curp, p, pfs, uio)
struct proc *curp;
struct proc *p;
struct pfsnode *pfs;
struct uio *uio;
linprocfs_doversion(struct proc *curp, struct proc *p, struct pfsnode *pfs,
struct uio *uio)
{
char *ps;
int xlen;
......
}
int
linprocfs_doprocstat(curp, p, pfs, uio)
struct proc *curp;
struct proc *p;
struct pfsnode *pfs;
struct uio *uio;
linprocfs_doprocstat(struct proc *curp, struct proc *p, struct pfsnode *pfs,
struct uio *uio)
{
char *ps, psbuf[1024];
......
};
int
linprocfs_doprocstatus(curp, p, pfs, uio)
struct proc *curp;
struct proc *p;
struct pfsnode *pfs;
struct uio *uio;
linprocfs_doprocstatus(struct proc *curp, struct proc *p, struct pfsnode *pfs,
struct uio *uio)
{
char *ps, psbuf[1024];
char *state;
linux/i386/linprocfs/linprocfs_subr.c 8 Dec 2005 22:42:37 -0000
* the vnode free list.
*/
int
linprocfs_allocvp(mp, vpp, pid, pfs_type)
struct mount *mp;
struct vnode **vpp;
long pid;
pfstype pfs_type;
linprocfs_allocvp(struct mount *mp, struct vnode **vpp, long pid,
pfstype pfs_type)
{
struct thread *td = curthread; /* XXX */
struct pfsnode *pfs;
......
}
int
linprocfs_freevp(vp)
struct vnode *vp;
linprocfs_freevp(struct vnode *vp)
{
struct pfsnode **pfspp;
struct pfsnode *pfs = VTOPFS(vp);
......
}
int
linprocfs_rw(ap)
struct vop_read_args *ap;
linprocfs_rw(struct vop_read_args *ap)
{
struct vnode *vp = ap->a_vp;
struct uio *uio = ap->a_uio;
......
* EFAULT: user i/o buffer is not addressable
*/
int
vfs_getuserstr(uio, buf, buflenp)
struct uio *uio;
char *buf;
int *buflenp;
vfs_getuserstr(struct uio *uio, char *buf, int *buflenp)
{
int xlen;
int error;
......
}
vfs_namemap_t *
vfs_findname(nm, buf, buflen)
vfs_namemap_t *nm;
char *buf;
int buflen;
vfs_findname(vfs_namemap_t *nm, char *buf, int buflen)
{
for (; nm->nm_name; nm++)
linux/i386/linprocfs/linprocfs_vfsops.c 8 Dec 2005 22:44:19 -0000
*/
/* ARGSUSED */
static int
linprocfs_mount(mp, path, data, td)
struct mount *mp;
char *path;
caddr_t data;
struct thread *td;
linprocfs_mount(struct mount *mp, char *path, caddr_t data, struct thread *td)
{
size_t size;
int error;
......
* unmount system call
*/
static int
linprocfs_unmount(mp, mntflags, td)
struct mount *mp;
int mntflags;
struct thread *td;
linprocfs_unmount(struct mount *mp, int mntflags, struct thread *td)
{
int error;
int flags = 0;
......
}
int
linprocfs_root(mp, vpp)
struct mount *mp;
struct vnode **vpp;
linprocfs_root(struct mount *mp, struct vnode **vpp)
{
return (linprocfs_allocvp(mp, vpp, 0, Proot));
......
* Get file system statistics.
*/
static int
linprocfs_statfs(mp, sbp, td)
struct mount *mp;
struct statfs *sbp;
struct thread *td;
linprocfs_statfs(struct mount *mp, struct statfs *sbp, struct thread *td)
{
sbp->f_bsize = PAGE_SIZE;
sbp->f_iosize = PAGE_SIZE;
linux/i386/linprocfs/linprocfs_vnops.c 8 Dec 2005 22:47:52 -0000
* memory images.
*/
static int
linprocfs_open(ap)
struct vop_open_args /* {
struct vnode *a_vp;
int a_mode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
linprocfs_open(struct vop_open_args *ap)
{
struct pfsnode *pfs = VTOPFS(ap->a_vp);
struct proc *p2;
......
* any exclusive open flag (see _open above).
*/
static int
linprocfs_close(ap)
struct vop_close_args /* {
struct vnode *a_vp;
int a_fflag;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
linprocfs_close(struct vop_close_args *ap)
{
struct pfsnode *pfs = VTOPFS(ap->a_vp);
struct proc *p;
......
* (vp) is not locked on entry or exit.
*/
static int
linprocfs_ioctl(ap)
struct vop_ioctl_args *ap;
linprocfs_ioctl(struct vop_ioctl_args *ap)
{
struct pfsnode *pfs = VTOPFS(ap->a_vp);
struct proc *procp;
......
* (EIO) would be a reasonable alternative.
*/
static int
linprocfs_bmap(ap)
struct vop_bmap_args /* {
struct vnode *a_vp;
daddr_t a_bn;
struct vnode **a_vpp;
daddr_t *a_bnp;
int *a_runp;
} */ *ap;
linprocfs_bmap(struct vop_bmap_args *ap)
{
if (ap->a_vpp != NULL)
......
* on exit.
*/
static int
linprocfs_inactive(ap)
struct vop_inactive_args /* {
struct vnode *a_vp;
} */ *ap;
linprocfs_inactive(struct vop_inactive_args *ap)
{
/*struct vnode *vp = ap->a_vp;*/
......
* from any private lists.
*/
static int
linprocfs_reclaim(ap)
struct vop_reclaim_args /* {
struct vnode *a_vp;
} */ *ap;
linprocfs_reclaim(struct vop_reclaim_args *ap)
{
return (linprocfs_freevp(ap->a_vp));
}
......
* of (vp).
*/
static int
linprocfs_print(ap)
struct vop_print_args /* {
struct vnode *a_vp;
} */ *ap;
linprocfs_print(struct vop_print_args *ap)
{
struct pfsnode *pfs = VTOPFS(ap->a_vp);
......
* generic entry point for unsupported operations
*/
static int
linprocfs_badop()
linprocfs_badop(void)
{
return (EIO);
......
* this is relatively minimal for procfs.
*/
static int
linprocfs_getattr(ap)
struct vop_getattr_args /* {
struct vnode *a_vp;
struct vattr *a_vap;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
linprocfs_getattr(struct vop_getattr_args *ap)
{
struct pfsnode *pfs = VTOPFS(ap->a_vp);
struct vattr *vap = ap->a_vap;
......
}
static int
linprocfs_setattr(ap)
struct vop_setattr_args /* {
struct vnode *a_vp;
struct vattr *a_vap;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
linprocfs_setattr(struct vop_setattr_args *ap)
{
if (ap->a_vap->va_flags != VNOVAL)
......
* that the operation really does make sense.
*/
static int
linprocfs_access(ap)
struct vop_access_args /* {
struct vnode *a_vp;
int a_mode;
struct ucred *a_cred;
struct thread *a_td;
} */ *ap;
linprocfs_access(struct vop_access_args *ap)
{
struct vattr *vap;
struct vattr vattr;
......
* for most pseudo-filesystems very little needs to be done.
*/
static int
linprocfs_lookup(ap)
struct vop_old_lookup_args /* {
struct vnode * a_dvp;
struct vnode ** a_vpp;
struct componentname * a_cnp;
} */ *ap;
linprocfs_lookup(struct vop_old_lookup_args *ap)
{
struct componentname *cnp = ap->a_cnp;
struct vnode **vpp = ap->a_vpp;
......
* Does this process have a text file?
*/
int
linprocfs_validfile(p)
struct proc *p;
linprocfs_validfile(struct proc *p)
{
return (procfs_findtextvp(p) != NULLVP);
......
* readlink reads the link of `self' or `exe'
*/
static int
linprocfs_readlink(ap)
struct vop_readlink_args *ap;
linprocfs_readlink(struct vop_readlink_args *ap)
{
char buf[16]; /* should be enough */
struct proc *procp;
......
* convert decimal ascii to pid_t
*/
static pid_t
atopid(b, len)
const char *b;
u_int len;
atopid(const char *b, u_int len)
{
pid_t p = 0;
......
{ &vop_ioctl_desc, (void *) linprocfs_ioctl },
{ NULL, NULL }
};
ndis/kern_ndis.c 9 Dec 2005 07:16:00 -0000
*/
static void
ndis_runq(arg)
void *arg;
ndis_runq(void *arg)
{
struct ndis_req *r = NULL, *die = NULL;
struct ndisproc *p;
......
}
static int
ndis_create_kthreads()
ndis_create_kthreads(void)
{
struct ndis_req *r;
int i, error = 0;
......
}
static void
ndis_destroy_kthreads()
ndis_destroy_kthreads(void)
{
struct ndis_req *r;
......
}
static void
ndis_stop_thread(t)
int t;
ndis_stop_thread(int t)
{
struct ndis_req *r;
struct ndisqhead *q;
......
}
static int
ndis_enlarge_thrqueue(cnt)
int cnt;
ndis_enlarge_thrqueue(int cnt)
{
struct ndis_req *r;
int i;
......
}
static int
ndis_shrink_thrqueue(cnt)
int cnt;
ndis_shrink_thrqueue(int cnt)
{
struct ndis_req *r;
int i;
......
}
int
ndis_unsched(func, arg, t)
void (*func)(void *);
void *arg;
int t;
ndis_unsched(void (*func)(void *), void *arg, int t)
{
struct ndis_req *r;
struct ndisqhead *q;
......
}
int
ndis_sched(func, arg, t)
void (*func)(void *);
void *arg;
int t;
ndis_sched(void (*func)(void *), void *arg, int t)
{
struct ndis_req *r;
struct ndisqhead *q;
......
}
int
ndis_thsuspend(td, timo)
thread_t td;
int timo;
ndis_thsuspend(thread_t td, int timo)
{
int error;
......
}
void
ndis_thresume(td)
struct thread *td;
ndis_thresume(struct thread *td)
{
wakeup(td);
}
__stdcall static void
ndis_sendrsrcavail_func(adapter)
ndis_handle adapter;
ndis_sendrsrcavail_func(ndis_handle adapter)
{
return;
}
__stdcall static void
ndis_status_func(adapter, status, sbuf, slen)
ndis_handle adapter;
ndis_status status;
void *sbuf;
uint32_t slen;
ndis_status_func(ndis_handle adapter, ndis_status status, void *sbuf,
uint32_t slen)
{
ndis_miniport_block *block;
block = adapter;
......
}
__stdcall static void
ndis_statusdone_func(adapter)
ndis_handle adapter;
ndis_statusdone_func(ndis_handle adapter)
{
ndis_miniport_block *block;
block = adapter;
......
}
__stdcall static void
ndis_setdone_func(adapter, status)
ndis_handle adapter;
ndis_status status;
ndis_setdone_func(ndis_handle adapter, ndis_status status)
{
ndis_miniport_block *block;
block = adapter;
......
}
__stdcall static void
ndis_getdone_func(adapter, status)
ndis_handle adapter;
ndis_status status;
ndis_getdone_func(ndis_handle adapter, ndis_status status)
{
ndis_miniport_block *block;
block = adapter;
......
}
__stdcall static void
ndis_resetdone_func(adapter, status, addressingreset)
ndis_handle adapter;
ndis_status status;
uint8_t addressingreset;
ndis_resetdone_func(ndis_handle adapter, ndis_status status,
uint8_t addressingreset)
{
ndis_miniport_block *block;
block = adapter;
......
}
int
ndis_create_sysctls(arg)
void *arg;
ndis_create_sysctls(void *arg)
{
struct ndis_softc *sc;
ndis_cfg *vals;
......
}
int
ndis_add_sysctl(arg, key, desc, val, flag)
void *arg;
char *key;
char *desc;
char *val;
int flag;
ndis_add_sysctl(void *arg, char *key, char *desc, char *val, int flag)
{
struct ndis_softc *sc;
struct ndis_cfglist *cfg;
......
}
int
ndis_flush_sysctls(arg)
void *arg;
ndis_flush_sysctls(void *arg)
{
struct ndis_softc *sc;
struct ndis_cfglist *cfg;
......
}
static void
ndis_return(arg)
void *arg;
ndis_return(void *arg)
{
struct ndis_softc *sc;
ndis_return_handler returnfunc;
......
}
void
ndis_free_bufs(b0)
ndis_buffer *b0;
ndis_free_bufs(ndis_buffer *b0)
{
ndis_buffer *next;
......
}
void
ndis_free_packet(p)
ndis_packet *p;
ndis_free_packet(ndis_packet *p)
{
if (p == NULL)
return;
......
}
int
ndis_convert_res(arg)
void *arg;
ndis_convert_res(void *arg)
{
struct ndis_softc *sc;
ndis_resource_list *rl = NULL;
......
*/
int
ndis_ptom(m0, p)
struct mbuf **m0;
ndis_packet *p;
ndis_ptom(struct mbuf **m0, ndis_packet *p)
{
struct mbuf *m, *prev = NULL;
ndis_buffer *buf;
......
*/
int
ndis_mtop(m0, p)
struct mbuf *m0;
ndis_packet **p;
ndis_mtop(struct mbuf *m0, ndis_packet **p)
{
struct mbuf *m;
ndis_buffer *buf = NULL, *prev = NULL;
......
}
int
ndis_get_supported_oids(arg, oids, oidcnt)
void *arg;
ndis_oid **oids;
int *oidcnt;
ndis_get_supported_oids(void *arg, ndis_oid **oids, int *oidcnt)
{
int len, rval;
ndis_oid *o;
......
}
int
ndis_set_info(arg, oid, buf, buflen)
void *arg;
ndis_oid oid;
void *buf;
int *buflen;
ndis_set_info(void *arg, ndis_oid oid, void *buf, int *buflen)
{
struct ndis_softc *sc;
ndis_status rval;
......
typedef __stdcall void (*ndis_senddone_func)(ndis_handle, ndis_packet *, ndis_status);
int
ndis_send_packets(arg, packets, cnt)
void *arg;
ndis_packet **packets;
int cnt;
ndis_send_packets(void *arg, ndis_packet **packets, int cnt)
{
struct ndis_softc *sc;
ndis_handle adapter;
......
}
int
ndis_send_packet(arg, packet)
void *arg;
ndis_packet *packet;
ndis_send_packet(void *arg, ndis_packet *packet)
{
struct ndis_softc *sc;
ndis_handle adapter;
......
}
int
ndis_init_dma(arg)
void *arg;
ndis_init_dma(void *arg)
{
struct ndis_softc *sc;
int i, error;
......
}
int
ndis_destroy_dma(arg)
void *arg;
ndis_destroy_dma(void *arg)
{
struct ndis_softc *sc;
struct mbuf *m;
......
}
int
ndis_reset_nic(arg)
void *arg;
ndis_reset_nic(void *arg)
{
struct ndis_softc *sc;
ndis_handle adapter;
......
}
int
ndis_halt_nic(arg)
void *arg;
ndis_halt_nic(void *arg)
{
struct ndis_softc *sc;
ndis_handle adapter;
......
}
int
ndis_shutdown_nic(arg)
void *arg;
ndis_shutdown_nic(void *arg)
{
struct ndis_softc *sc;
ndis_handle adapter;
......
}
int
ndis_init_nic(arg)
void *arg;
ndis_init_nic(void *arg)
{
struct ndis_softc *sc;
ndis_miniport_block *block;
......
}
void
ndis_enable_intr(arg)
void *arg;
ndis_enable_intr(void *arg)
{
struct ndis_softc *sc;
ndis_handle adapter;
......
}
void
ndis_disable_intr(arg)
void *arg;
ndis_disable_intr(void *arg)
{
struct ndis_softc *sc;
ndis_handle adapter;
......
}
int
ndis_isr(arg, ourintr, callhandler)
void *arg;
int *ourintr;
int *callhandler;
ndis_isr(void *arg, int *ourintr, int *callhandler)
{
struct ndis_softc *sc;
ndis_handle adapter;
......
}
int
ndis_intrhand(arg)
void *arg;
ndis_intrhand(void *arg)
{
struct ndis_softc *sc;
ndis_handle adapter;
......
}
int
ndis_get_info(arg, oid, buf, buflen)
void *arg;
ndis_oid oid;
void *buf;
int *buflen;
ndis_get_info(void *arg, ndis_oid oid, void *buf, int *buflen)
{
struct ndis_softc *sc;
ndis_status rval;
......
}
int
ndis_unload_driver(arg)
void *arg;
ndis_unload_driver(void *arg)
{
struct ndis_softc *sc;
......
#define NDIS_LOADED htonl(0x42534F44)
int
ndis_load_driver(img, arg)
vm_offset_t img;
void *arg;
ndis_load_driver(vm_offset_t img, void *arg)
{
driver_entry entry;
image_optional_header opt_hdr;
ndis/subr_hal.c 9 Dec 2005 06:42:56 -0000
extern struct mtx_pool *ndis_mtxpool;
__stdcall static void
hal_stall_exec_cpu(usecs)
uint32_t usecs;
hal_stall_exec_cpu(uint32_t usecs)
{
DELAY(usecs);
return;
}
__stdcall static void
hal_writeport_ulong(port, val)
uint32_t *port;
uint32_t val;
hal_writeport_ulong(uint32_t *port, uint32_t val)
{
bus_space_write_4(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
return;
}
__stdcall static void
hal_writeport_ushort(port, val)
uint16_t *port;
uint16_t val;
hal_writeport_ushort(uint16_t *port, uint16_t val)
{
bus_space_write_2(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
return;
}
__stdcall static void
hal_writeport_uchar(port, val)
uint8_t *port;
uint8_t val;
hal_writeport_uchar(uint8_t *port, uint8_t val)
{
bus_space_write_1(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port, val);
return;
}
__stdcall static void
hal_writeport_buf_ulong(port, val, cnt)
uint32_t *port;
uint32_t *val;
uint32_t cnt;
hal_writeport_buf_ulong(uint32_t *port, uint32_t *val, uint32_t cnt)
{
bus_space_write_multi_4(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
......
}
__stdcall static void
hal_writeport_buf_ushort(port, val, cnt)
uint16_t *port;
uint16_t *val;
uint32_t cnt;
hal_writeport_buf_ushort(uint16_t *port, uint16_t *val, uint32_t cnt)
{
bus_space_write_multi_2(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
......
}
__stdcall static void
hal_writeport_buf_uchar(port, val, cnt)
uint8_t *port;
uint8_t *val;
uint32_t cnt;
hal_writeport_buf_uchar(uint8_t *port, uint8_t *val, uint32_t cnt)
{
bus_space_write_multi_1(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
......
}
__stdcall static uint16_t
hal_readport_ushort(port)
uint16_t *port;
hal_readport_ushort(uint16_t *port)
{
return(bus_space_read_2(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port));
}
__stdcall static uint32_t
hal_readport_ulong(port)
uint32_t *port;
hal_readport_ulong(uint32_t *port)
{
return(bus_space_read_4(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port));
}
__stdcall static uint8_t
hal_readport_uchar(port)
uint8_t *port;
hal_readport_uchar(uint8_t *port)
{
return(bus_space_read_1(NDIS_BUS_SPACE_IO, 0x0, (bus_size_t)port));
}
__stdcall static void
hal_readport_buf_ulong(port, val, cnt)
uint32_t *port;
uint32_t *val;
uint32_t cnt;
hal_readport_buf_ulong(uint32_t *port, uint32_t *val, uint32_t cnt)
{
bus_space_read_multi_4(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
......
}
__stdcall static void
hal_readport_buf_ushort(port, val, cnt)
uint16_t *port;
uint16_t *val;
uint32_t cnt;
hal_readport_buf_ushort(uint16_t *port, uint16_t *val, uint32_t cnt)
{
bus_space_read_multi_2(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
......
}
__stdcall static void
hal_readport_buf_uchar(port, val, cnt)
uint8_t *port;
uint8_t *val;
uint32_t cnt;
hal_readport_buf_uchar(uint8_t *port, uint8_t *val, uint32_t cnt)
{
bus_space_read_multi_1(NDIS_BUS_SPACE_IO, 0x0,
(bus_size_t)port, val, cnt);
......
}
__stdcall static uint64_t
hal_perfcount(freq)
uint64_t *freq;
hal_perfcount(uint64_t *freq)
{
if (freq != NULL)
*freq = hz;
......
}
__stdcall
static void dummy()
static void dummy(void)
{
printf ("hal dummy called...\n");
return;
ndis/subr_ndis.c 9 Dec 2005 00:17:22 -0000
#define NDIS_POOL_EXTRA 16
int
ndis_libinit()
ndis_libinit(void)
{
strcpy(ndis_filepath, "/compat/ndis");
return(0);
}
int
ndis_libfini()
ndis_libfini(void)
{
return(0);
}
......
*/
int
ndis_ascii_to_unicode(ascii, unicode)
char *ascii;
uint16_t **unicode;
ndis_ascii_to_unicode(char *ascii, uint16_t **unicode)
{
uint16_t *ustr;
int i;
... This diff was truncated because it exceeds the maximum size that can be displayed.
    (1-1/1)