lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around. kill some unnecessary type and macro definitions. standardize clock handling. More changes than you'd want.
This commit is contained in:
parent
c859ba3b1c
commit
a0a7429482
|
@ -26,7 +26,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: aha1742.c,v 1.30 1994/04/29 23:15:54 cgd Exp $
|
||||
* $Id: aha1742.c,v 1.31 1994/05/05 05:36:23 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -303,7 +303,7 @@ int ahb_find __P((struct ahb_softc *));
|
|||
void ahb_init __P((struct ahb_softc *));
|
||||
void ahbminphys __P((struct buf *));
|
||||
int ahb_scsi_cmd __P((struct scsi_xfer *));
|
||||
void ahb_timeout __P((caddr_t));
|
||||
void ahb_timeout __P((void *));
|
||||
void ahb_print_ecb __P((struct ecb *));
|
||||
void ahb_print_active_ecb __P((struct ahb_softc *));
|
||||
|
||||
|
@ -667,7 +667,7 @@ ahbintr(ahb)
|
|||
if ((ahb_debug & AHB_SHOWECBS) && ecb)
|
||||
printf("<int ecb(%x)>", ecb);
|
||||
#endif /*AHBDEBUG */
|
||||
untimeout((timeout_t)ahb_timeout, (caddr_t)ecb);
|
||||
untimeout(ahb_timeout, (caddr_t)ecb);
|
||||
ahb_done(ahb, ecb, stat != AHB_ECB_OK);
|
||||
}
|
||||
} while (inb(port + G2STAT) & G2STAT_INT_PEND);
|
||||
|
@ -1028,7 +1028,7 @@ ahb_scsi_cmd(xs)
|
|||
if (!(flags & SCSI_NOMASK)) {
|
||||
s = splbio();
|
||||
ahb_send_immed(ahb, sc_link->target, AHB_TARG_RESET);
|
||||
timeout((timeout_t)ahb_timeout, ecb,
|
||||
timeout(ahb_timeout, ecb,
|
||||
(xs->timeout * hz) / 1000);
|
||||
splx(s);
|
||||
return SUCCESSFULLY_QUEUED;
|
||||
|
@ -1165,7 +1165,7 @@ ahb_scsi_cmd(xs)
|
|||
if (!(flags & SCSI_NOMASK)) {
|
||||
s = splbio();
|
||||
ahb_send_mbox(ahb, OP_START_ECB, sc_link->target, ecb);
|
||||
timeout((timeout_t)ahb_timeout, ecb, (xs->timeout * hz) / 1000);
|
||||
timeout(ahb_timeout, ecb, (xs->timeout * hz) / 1000);
|
||||
splx(s);
|
||||
SC_DEBUG(sc_link, SDEV_DB3, ("cmd_sent\n"));
|
||||
return SUCCESSFULLY_QUEUED;
|
||||
|
@ -1197,10 +1197,10 @@ ahb_scsi_cmd(xs)
|
|||
|
||||
void
|
||||
ahb_timeout(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
struct ecb *ecb = (void *)arg;
|
||||
struct ecb *ecb = (struct ecb *)arg;
|
||||
struct ahb_softc *ahb = ecb->xs->sc_link->adapter_softc;
|
||||
|
||||
sc_print_addr(ecb->xs->sc_link);
|
||||
|
@ -1235,7 +1235,7 @@ ahb_timeout(arg)
|
|||
} else { /* abort the operation that has timed out */
|
||||
printf("\n");
|
||||
ahb_send_mbox(ahb, OP_ABORT_ECB, ecb->xs->sc_link->target, ecb);
|
||||
timeout((timeout_t)ahb_timeout, ecb, 2 * hz);
|
||||
timeout(ahb_timeout, ecb, 2 * hz);
|
||||
ecb->flags = ECB_ABORTED;
|
||||
}
|
||||
splx(s);
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.36 intentionally removed
|
||||
revision 1.37 intentionally removed
|
||||
|
|
|
@ -83,9 +83,9 @@ main()
|
|||
def("PDSHIFT", PDSHIFT);
|
||||
|
||||
def("P_ADDR", &p->p_addr);
|
||||
def("P_LINK", &p->p_link);
|
||||
def("P_PRI", &p->p_pri);
|
||||
def("P_RLINK", &p->p_rlink);
|
||||
def("P_BACK", &p->p_back);
|
||||
def("P_FORW", &p->p_forw);
|
||||
def("P_PRIORITY", &p->p_priority);
|
||||
def("P_STAT", &p->p_stat);
|
||||
def("P_WCHAN", &p->p_wchan);
|
||||
def("P_VMSPACE", &p->p_vmspace);
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)locore.s 7.3 (Berkeley) 5/13/91
|
||||
* $Id: locore.s,v 1.64 1994/04/18 01:24:09 mycroft Exp $
|
||||
* $Id: locore.s,v 1.65 1994/05/05 05:35:46 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1391,22 +1391,22 @@ ENTRY(longjmp)
|
|||
ENTRY(setrq)
|
||||
movl 4(%esp),%eax
|
||||
#ifdef DIAGNOSTIC
|
||||
cmpl $0,P_RLINK(%eax) # should not be on q already
|
||||
cmpl $0,P_BACK(%eax) # should not be on q already
|
||||
jne 1f
|
||||
cmpl $0,P_WCHAN(%eax)
|
||||
jne 1f
|
||||
cmpb $SRUN,P_STAT(%eax)
|
||||
jne 1f
|
||||
#endif
|
||||
movzbl P_PRI(%eax),%edx
|
||||
movzbl P_PRIORITY(%eax),%edx
|
||||
shrl $2,%edx
|
||||
btsl %edx,_whichqs # set q full bit
|
||||
leal _qs(,%edx,8),%edx # locate q hdr
|
||||
movl %edx,P_LINK(%eax) # link process on tail of q
|
||||
movl P_RLINK(%edx),%ecx
|
||||
movl %eax,P_RLINK(%edx)
|
||||
movl %ecx,P_RLINK(%eax)
|
||||
movl %eax,P_LINK(%ecx)
|
||||
movl %edx,P_FORW(%eax) # link process on tail of q
|
||||
movl P_BACK(%edx),%ecx
|
||||
movl %eax,P_BACK(%edx)
|
||||
movl %ecx,P_BACK(%eax)
|
||||
movl %eax,P_FORW(%ecx)
|
||||
ret
|
||||
#ifdef DIAGNOSTIC
|
||||
1: pushl $2f
|
||||
|
@ -1422,17 +1422,17 @@ ENTRY(setrq)
|
|||
ENTRY(remrq)
|
||||
pushl %esi
|
||||
movl 8(%esp),%esi
|
||||
movzbl P_PRI(%esi),%eax
|
||||
movzbl P_PRIORITY(%esi),%eax
|
||||
shrl $2,%eax
|
||||
#ifdef DIAGNOSTIC
|
||||
btl %eax,_whichqs
|
||||
jnc 1f
|
||||
#endif
|
||||
movl P_LINK(%esi),%ecx # unlink process
|
||||
movl P_RLINK(%esi),%edx
|
||||
movl %edx,P_RLINK(%ecx)
|
||||
movl %ecx,P_LINK(%edx)
|
||||
movl $0,P_RLINK(%esi) # zap reverse link to indicate off list
|
||||
movl P_FORW(%esi),%ecx # unlink process
|
||||
movl P_BACK(%esi),%edx
|
||||
movl %edx,P_BACK(%ecx)
|
||||
movl %ecx,P_FORW(%edx)
|
||||
movl $0,P_BACK(%esi) # zap reverse link to indicate off list
|
||||
cmpl %edx,%ecx # q still has something?
|
||||
jne 2f
|
||||
btrl %eax,_whichqs # no; clear bit
|
||||
|
@ -1510,20 +1510,20 @@ sw1: bsfl %ecx,%ebx # find a full q
|
|||
|
||||
leal _qs(,%ebx,8),%eax # select q
|
||||
|
||||
movl P_LINK(%eax),%edi # unlink from front of process q
|
||||
movl P_FORW(%eax),%edi # unlink from front of process q
|
||||
#ifdef DIAGNOSTIC
|
||||
cmpl %edi,%eax # linked to self (e.g. nothing queued)?
|
||||
je _swtch_error # not possible
|
||||
#endif
|
||||
movl P_LINK(%edi),%edx
|
||||
movl %edx,P_LINK(%eax)
|
||||
movl P_FORW(%edi),%edx
|
||||
movl %edx,P_FORW(%eax)
|
||||
|
||||
cmpl %edx,%eax # q empty
|
||||
jne 3f
|
||||
btrl %ebx,%ecx # yes, clear to indicate empty
|
||||
|
||||
3: movl P_RLINK(%edi),%eax
|
||||
movl %eax,P_RLINK(%edx)
|
||||
3: movl P_BACK(%edi),%eax
|
||||
movl %eax,P_BACK(%edx)
|
||||
|
||||
movl %ecx,_whichqs # update q status
|
||||
|
||||
|
@ -1539,7 +1539,7 @@ sw1: bsfl %ecx,%ebx # find a full q
|
|||
#endif
|
||||
|
||||
/* Isolate process. XXX Is this necessary? */
|
||||
movl %eax,P_RLINK(%edi)
|
||||
movl %eax,P_BACK(%edi)
|
||||
|
||||
/* It's okay to take interrupts here. */
|
||||
sti
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.101 1994/04/21 07:45:53 cgd Exp $
|
||||
* $Id: machdep.c,v 1.102 1994/05/05 05:35:48 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
|
@ -405,15 +405,15 @@ sendsig(catcher, sig, mask, code)
|
|||
int oonstack;
|
||||
extern char sigcode[], esigcode[];
|
||||
|
||||
tf = (struct trapframe *)p->p_regs;
|
||||
oonstack = ps->ps_onstack;
|
||||
tf = (struct trapframe *)p->p_md.md_regs;
|
||||
oonstack = ps->ps_sigstk.ss_onstack;
|
||||
/*
|
||||
* Allocate space for the signal handler context.
|
||||
*/
|
||||
if (!ps->ps_onstack && (ps->ps_sigonstack & sigmask(sig))) {
|
||||
fp = (struct sigframe *)(ps->ps_sigsp
|
||||
if (!ps->ps_sigstk.ss_onstack && (ps->ps_sigonstack & sigmask(sig))) {
|
||||
fp = (struct sigframe *)(ps->ps_sigstk.ss_sp
|
||||
- sizeof(struct sigframe));
|
||||
ps->ps_onstack = 1;
|
||||
ps->ps_sigstk.ss_onstack = 1;
|
||||
} else {
|
||||
fp = (struct sigframe *)tf->tf_esp - 1;
|
||||
}
|
||||
|
@ -532,7 +532,7 @@ sigreturn(p, uap, retval)
|
|||
register struct trapframe *tf;
|
||||
int eflags;
|
||||
|
||||
tf = (struct trapframe *)p->p_regs;
|
||||
tf = (struct trapframe *)p->p_md.md_regs;
|
||||
|
||||
/*
|
||||
* The trampoline code hands us the context.
|
||||
|
@ -568,7 +568,7 @@ sigreturn(p, uap, retval)
|
|||
return(EINVAL);
|
||||
}
|
||||
|
||||
p->p_sigacts->ps_onstack = context.sc_onstack & 01;
|
||||
p->p_sigacts->ps_sigstk.ss_onstack = context.sc_onstack & 01;
|
||||
p->p_sigmask = context.sc_mask &~
|
||||
(sigmask(SIGKILL)|sigmask(SIGCONT)|sigmask(SIGSTOP));
|
||||
|
||||
|
@ -757,7 +757,7 @@ setregs(p, entry, stack, retval)
|
|||
{
|
||||
register struct trapframe *tf;
|
||||
|
||||
tf = (struct trapframe *)p->p_regs;
|
||||
tf = (struct trapframe *)p->p_md.md_regs;
|
||||
tf->tf_ebp = 0; /* bottom of the fp chain */
|
||||
tf->tf_eip = entry;
|
||||
tf->tf_esp = stack;
|
||||
|
@ -957,6 +957,7 @@ init386(first_avail)
|
|||
extern char sigcode[], esigcode[];
|
||||
/* table descriptors - used to load tables by microp */
|
||||
struct region_descriptor r_gdt, r_idt;
|
||||
void consinit __P((void));
|
||||
|
||||
proc0.p_addr = proc0paddr;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* expediant "port" of linux 8087 emulator to 386BSD, with apologies -wfj
|
||||
*
|
||||
* $Id: math_emulate.c,v 1.8 1994/05/03 20:51:15 mycroft Exp $
|
||||
* $Id: math_emulate.c,v 1.9 1994/05/05 05:35:51 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -529,7 +529,7 @@ static int __regoffset[] = {
|
|||
tEAX, tECX, tEDX, tEBX, tESP, tEBP, tESI, tEDI
|
||||
};
|
||||
|
||||
#define REG(x) (curproc->p_regs[__regoffset[(x)]])
|
||||
#define REG(x) (curproc->p_md.md_regs[__regoffset[(x)]])
|
||||
|
||||
static char * sib(struct trapframe * info, int mod)
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
*
|
||||
* from: Utah Hdr: mem.c 1.13 89/10/08
|
||||
* from: @(#)mem.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: mem.c,v 1.17 1994/04/27 03:53:29 mycroft Exp $
|
||||
* $Id: mem.c,v 1.18 1994/05/05 05:35:52 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -71,7 +71,7 @@ mmclose(dev, flag, mode)
|
|||
case 0:
|
||||
if (flag & FWRITE) {
|
||||
struct trapframe *fp;
|
||||
fp = (struct trapframe *)curproc->p_regs;
|
||||
fp = (struct trapframe *)curproc->p_md.md_regs;
|
||||
fp->tf_eflags &= ~PSL_IOPL;
|
||||
}
|
||||
break;
|
||||
|
@ -92,7 +92,7 @@ mmopen(dev, flag, mode)
|
|||
case 0:
|
||||
if (flag & FWRITE) {
|
||||
struct trapframe *fp;
|
||||
fp = (struct trapframe *)curproc->p_regs;
|
||||
fp = (struct trapframe *)curproc->p_md.md_regs;
|
||||
fp->tf_eflags |= PSL_IOPL;
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
* From:
|
||||
* Id: procfs_i386.c,v 4.1 1993/12/17 10:47:45 jsp Rel
|
||||
*
|
||||
* $Id: process_machdep.c,v 1.6 1994/05/04 03:41:12 cgd Exp $
|
||||
* $Id: process_machdep.c,v 1.7 1994/05/05 05:35:53 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -89,7 +89,7 @@ process_read_regs(p, regs)
|
|||
if ((p->p_flag & P_INMEM) == 0)
|
||||
return (EIO);
|
||||
|
||||
ptr = (char *) p->p_addr + ((char *) p->p_regs - (char *) kstack);
|
||||
ptr = (char *) p->p_addr + ((char *) p->p_md.md_regs - (char *) kstack);
|
||||
|
||||
tp = ptr;
|
||||
regs->r_es = tp->tf_es;
|
||||
|
@ -122,7 +122,7 @@ process_write_regs(p, regs)
|
|||
if ((p->p_flag & P_INMEM) == 0)
|
||||
return (EIO);
|
||||
|
||||
ptr = (char *)p->p_addr + ((char *) p->p_regs - (char *) kstack);
|
||||
ptr = (char *)p->p_addr + ((char *) p->p_md.md_regs - (char *) kstack);
|
||||
tp = ptr;
|
||||
|
||||
eflags = regs->r_eflags;
|
||||
|
@ -159,7 +159,7 @@ process_sstep(p, sstep)
|
|||
if ((p->p_flag & P_INMEM) == 0)
|
||||
return (EIO);
|
||||
|
||||
ptr = (char *) p->p_addr + ((char *) p->p_regs - (char *) kstack);
|
||||
ptr = (char *) p->p_addr + ((char *) p->p_md.md_regs - (char *) kstack);
|
||||
|
||||
tp = ptr;
|
||||
if (sstep)
|
||||
|
@ -188,7 +188,7 @@ process_set_pc(p, addr)
|
|||
if ((p->p_flag & P_INMEM) == 0)
|
||||
return (EIO);
|
||||
|
||||
ptr = (char *) p->p_addr + ((char *) p->p_regs - (char *) kstack);
|
||||
ptr = (char *) p->p_addr + ((char *) p->p_md.md_regs - (char *) kstack);
|
||||
|
||||
tp = ptr;
|
||||
tp->tf_eip = addr;
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
|
||||
* $Id: trap.c,v 1.37 1994/05/04 03:41:14 cgd Exp $
|
||||
* $Id: trap.c,v 1.38 1994/05/05 05:35:54 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -85,7 +85,7 @@ userret(p, pc, oticks)
|
|||
/* take pending signals */
|
||||
while ((sig = CURSIG(p)) != 0)
|
||||
psig(sig);
|
||||
p->p_pri = p->p_usrpri;
|
||||
p->p_priority = p->p_usrpri;
|
||||
if (want_resched) {
|
||||
/*
|
||||
* Since we are curproc, a clock interrupt could
|
||||
|
@ -104,6 +104,7 @@ userret(p, pc, oticks)
|
|||
psig(sig);
|
||||
}
|
||||
|
||||
#ifdef notdef
|
||||
/*
|
||||
* If profiling, charge recent system time to the trapped pc.
|
||||
*/
|
||||
|
@ -122,8 +123,9 @@ userret(p, pc, oticks)
|
|||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
curpri = p->p_pri;
|
||||
curpriority = p->p_priority;
|
||||
}
|
||||
|
||||
char *trap_type[] = {
|
||||
|
@ -198,8 +200,10 @@ trap(frame)
|
|||
|
||||
if (ISPL(frame.tf_cs) != SEL_KPL) {
|
||||
type |= T_USER;
|
||||
#ifdef notdef
|
||||
sticks = p->p_stime;
|
||||
p->p_regs = (int *)&frame;
|
||||
#endif
|
||||
p->p_md.md_regs = (int *)&frame;
|
||||
}
|
||||
|
||||
code = frame.tf_err;
|
||||
|
@ -468,8 +472,10 @@ syscall(frame)
|
|||
if (ISPL(frame.tf_cs) != SEL_UPL)
|
||||
panic("syscall");
|
||||
p = curproc;
|
||||
#ifdef notdef
|
||||
sticks = p->p_stime;
|
||||
p->p_regs = (int *)&frame;
|
||||
#endif
|
||||
p->p_md.md_regs = (int *)&frame;
|
||||
opc = frame.tf_eip;
|
||||
code = frame.tf_eax;
|
||||
params = (caddr_t)frame.tf_esp + sizeof(int);
|
||||
|
|
|
@ -76,7 +76,7 @@ cpu_fork(p1, p2)
|
|||
|
||||
/* Copy the pcb. */
|
||||
p2->p_addr->u_pcb = p1->p_addr->u_pcb;
|
||||
p2->p_regs = p1->p_regs;
|
||||
p2->p_md.md_regs = p1->p_md.md_regs;
|
||||
|
||||
/*
|
||||
* Wire top of address space of child to it's kstack.
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)cpu.h 5.4 (Berkeley) 5/9/91
|
||||
* $Id: cpu.h,v 1.16 1994/05/04 03:41:21 cgd Exp $
|
||||
* $Id: cpu.h,v 1.17 1994/05/05 05:36:06 cgd Exp $
|
||||
*/
|
||||
|
||||
#ifndef _I386_CPU_H_
|
||||
|
@ -62,12 +62,12 @@
|
|||
*
|
||||
* XXX intrframe has a lot of gunk we don't need.
|
||||
*/
|
||||
typedef struct intrframe clockframe;
|
||||
#define clockframe intrframe
|
||||
|
||||
#define CLKF_USERMODE(framep) (ISPL((framep)->if_cs) == SEL_UPL)
|
||||
#define CLKF_BASEPRI(framep) ((framep)->if_ppl == 0)
|
||||
#define CLKF_PC(framep) ((framep)->if_eip)
|
||||
#define CLKF_INTR(framep) (0) /* XXX should have an interrupt stack */
|
||||
#define CLKF_USERMODE(frame) (ISPL((frame)->if_cs) == SEL_UPL)
|
||||
#define CLKF_BASEPRI(frame) ((frame)->if_ppl == 0)
|
||||
#define CLKF_PC(frame) ((frame)->if_eip)
|
||||
#define CLKF_INTR(frame) (0) /* XXX should have an interrupt stack */
|
||||
|
||||
/*
|
||||
* Preempt the current process if in interrupt from user mode,
|
||||
|
|
|
@ -31,14 +31,12 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)proc.h 7.1 (Berkeley) 5/15/91
|
||||
* $Id: proc.h,v 1.4 1993/12/21 09:47:57 mycroft Exp $
|
||||
* $Id: proc.h,v 1.5 1994/05/05 05:36:08 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Machine-dependent part of the proc structure for i386.
|
||||
*/
|
||||
struct mdproc {
|
||||
#ifdef notyet
|
||||
int *p_regs; /* registers on current frame */
|
||||
#endif
|
||||
int *md_regs; /* registers on current frame */
|
||||
};
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)psl.h 5.2 (Berkeley) 1/18/91
|
||||
* $Id: psl.h,v 1.8 1994/04/07 06:49:32 mycroft Exp $
|
||||
* $Id: psl.h,v 1.9 1994/05/05 05:36:09 cgd Exp $
|
||||
*/
|
||||
|
||||
#ifndef _I386_PSL_H_
|
||||
|
@ -97,6 +97,7 @@ SPL(bio, cpl |= imask[IPL_BIO])
|
|||
SPL(imp, cpl |= imask[IPL_NET])
|
||||
SPL(tty, cpl |= imask[IPL_TTY])
|
||||
SPL(clock, cpl |= imask[IPL_CLOCK])
|
||||
SPL(statclock, cpl |= imask[IPL_CLOCK])
|
||||
SPL(high, cpl = -1)
|
||||
/*
|
||||
* splsoftclock() is used by hardclock() to lower the priority from clock to
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: aha1542.c,v 1.29 1994/05/03 20:53:54 mycroft Exp $
|
||||
* $Id: aha1542.c,v 1.30 1994/05/05 05:36:20 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -335,7 +335,7 @@ int aha_scsi_cmd __P((struct scsi_xfer *));
|
|||
int aha_poll __P((struct aha_softc *, struct scsi_xfer *, struct aha_ccb *));
|
||||
int aha_set_bus_speed __P((struct aha_softc *));
|
||||
int aha_bus_speed_check __P((struct aha_softc *, int));
|
||||
void aha_timeout __P((caddr_t));
|
||||
void aha_timeout __P((void *arg));
|
||||
|
||||
struct scsi_adapter aha_switch = {
|
||||
aha_scsi_cmd,
|
||||
|
@ -703,7 +703,7 @@ ahaintr(aha)
|
|||
#endif /*AHADEBUG */
|
||||
}
|
||||
if (ccb) {
|
||||
untimeout((timeout_t)aha_timeout, ccb);
|
||||
untimeout(aha_timeout, ccb);
|
||||
aha_done(aha, ccb);
|
||||
}
|
||||
aha->aha_mbx.mbi[i].stat = AHA_MBI_FREE;
|
||||
|
@ -1207,7 +1207,7 @@ aha_scsi_cmd(xs)
|
|||
bcopy(xs->cmd, &ccb->scsi_cmd, ccb->scsi_cmd_length);
|
||||
if (!(flags & SCSI_NOMASK)) {
|
||||
s = splbio(); /* stop instant timeouts */
|
||||
timeout((timeout_t)aha_timeout, ccb, (xs->timeout * hz) / 1000);
|
||||
timeout(aha_timeout, ccb, (xs->timeout * hz) / 1000);
|
||||
aha_startmbx(ccb->mbx);
|
||||
/*
|
||||
* Usually return SUCCESSFULLY QUEUED
|
||||
|
@ -1264,7 +1264,7 @@ aha_poll(aha, xs, ccb)
|
|||
* because we are polling, take out the timeout entry
|
||||
* aha_timeout made
|
||||
*/
|
||||
untimeout((timeout_t)aha_timeout, ccb);
|
||||
untimeout(aha_timeout, ccb);
|
||||
count = 2000;
|
||||
while (count) {
|
||||
/*
|
||||
|
@ -1404,10 +1404,10 @@ aha_bus_speed_check(aha, speed)
|
|||
|
||||
void
|
||||
aha_timeout(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
struct aha_ccb *ccb = (void *)arg;
|
||||
struct aha_ccb *ccb = (struct aha_ccb *)arg;
|
||||
struct aha_softc *aha;
|
||||
|
||||
aha = ccb->xfer->sc_link->adapter_softc;
|
||||
|
@ -1439,7 +1439,7 @@ aha_timeout(arg)
|
|||
printf("\n");
|
||||
aha_abortmbx(ccb->mbx);
|
||||
/* 4 secs for the abort */
|
||||
timeout((timeout_t)aha_timeout, ccb, 2 * hz);
|
||||
timeout(aha_timeout, ccb, 2 * hz);
|
||||
ccb->flags = CCB_ABORTED;
|
||||
}
|
||||
splx(s);
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: aha1742.c,v 1.30 1994/04/29 23:15:54 cgd Exp $
|
||||
* $Id: aha1742.c,v 1.31 1994/05/05 05:36:23 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -303,7 +303,7 @@ int ahb_find __P((struct ahb_softc *));
|
|||
void ahb_init __P((struct ahb_softc *));
|
||||
void ahbminphys __P((struct buf *));
|
||||
int ahb_scsi_cmd __P((struct scsi_xfer *));
|
||||
void ahb_timeout __P((caddr_t));
|
||||
void ahb_timeout __P((void *));
|
||||
void ahb_print_ecb __P((struct ecb *));
|
||||
void ahb_print_active_ecb __P((struct ahb_softc *));
|
||||
|
||||
|
@ -667,7 +667,7 @@ ahbintr(ahb)
|
|||
if ((ahb_debug & AHB_SHOWECBS) && ecb)
|
||||
printf("<int ecb(%x)>", ecb);
|
||||
#endif /*AHBDEBUG */
|
||||
untimeout((timeout_t)ahb_timeout, (caddr_t)ecb);
|
||||
untimeout(ahb_timeout, (caddr_t)ecb);
|
||||
ahb_done(ahb, ecb, stat != AHB_ECB_OK);
|
||||
}
|
||||
} while (inb(port + G2STAT) & G2STAT_INT_PEND);
|
||||
|
@ -1028,7 +1028,7 @@ ahb_scsi_cmd(xs)
|
|||
if (!(flags & SCSI_NOMASK)) {
|
||||
s = splbio();
|
||||
ahb_send_immed(ahb, sc_link->target, AHB_TARG_RESET);
|
||||
timeout((timeout_t)ahb_timeout, ecb,
|
||||
timeout(ahb_timeout, ecb,
|
||||
(xs->timeout * hz) / 1000);
|
||||
splx(s);
|
||||
return SUCCESSFULLY_QUEUED;
|
||||
|
@ -1165,7 +1165,7 @@ ahb_scsi_cmd(xs)
|
|||
if (!(flags & SCSI_NOMASK)) {
|
||||
s = splbio();
|
||||
ahb_send_mbox(ahb, OP_START_ECB, sc_link->target, ecb);
|
||||
timeout((timeout_t)ahb_timeout, ecb, (xs->timeout * hz) / 1000);
|
||||
timeout(ahb_timeout, ecb, (xs->timeout * hz) / 1000);
|
||||
splx(s);
|
||||
SC_DEBUG(sc_link, SDEV_DB3, ("cmd_sent\n"));
|
||||
return SUCCESSFULLY_QUEUED;
|
||||
|
@ -1197,10 +1197,10 @@ ahb_scsi_cmd(xs)
|
|||
|
||||
void
|
||||
ahb_timeout(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
struct ecb *ecb = (void *)arg;
|
||||
struct ecb *ecb = (struct ecb *)arg;
|
||||
struct ahb_softc *ahb = ecb->xs->sc_link->adapter_softc;
|
||||
|
||||
sc_print_addr(ecb->xs->sc_link);
|
||||
|
@ -1235,7 +1235,7 @@ ahb_timeout(arg)
|
|||
} else { /* abort the operation that has timed out */
|
||||
printf("\n");
|
||||
ahb_send_mbox(ahb, OP_ABORT_ECB, ecb->xs->sc_link->target, ecb);
|
||||
timeout((timeout_t)ahb_timeout, ecb, 2 * hz);
|
||||
timeout(ahb_timeout, ecb, 2 * hz);
|
||||
ecb->flags = ECB_ABORTED;
|
||||
}
|
||||
splx(s);
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* $Id: aic6360.c,v 1.4 1994/05/03 08:20:43 mycroft Exp $
|
||||
* $Id: aic6360.c,v 1.5 1994/05/05 05:36:25 cgd Exp $
|
||||
*
|
||||
* Acknowledgements: Many of the algorithms used in this driver are
|
||||
* inspired by the work of Julian Elischer (julian@tfs.com) and
|
||||
|
@ -643,7 +643,7 @@ int aic_scsi_cmd __P((struct scsi_xfer *));
|
|||
int aic_poll __P((struct aic_softc *, struct acb *));
|
||||
void aic_add_timeout __P((struct acb *, int));
|
||||
void aic_remove_timeout __P((struct acb *));
|
||||
void aic_timeout __P((caddr_t));
|
||||
void aic_timeout __P((void *arg));
|
||||
int aic_find __P((struct aic_softc *));
|
||||
void aic_sched __P((struct aic_softc *));
|
||||
void aic_scsi_reset __P((struct aic_softc *));
|
||||
|
@ -902,13 +902,13 @@ aic_init(aic)
|
|||
aic->state = AIC_CLEANING;
|
||||
if (aic->nexus != NULL) {
|
||||
aic->nexus->xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, aic->nexus);
|
||||
untimeout(aic_timeout, aic->nexus);
|
||||
aic_done(aic->nexus);
|
||||
}
|
||||
aic->nexus = NULL;
|
||||
while (acb = aic->nexus_list.tqh_first) {
|
||||
acb->xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
}
|
||||
}
|
||||
|
@ -1006,7 +1006,7 @@ aic_scsi_cmd(xs)
|
|||
s = splbio();
|
||||
|
||||
TAILQ_INSERT_TAIL(&aic->ready_list, acb, chain);
|
||||
timeout((timeout_t)aic_timeout, acb, (xs->timeout*hz)/1000);
|
||||
timeout(aic_timeout, acb, (xs->timeout*hz)/1000);
|
||||
|
||||
if (aic->state == AIC_IDLE)
|
||||
aic_sched(aic);
|
||||
|
@ -1429,7 +1429,7 @@ aic_msgin(aic)
|
|||
}
|
||||
acb->xs->resid = acb->dleft = aic->dleft;
|
||||
aic->flags |= AIC_BUSFREE_OK;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
break;
|
||||
case MSG_MESSAGE_REJECT:
|
||||
|
@ -2070,7 +2070,7 @@ aicintr(aic)
|
|||
*/
|
||||
printf("aic: unexpected busfree\n");
|
||||
xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
}
|
||||
LOGLINE(aic);
|
||||
|
@ -2091,7 +2091,7 @@ aicintr(aic)
|
|||
outb(CLRSINT1, CLRSELTIMO);
|
||||
aic->state = AIC_IDLE;
|
||||
acb->xs->error = XS_TIMEOUT;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
LOGLINE(aic);
|
||||
outb(DMACNTRL0, INTEN);
|
||||
|
@ -2169,7 +2169,7 @@ aicintr(aic)
|
|||
__LINE__);
|
||||
Debugger();
|
||||
acb->xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
aic_init(aic);
|
||||
return 1;
|
||||
|
@ -2186,7 +2186,7 @@ aicintr(aic)
|
|||
__LINE__);
|
||||
Debugger();
|
||||
acb->xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
aic_init(aic);
|
||||
return 1;
|
||||
|
@ -2258,10 +2258,10 @@ aicintr(aic)
|
|||
|
||||
void
|
||||
aic_timeout(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
struct acb *acb = (void *)arg;
|
||||
struct acb *acb = (struct acb *)arg;
|
||||
struct aic_softc *aic;
|
||||
|
||||
aic = acb->xs->sc_link->adapter_softc;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bt742a.c,v 1.25 1994/04/29 23:16:00 cgd Exp $
|
||||
* $Id: bt742a.c,v 1.26 1994/05/05 05:36:28 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -370,7 +370,7 @@ void bt_inquire_setup_information __P((struct bt_softc *));
|
|||
void btminphys __P((struct buf *));
|
||||
int bt_scsi_cmd __P((struct scsi_xfer *));
|
||||
int bt_poll __P((struct bt_softc *, struct scsi_xfer *, struct bt_ccb *));
|
||||
void bt_timeout __P((caddr_t));
|
||||
void bt_timeout __P((void *arg));
|
||||
#ifdef UTEST
|
||||
void bt_print_ccb __P((struct bt_ccb *));
|
||||
void bt_print_active_ccbs __P((struct bt_softc *));
|
||||
|
@ -746,7 +746,7 @@ btintr(bt)
|
|||
}
|
||||
wmbi->stat = BT_MBI_FREE;
|
||||
if (ccb) {
|
||||
untimeout((timeout_t)bt_timeout, ccb);
|
||||
untimeout(bt_timeout, ccb);
|
||||
bt_done(bt, ccb);
|
||||
}
|
||||
/* Set the IN mail Box pointer for next */ bt_nextmbx(wmbi, wmbx, mbi);
|
||||
|
@ -1363,7 +1363,7 @@ bt_scsi_cmd(xs)
|
|||
*/
|
||||
SC_DEBUG(sc_link, SDEV_DB3, ("cmd_sent\n"));
|
||||
if (!(flags & SCSI_NOMASK)) {
|
||||
timeout((timeout_t)bt_timeout, ccb, (xs->timeout * hz) / 1000);
|
||||
timeout(bt_timeout, ccb, (xs->timeout * hz) / 1000);
|
||||
return SUCCESSFULLY_QUEUED;
|
||||
}
|
||||
|
||||
|
@ -1412,7 +1412,7 @@ bt_poll(bt, xs, ccb)
|
|||
* because we are polling, take out the timeout entry
|
||||
* bt_timeout made
|
||||
*/
|
||||
untimeout((timeout_t)bt_timeout, ccb);
|
||||
untimeout(bt_timeout, ccb);
|
||||
count = 2000;
|
||||
while (count) {
|
||||
/*
|
||||
|
@ -1441,10 +1441,10 @@ bt_poll(bt, xs, ccb)
|
|||
|
||||
void
|
||||
bt_timeout(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
struct bt_ccb *ccb = (void *)arg;
|
||||
struct bt_ccb *ccb = (struct bt_ccb *)arg;
|
||||
struct bt_softc *bt;
|
||||
|
||||
bt = ccb->xfer->sc_link->adapter_softc;
|
||||
|
@ -1479,7 +1479,7 @@ bt_timeout(arg)
|
|||
printf("\n");
|
||||
bt_send_mbo(bt, ~SCSI_NOMASK, BT_MBO_ABORT, ccb);
|
||||
/* 2 secs for the abort */
|
||||
timeout((timeout_t)bt_timeout, ccb, 2 * hz);
|
||||
timeout(bt_timeout, ccb, 2 * hz);
|
||||
ccb->flags = CCB_ABORTED;
|
||||
}
|
||||
splx(s);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: clock.c,v 1.23 1994/05/03 20:32:24 mycroft Exp $
|
||||
* $Id: clock.c,v 1.24 1994/05/05 05:36:30 cgd Exp $
|
||||
*/
|
||||
/*
|
||||
* Mach Operating System
|
||||
|
@ -129,7 +129,7 @@ startrtclock()
|
|||
|
||||
int
|
||||
clockintr(frame)
|
||||
clockframe *frame;
|
||||
struct clockframe *frame;
|
||||
{
|
||||
|
||||
hardclock(frame);
|
||||
|
@ -273,7 +273,7 @@ findcpuspeed()
|
|||
}
|
||||
|
||||
void
|
||||
enablertclock()
|
||||
cpu_initclocks()
|
||||
{
|
||||
static struct intrhand clockhand;
|
||||
|
||||
|
@ -463,3 +463,9 @@ resettodr()
|
|||
rtcput(&rtclk);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
void
|
||||
setstatclockrate(arg)
|
||||
int arg;
|
||||
{
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)fd.c 7.4 (Berkeley) 5/25/91
|
||||
* $Id: fd.c,v 1.42 1994/04/22 22:58:55 mycroft Exp $
|
||||
* $Id: fd.c,v 1.43 1994/05/05 05:36:33 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -191,14 +191,14 @@ struct dkdriver fddkdriver = { fdstrategy };
|
|||
struct fd_type *fd_nvtotype __P((char *, int, int));
|
||||
void fdstart __P((struct fd_softc *fd));
|
||||
void fd_set_motor __P((struct fdc_softc *fdc, int reset));
|
||||
void fd_motor_off __P((struct fd_softc *fd));
|
||||
void fd_motor_on __P((struct fd_softc *fd));
|
||||
void fd_motor_off __P((void *arg));
|
||||
void fd_motor_on __P((void *arg));
|
||||
int fdcresult __P((struct fdc_softc *fdc));
|
||||
int out_fdc __P((u_short iobase, u_char x));
|
||||
void fdcstart __P((struct fdc_softc *fdc));
|
||||
void fdcstatus __P((struct device *dv, int n, char *s));
|
||||
void fdctimeout __P((struct fdc_softc *fdc));
|
||||
void fdcpseudointr __P((struct fdc_softc *fdc));
|
||||
void fdctimeout __P((void *arg));
|
||||
void fdcpseudointr __P((void *arg));
|
||||
int fdcintr __P((struct fdc_softc *fdc));
|
||||
void fdcretry __P((struct fdc_softc *fdc));
|
||||
void fdfinish __P((struct fd_softc *fd, struct buf *bp));
|
||||
|
@ -520,7 +520,7 @@ fdstrategy(bp)
|
|||
#endif
|
||||
s = splbio();
|
||||
disksort(&fd->sc_q, bp);
|
||||
untimeout((timeout_t)fd_motor_off, (caddr_t)fd); /* a good idea */
|
||||
untimeout(fd_motor_off, (caddr_t)fd); /* a good idea */
|
||||
if (!fd->sc_q.b_active)
|
||||
fdstart(fd);
|
||||
#ifdef DIAGNOSTIC
|
||||
|
@ -574,23 +574,32 @@ fd_set_motor(fdc, reset)
|
|||
}
|
||||
|
||||
void
|
||||
fd_motor_off(fd)
|
||||
struct fd_softc *fd;
|
||||
fd_motor_off(arg)
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
int s;
|
||||
struct fd_softc *fd;
|
||||
|
||||
fd = (struct fd_softc *)arg;
|
||||
|
||||
s = splbio();
|
||||
fd->sc_flags &= ~(FD_MOTOR | FD_MOTOR_WAIT);
|
||||
fd_set_motor((struct fdc_softc *)fd->sc_dev.dv_parent, 0);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
void
|
||||
fd_motor_on(fd)
|
||||
struct fd_softc *fd;
|
||||
fd_motor_on(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct fdc_softc *fdc = (struct fdc_softc *)fd->sc_dev.dv_parent;
|
||||
int s = splbio();
|
||||
struct fd_softc *fd;
|
||||
struct fdc_softc *fdc;
|
||||
int s;
|
||||
|
||||
fd = (struct fd_softc *)arg;
|
||||
fdc = (struct fdc_softc *)fd->sc_dev.dv_parent;
|
||||
|
||||
s = splbio();
|
||||
fd->sc_flags &= ~FD_MOTOR_WAIT;
|
||||
if ((fdc->sc_drives.tqh_first == fd) && (fdc->sc_state == MOTORWAIT))
|
||||
(void) fdcintr(fdc);
|
||||
|
@ -723,14 +732,17 @@ fdcstatus(dv, n, s)
|
|||
}
|
||||
|
||||
void
|
||||
fdctimeout(fdc)
|
||||
struct fdc_softc *fdc;
|
||||
fdctimeout(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct fdc_softc *fdc;
|
||||
struct fd_softc *fd;
|
||||
int s = splbio();
|
||||
int s;
|
||||
|
||||
fdc = (struct fdc_softc *)arg;
|
||||
fd = fdc->sc_drives.tqh_first;
|
||||
|
||||
s = splbio();
|
||||
fdcstatus(&fd->sc_dev, 0, "timeout");
|
||||
|
||||
if (fd->sc_q.b_actf)
|
||||
|
@ -743,12 +755,16 @@ fdctimeout(fdc)
|
|||
}
|
||||
|
||||
void
|
||||
fdcpseudointr(fdc)
|
||||
struct fdc_softc *fdc;
|
||||
fdcpseudointr(arg)
|
||||
void *arg;
|
||||
{
|
||||
/* just ensure it has the right spl */
|
||||
int s = splbio();
|
||||
struct fdc_softc *fdc;
|
||||
int s;
|
||||
|
||||
fdc = (struct fdc_softc *)arg;
|
||||
|
||||
/* just ensure it has the right spl */
|
||||
s = splbio();
|
||||
(void) fdcintr(fdc);
|
||||
splx(s);
|
||||
}
|
||||
|
@ -786,7 +802,7 @@ again:
|
|||
fdc->sc_retry = 0;
|
||||
fd->sc_skip = 0;
|
||||
fd->sc_blkno = bp->b_blkno * DEV_BSIZE / FDC_BSIZE;
|
||||
untimeout((timeout_t)fd_motor_off, (caddr_t)fd);
|
||||
untimeout(fd_motor_off, (caddr_t)fd);
|
||||
if (fd->sc_flags & FD_MOTOR_WAIT) {
|
||||
fdc->sc_state = MOTORWAIT;
|
||||
return 1;
|
||||
|
@ -795,14 +811,14 @@ again:
|
|||
/* lame controller */
|
||||
struct fd_softc *ofd = fdc->sc_fd[fd->sc_drive ^ 1];
|
||||
if (ofd && ofd->sc_flags & FD_MOTOR) {
|
||||
untimeout((timeout_t)fd_motor_off, (caddr_t)ofd);
|
||||
untimeout(fd_motor_off, (caddr_t)ofd);
|
||||
ofd->sc_flags &= ~(FD_MOTOR | FD_MOTOR_WAIT);
|
||||
}
|
||||
fd->sc_flags |= FD_MOTOR | FD_MOTOR_WAIT;
|
||||
fd_set_motor(fdc, 0);
|
||||
fdc->sc_state = MOTORWAIT;
|
||||
/* allow .25s for motor to stabilize */
|
||||
timeout((timeout_t)fd_motor_on, (caddr_t)fd, hz/4);
|
||||
timeout(fd_motor_on, (caddr_t)fd, hz/4);
|
||||
return 1;
|
||||
}
|
||||
/* at least make sure we are selected */
|
||||
|
@ -828,7 +844,7 @@ again:
|
|||
out_fdc(iobase, bp->b_cylin);
|
||||
fd->sc_track = -1;
|
||||
fdc->sc_state = SEEKWAIT;
|
||||
timeout((timeout_t)fdctimeout, (caddr_t)fdc, hz*4);
|
||||
timeout(fdctimeout, (caddr_t)fdc, hz*4);
|
||||
return 1;
|
||||
|
||||
case DOIO:
|
||||
|
@ -882,14 +898,14 @@ again:
|
|||
out_fdc(iobase, type->datalen); /* data length */
|
||||
fdc->sc_state = IOCOMPLETE;
|
||||
/* allow 2 seconds for operation */
|
||||
timeout((timeout_t)fdctimeout, (caddr_t)fdc, 2 * hz);
|
||||
timeout(fdctimeout, (caddr_t)fdc, 2 * hz);
|
||||
return 1; /* will return later */
|
||||
|
||||
case SEEKWAIT:
|
||||
untimeout((timeout_t)fdctimeout, (caddr_t)fdc);
|
||||
untimeout(fdctimeout, (caddr_t)fdc);
|
||||
fdc->sc_state = SEEKCOMPLETE;
|
||||
/* allow 1/50 second for heads to settle */
|
||||
timeout((timeout_t)fdcpseudointr, (caddr_t)fdc, hz/50);
|
||||
timeout(fdcpseudointr, (caddr_t)fdc, hz/50);
|
||||
return 1;
|
||||
|
||||
case SEEKCOMPLETE:
|
||||
|
@ -916,7 +932,7 @@ again:
|
|||
goto again;
|
||||
|
||||
case IOCOMPLETE: /* IO DONE, post-analyze */
|
||||
untimeout((timeout_t)fdctimeout, (caddr_t)fdc);
|
||||
untimeout(fdctimeout, (caddr_t)fdc);
|
||||
if (fdcresult(fdc) != 7 || (st0 & 0xf8) != 0) {
|
||||
#ifdef NEWCONFIG
|
||||
at_dma_abort(fdc->sc_drq);
|
||||
|
@ -959,11 +975,11 @@ again:
|
|||
delay(100);
|
||||
fd_set_motor(fdc, 0);
|
||||
fdc->sc_state = RESETCOMPLETE;
|
||||
timeout((timeout_t)fdctimeout, (caddr_t)fdc, hz/2);
|
||||
timeout(fdctimeout, (caddr_t)fdc, hz/2);
|
||||
return 1; /* will return later */
|
||||
|
||||
case RESETCOMPLETE:
|
||||
untimeout((timeout_t)fdctimeout, (caddr_t)fdc);
|
||||
untimeout(fdctimeout, (caddr_t)fdc);
|
||||
/* clear the controller output buffer */
|
||||
for (i = 0; i < 4; i++) {
|
||||
out_fdc(iobase, NE7CMD_SENSEI);
|
||||
|
@ -975,14 +991,14 @@ again:
|
|||
out_fdc(iobase, NE7CMD_RECAL); /* recalibrate function */
|
||||
out_fdc(iobase, fd->sc_drive);
|
||||
fdc->sc_state = RECALWAIT;
|
||||
timeout((timeout_t)fdctimeout, (caddr_t)fdc, 5 * hz);
|
||||
timeout(fdctimeout, (caddr_t)fdc, 5 * hz);
|
||||
return 1; /* will return later */
|
||||
|
||||
case RECALWAIT:
|
||||
untimeout((timeout_t)fdctimeout, (caddr_t)fdc);
|
||||
untimeout(fdctimeout, (caddr_t)fdc);
|
||||
fdc->sc_state = RECALCOMPLETE;
|
||||
/* allow 1/30 second for heads to settle */
|
||||
timeout((timeout_t)fdcpseudointr, (caddr_t)fdc, hz/30);
|
||||
timeout(fdcpseudointr, (caddr_t)fdc, hz/30);
|
||||
return 1; /* will return later */
|
||||
|
||||
case RECALCOMPLETE:
|
||||
|
@ -1079,7 +1095,7 @@ fdfinish(fd, bp)
|
|||
fd->sc_q.b_actf = bp->b_actf;
|
||||
biodone(bp);
|
||||
/* turn off motor 5s from now */
|
||||
timeout((timeout_t)fd_motor_off, (caddr_t)fd, hz*5);
|
||||
timeout(fd_motor_off, (caddr_t)fd, hz*5);
|
||||
fdc->sc_state = DEVIDLE;
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
|
||||
* $Id: isa.c,v 1.54 1994/05/03 20:32:22 mycroft Exp $
|
||||
* $Id: isa.c,v 1.55 1994/05/05 05:36:35 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -259,6 +259,8 @@ void
|
|||
isa_configure()
|
||||
{
|
||||
|
||||
startrtclock();
|
||||
|
||||
while (config_search(isasubmatch, NULL, NULL));
|
||||
|
||||
printf("biomask %x netmask %x ttymask %x\n",
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: lms.c,v 1.12 1994/04/07 06:50:59 mycroft Exp $
|
||||
* $Id: lms.c,v 1.13 1994/05/05 05:36:37 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -257,7 +257,7 @@ lmsioctl(dev, cmd, addr, flag)
|
|||
/* Reset historical information. */
|
||||
sc->sc_x = sc->sc_y = 0;
|
||||
sc->sc_status &= ~BUTCHNGMASK;
|
||||
flushq(&sc->sc_q);
|
||||
ndflush(&sc->sc_q, sc->sc_q.c_cc);
|
||||
|
||||
splx(s);
|
||||
error = copyout(&info, addr, sizeof(struct mouseinfo));
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: lpt.c,v 1.17 1994/04/22 23:02:40 mycroft Exp $
|
||||
* $Id: lpt.c,v 1.18 1994/05/05 05:36:39 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -124,7 +124,7 @@ struct cfdriver lptcd = {
|
|||
static int notready __P((u_char, struct lpt_softc *));
|
||||
#endif
|
||||
|
||||
static void lptout __P((struct lpt_softc *));
|
||||
static void lptout __P((void *arg));
|
||||
static int pushbytes __P((struct lpt_softc *));
|
||||
|
||||
/*
|
||||
|
@ -357,11 +357,13 @@ notready(status, sc)
|
|||
#endif
|
||||
|
||||
void
|
||||
lptout(sc)
|
||||
struct lpt_softc *sc;
|
||||
lptout(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct lpt_softc *sc;
|
||||
int s;
|
||||
|
||||
sc = (struct lpt_softc *)arg;
|
||||
if (sc->sc_flags & LPT_NOINTR)
|
||||
return;
|
||||
|
||||
|
@ -369,7 +371,7 @@ lptout(sc)
|
|||
lptintr(sc);
|
||||
splx(s);
|
||||
|
||||
timeout((timeout_t)lptout, (caddr_t)sc, STEP);
|
||||
timeout(lptout, (caddr_t)sc, STEP);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mcd.c,v 1.12 1994/04/22 23:02:42 mycroft Exp $
|
||||
* $Id: mcd.c,v 1.13 1994/05/05 05:36:42 cgd Exp $
|
||||
*/
|
||||
|
||||
/*static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";*/
|
||||
|
@ -148,8 +148,9 @@ void hsg2msf __P((int, bcd_t *));
|
|||
int msf2hsg __P((bcd_t *));
|
||||
int mcd_volinfo __P((struct mcd_softc *));
|
||||
int mcdintr __P((struct mcd_softc *));
|
||||
void mcd_doread __P((int, struct mcd_mbx *));
|
||||
int mcd_setmode __P((struct mcd_softc *, int));
|
||||
void mcd_doread __P((int, struct mcd_mbx *));
|
||||
void mcd_doreadtimeout __P((void *arg));
|
||||
int mcd_toc_header __P((struct mcd_softc *, struct ioc_toc_header *));
|
||||
int mcd_read_toc __P((struct mcd_softc *));
|
||||
int mcd_toc_entry __P((struct mcd_softc *, struct ioc_read_toc_entry *));
|
||||
|
@ -839,6 +840,15 @@ mcdintr(sc)
|
|||
*/
|
||||
struct mcd_mbx *mbxsave;
|
||||
|
||||
void
|
||||
mcd_doreadtimeout(arg)
|
||||
void *arg;
|
||||
{
|
||||
int state = (long)arg;
|
||||
|
||||
mcd_doread(state, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
mcd_doread(state, mbxin)
|
||||
int state;
|
||||
|
@ -863,16 +873,16 @@ loop:
|
|||
/* Get status. */
|
||||
outb(iobase + mcd_command, MCD_CMDGETSTAT);
|
||||
mbx->count = RDELAY_WAITSTAT;
|
||||
timeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITSTAT,
|
||||
timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITSTAT,
|
||||
hz/100);
|
||||
return;
|
||||
|
||||
case MCD_S_WAITSTAT:
|
||||
untimeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITSTAT);
|
||||
untimeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITSTAT);
|
||||
if (mbx->count-- >= 0) {
|
||||
if (inb(iobase + mcd_xfer) & MCD_ST_BUSY) {
|
||||
timeout((timeout_t) mcd_doread,
|
||||
(caddr_t) MCD_S_WAITSTAT, hz/100);
|
||||
timeout(mcd_doreadtimeout,
|
||||
(caddr_t)MCD_S_WAITSTAT, hz/100);
|
||||
return;
|
||||
}
|
||||
mcd_setflags(sc);
|
||||
|
@ -898,8 +908,8 @@ loop:
|
|||
|
||||
mcd_put(iobase + mcd_command, MCD_CMDSETMODE);
|
||||
mcd_put(iobase + mcd_command, rm);
|
||||
timeout((timeout_t) mcd_doread,
|
||||
(caddr_t) MCD_S_WAITMODE, hz/100);
|
||||
timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITMODE,
|
||||
hz/100);
|
||||
return;
|
||||
} else {
|
||||
printf("%s: timeout getting status\n",
|
||||
|
@ -908,15 +918,15 @@ loop:
|
|||
}
|
||||
|
||||
case MCD_S_WAITMODE:
|
||||
untimeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITMODE);
|
||||
untimeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITMODE);
|
||||
if (mbx->count-- < 0) {
|
||||
printf("%s: timeout setting mode\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
goto readerr;
|
||||
}
|
||||
if (inb(iobase + mcd_xfer) & MCD_ST_BUSY) {
|
||||
timeout((timeout_t) mcd_doread,
|
||||
(caddr_t) MCD_S_WAITMODE, hz/100);
|
||||
timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITMODE,
|
||||
hz/100);
|
||||
return;
|
||||
}
|
||||
mcd_setflags(sc);
|
||||
|
@ -945,12 +955,11 @@ nextblock:
|
|||
mcd_put(iobase + mcd_command, 0);
|
||||
mcd_put(iobase + mcd_command, 1);
|
||||
mbx->count = RDELAY_WAITREAD;
|
||||
timeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITREAD,
|
||||
hz/100);
|
||||
timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITREAD, hz/100);
|
||||
return;
|
||||
|
||||
case MCD_S_WAITREAD:
|
||||
untimeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITREAD);
|
||||
untimeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITREAD);
|
||||
if (mbx->count-- > 0) {
|
||||
k = inb(iobase + mcd_xfer);
|
||||
if ((k & 2) == 0) { /* XXX MCD_ST_AUDIOBSY? */
|
||||
|
@ -978,8 +987,8 @@ nextblock:
|
|||
}
|
||||
if ((k & MCD_ST_BUSY) == 0)
|
||||
mcd_getstat(sc, 0);
|
||||
timeout((timeout_t) mcd_doread,
|
||||
(caddr_t) MCD_S_WAITREAD, hz/100);
|
||||
timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITREAD,
|
||||
hz/100);
|
||||
return;
|
||||
} else {
|
||||
printf("%s: timeout reading data\n",
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mms.c,v 1.11 1994/04/07 06:51:04 mycroft Exp $
|
||||
* $Id: mms.c,v 1.12 1994/05/05 05:36:45 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -248,7 +248,7 @@ mmsioctl(dev, cmd, addr, flag)
|
|||
/* Reset historical information. */
|
||||
sc->sc_x = sc->sc_y = 0;
|
||||
sc->sc_status &= ~BUTCHNGMASK;
|
||||
flushq(&sc->sc_q);
|
||||
ndflush(&sc->sc_q, sc->sc_q.c_cc);
|
||||
|
||||
splx(s);
|
||||
error = copyout(&info, addr, sizeof(struct mouseinfo));
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)npx.c 7.2 (Berkeley) 5/12/91
|
||||
* $Id: npx.c,v 1.19 1994/04/24 01:34:12 mycroft Exp $
|
||||
* $Id: npx.c,v 1.20 1994/05/05 05:36:48 cgd Exp $
|
||||
*/
|
||||
#include "npx.h"
|
||||
#if NNPX > 0
|
||||
|
@ -456,7 +456,7 @@ npxintr(frame)
|
|||
* in doreti, and the frame for that could easily be set up
|
||||
* just before it is used).
|
||||
*/
|
||||
curproc->p_regs = (int *)&frame->if_es;
|
||||
curproc->p_md.md_regs = (int *)&frame->if_es;
|
||||
#ifdef notyet
|
||||
/*
|
||||
* Encode the appropriate code for detailed information on
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)pccons.c 5.11 (Berkeley) 5/21/91
|
||||
* $Id: pccons.c,v 1.63 1994/04/24 01:34:14 mycroft Exp $
|
||||
* $Id: pccons.c,v 1.64 1994/05/05 05:36:53 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -304,13 +304,13 @@ async_update()
|
|||
|
||||
if (kernel || polling) {
|
||||
if (async)
|
||||
untimeout((timeout_t)do_async_update, 0);
|
||||
untimeout(do_async_update, 0);
|
||||
do_async_update(1);
|
||||
} else {
|
||||
if (async)
|
||||
return;
|
||||
async = 1;
|
||||
timeout((timeout_t)do_async_update, 0, 1);
|
||||
timeout(do_async_update, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -608,7 +608,7 @@ pcstart(tp)
|
|||
tp->t_state &= ~TS_BUSY;
|
||||
if (cl->c_cc) {
|
||||
tp->t_state |= TS_TIMEOUT;
|
||||
timeout((timeout_t)ttrstrt, (caddr_t)tp, 1);
|
||||
timeout(ttrstrt, (caddr_t)tp, 1);
|
||||
}
|
||||
if (cl->c_cc <= tp->t_lowat) {
|
||||
if (tp->t_state & TS_ASLEEP) {
|
||||
|
@ -1548,7 +1548,7 @@ pc_xmode_on()
|
|||
return;
|
||||
pc_xmode = 1;
|
||||
|
||||
fp = (struct trapframe *)curproc->p_regs;
|
||||
fp = (struct trapframe *)curproc->p_md.md_regs;
|
||||
fp->tf_eflags |= PSL_IOPL;
|
||||
}
|
||||
|
||||
|
@ -1566,6 +1566,6 @@ pc_xmode_off()
|
|||
#endif
|
||||
async_update();
|
||||
|
||||
fp = (struct trapframe *)curproc->p_regs;
|
||||
fp = (struct trapframe *)curproc->p_md.md_regs;
|
||||
fp->tf_eflags &= ~PSL_IOPL;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: ultra14f.c,v 1.27 1994/04/29 23:16:02 cgd Exp $
|
||||
* $Id: ultra14f.c,v 1.28 1994/05/05 05:36:58 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -267,7 +267,7 @@ int uha_find __P((struct uha_softc *));
|
|||
void uha_init __P((struct uha_softc *));
|
||||
void uhaminphys __P((struct buf *));
|
||||
int uha_scsi_cmd __P((struct scsi_xfer *));
|
||||
void uha_timeout __P((caddr_t));
|
||||
void uha_timeout __P((void *arg));
|
||||
#ifdef UHADEBUG
|
||||
void uha_print_mscp __P((struct mscp *));
|
||||
void uha_print_active_mscp __P((struct uha_softc *));
|
||||
|
@ -559,7 +559,7 @@ uhaintr(uha)
|
|||
printf("uha: BAD MSCP RETURNED\n");
|
||||
return 0; /* whatever it was, it'll timeout */
|
||||
}
|
||||
untimeout((timeout_t)uha_timeout, mscp);
|
||||
untimeout(uha_timeout, mscp);
|
||||
|
||||
uha_done(uha, mscp);
|
||||
} while (inb(iobase + UHA_SINT) & UHA_SINTP);
|
||||
|
@ -1057,7 +1057,7 @@ uha_scsi_cmd(xs)
|
|||
if (!(flags & SCSI_NOMASK)) {
|
||||
s = splbio();
|
||||
uha_send_mbox(uha, mscp);
|
||||
timeout((timeout_t)uha_timeout, mscp,
|
||||
timeout(uha_timeout, mscp,
|
||||
(xs->timeout * hz) / 1000);
|
||||
splx(s);
|
||||
SC_DEBUG(sc_link, SDEV_DB3, ("cmd_sent\n"));
|
||||
|
@ -1089,10 +1089,10 @@ uha_scsi_cmd(xs)
|
|||
|
||||
void
|
||||
uha_timeout(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
struct mscp *mscp = (void *)arg;
|
||||
struct mscp *mscp = (struct mscp *)arg;
|
||||
struct uha_softc *uha = mscp->xs->sc_link->adapter_softc;
|
||||
|
||||
sc_print_addr(mscp->xs->sc_link);
|
||||
|
@ -1108,7 +1108,7 @@ uha_timeout(arg)
|
|||
uha_done(uha, mscp);
|
||||
} else { /* abort the operation that has timed out */
|
||||
printf("\n");
|
||||
timeout((timeout_t)uha_timeout, mscp, 2 * hz);
|
||||
timeout(uha_timeout, mscp, 2 * hz);
|
||||
mscp->flags = MSCP_ABORTED;
|
||||
}
|
||||
splx(s);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: wd.c,v 1.80 1994/04/25 03:16:03 mycroft Exp $
|
||||
* $Id: wd.c,v 1.81 1994/05/05 05:37:05 cgd Exp $
|
||||
*/
|
||||
|
||||
#define INSTRUMENT /* instrumentation stuff by Brad Parker */
|
||||
|
@ -165,9 +165,9 @@ static int wdsetctlr __P((struct wd_softc *));
|
|||
static int wdgetctlr __P((struct wd_softc *));
|
||||
static void bad144intern __P((struct wd_softc *));
|
||||
static int wdcreset __P((struct wdc_softc *));
|
||||
static void wdcrestart __P((struct wdc_softc *));
|
||||
static void wdcrestart __P((void *arg));
|
||||
static void wdcunwedge __P((struct wdc_softc *));
|
||||
static void wdctimeout __P((struct wdc_softc *));
|
||||
static void wdctimeout __P((void *arg));
|
||||
void wddisksort __P((struct buf *, struct buf *));
|
||||
static void wderror __P((void *, struct buf *, char *));
|
||||
int wdcwait __P((struct wdc_softc *, int));
|
||||
|
@ -1484,9 +1484,10 @@ wdcreset(wdc)
|
|||
}
|
||||
|
||||
static void
|
||||
wdcrestart(wdc)
|
||||
struct wdc_softc *wdc;
|
||||
wdcrestart(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct wdc_softc *wdc = (struct wdc_softc *)arg;
|
||||
int s = splbio();
|
||||
|
||||
wdcstart(wdc);
|
||||
|
@ -1522,7 +1523,7 @@ wdcunwedge(wdc)
|
|||
++wdc->sc_errors;
|
||||
|
||||
/* Wake up in a little bit and restart the operation. */
|
||||
timeout((timeout_t)wdcrestart, (caddr_t)wdc, RECOVERYTIME);
|
||||
timeout(wdcrestart, (caddr_t)wdc, RECOVERYTIME);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1553,16 +1554,17 @@ wdcwait(wdc, mask)
|
|||
}
|
||||
|
||||
static void
|
||||
wdctimeout(wdc)
|
||||
struct wdc_softc *wdc;
|
||||
wdctimeout(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct wdc_softc *wdc = (struct wdc_softc *)arg;
|
||||
int s = splbio();
|
||||
|
||||
if (wdc->sc_timeout && --wdc->sc_timeout == 0) {
|
||||
wderror(wdc, NULL, "lost interrupt");
|
||||
wdcunwedge(wdc);
|
||||
}
|
||||
timeout((timeout_t)wdctimeout, (caddr_t)wdc, hz);
|
||||
timeout(wdctimeout, (caddr_t)wdc, hz);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* This driver is derived from the old 386bsd Wangtek streamer tape driver,
|
||||
* made by Robert Baron at CMU, based on Intel sources.
|
||||
*
|
||||
* $Id: wt.c,v 1.13 1994/04/22 22:59:02 mycroft Exp $
|
||||
* $Id: wt.c,v 1.14 1994/05/05 05:37:09 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -153,7 +153,7 @@ int wtwait __P((struct wt_softc *sc, int catch, char *msg));
|
|||
int wtcmd __P((struct wt_softc *sc, int cmd));
|
||||
int wtstart __P((struct wt_softc *sc, int flag, void *vaddr, size_t len));
|
||||
void wtdma __P((struct wt_softc *sc));
|
||||
void wttimer __P((struct wt_softc *sc));
|
||||
void wttimer __P((void *arg));
|
||||
void wtclock __P((struct wt_softc *sc));
|
||||
int wtreset __P((struct wt_softc *sc));
|
||||
int wtsense __P((struct wt_softc *sc, int verbose, int ignore));
|
||||
|
@ -880,7 +880,7 @@ wtclock(sc)
|
|||
* Some controllers seem to lose dma interrupts too often. To make the
|
||||
* tape stream we need 1 tick timeout.
|
||||
*/
|
||||
timeout((timeout_t)wttimer, (caddr_t)sc, (sc->flags & TPACTIVE) ? 1 : hz);
|
||||
timeout(wttimer, (caddr_t)sc, (sc->flags & TPACTIVE) ? 1 : hz);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -889,9 +889,10 @@ wtclock(sc)
|
|||
* multiple devices on a single IRQ line.
|
||||
*/
|
||||
void
|
||||
wttimer(sc)
|
||||
struct wt_softc *sc;
|
||||
wttimer(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct wt_softc *sc = (struct wt_softc *)arg;
|
||||
int s;
|
||||
|
||||
sc->flags &= ~TPTIMER;
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: process_machdep.c,v 1.5 1994/05/04 03:41:31 cgd Exp $
|
||||
* $Id: process_machdep.c,v 1.6 1994/05/05 05:37:22 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -78,7 +78,7 @@ process_read_regs(p, regs)
|
|||
return EIO;
|
||||
|
||||
frame = (struct frame *)
|
||||
((char *)p->p_addr + ((char *)p->p_regs - (char *)kstack));
|
||||
((char *)p->p_addr + ((char *)p->p_md.md_regs - (char *)kstack));
|
||||
|
||||
bcopy(frame->f_regs, regs->r_regs, sizeof(frame->f_regs));
|
||||
regs->r_sr = frame->f_sr;
|
||||
|
@ -98,7 +98,7 @@ process_write_regs(p, regs)
|
|||
return EIO;
|
||||
|
||||
frame = (struct frame *)
|
||||
((char *)p->p_addr + ((char *)p->p_regs - (char *)kstack));
|
||||
((char *)p->p_addr + ((char *)p->p_md.md_regs - (char *)kstack));
|
||||
|
||||
/*
|
||||
* in the hp300 machdep.c _write_regs, PC alignment wasn't
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: files,v 1.44 1994/04/18 06:18:05 glass Exp $
|
||||
# $Id: files,v 1.45 1994/05/05 05:37:40 cgd Exp $
|
||||
#
|
||||
ddb/db_access.c optional ddb
|
||||
ddb/db_aout.c optional ddb
|
||||
|
@ -53,6 +53,7 @@ kern/subr_disk.c standard
|
|||
kern/subr_log.c standard
|
||||
kern/subr_mcount.c optional profiling-routine
|
||||
kern/subr_prf.c standard
|
||||
kern/subr_prof.c standard
|
||||
kern/subr_rmap.c standard
|
||||
kern/subr_xxx.c standard
|
||||
kern/sys_generic.c standard
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: files.oldconf,v 1.44 1994/04/18 06:18:05 glass Exp $
|
||||
# $Id: files.oldconf,v 1.45 1994/05/05 05:37:40 cgd Exp $
|
||||
#
|
||||
ddb/db_access.c optional ddb
|
||||
ddb/db_aout.c optional ddb
|
||||
|
@ -53,6 +53,7 @@ kern/subr_disk.c standard
|
|||
kern/subr_log.c standard
|
||||
kern/subr_mcount.c optional profiling-routine
|
||||
kern/subr_prf.c standard
|
||||
kern/subr_prof.c standard
|
||||
kern/subr_rmap.c standard
|
||||
kern/subr_xxx.c standard
|
||||
kern/sys_generic.c standard
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh -
|
||||
#
|
||||
# Copyright (c) 1984, 1986, 1990 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 1984, 1986, 1990, 1993
|
||||
# The Regents of the University of California. All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
@ -31,26 +31,26 @@
|
|||
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
#
|
||||
# from: @(#)newvers.sh 7.4 (Berkeley) 12/7/90
|
||||
# $Id: newvers.sh,v 1.11 1993/12/18 04:21:35 mycroft Exp $
|
||||
#
|
||||
# from: @(#)newvers.sh 8.1 (Berkeley) 4/20/94
|
||||
# $Id: newvers.sh,v 1.12 1994/05/05 05:37:45 cgd Exp $
|
||||
|
||||
if [ ! -r version ]
|
||||
then
|
||||
echo 0 > version
|
||||
else
|
||||
expr `cat version` + 1 > version
|
||||
fi
|
||||
|
||||
touch version
|
||||
v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date`
|
||||
id=`basename ${d}`
|
||||
|
||||
kernvers="NetBSD 0.9a"
|
||||
v=`cat version`
|
||||
t=`date`
|
||||
user=${USER-root}
|
||||
host=`hostname`
|
||||
dir=`pwd`
|
||||
ident=`basename $dir`
|
||||
(
|
||||
echo "char version[] = \"${kernvers} ($ident) #${v}: ${t}\\n ${user}@${host}:${dir}\\n\";"
|
||||
) > vers.c
|
||||
ost="NetBSD"
|
||||
osr="${ost} 0.9B"
|
||||
|
||||
echo "char ostype[] = \"${ost}\";" > vers.c
|
||||
echo "char osrelease[] = \"${osr}\";" >> vers.c
|
||||
echo "char sccs[4] = { '@', '(', '#', ')' };" >> vers.c
|
||||
echo \
|
||||
"char version[] = \"${osr} (${id}) #${v}: ${t}\\n ${u}@${h}:${d}\\n\";" \
|
||||
>> vers.c
|
||||
|
||||
echo `expr ${v} + 1` > version
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: wd.c,v 1.80 1994/04/25 03:16:03 mycroft Exp $
|
||||
* $Id: wd.c,v 1.81 1994/05/05 05:37:05 cgd Exp $
|
||||
*/
|
||||
|
||||
#define INSTRUMENT /* instrumentation stuff by Brad Parker */
|
||||
|
@ -165,9 +165,9 @@ static int wdsetctlr __P((struct wd_softc *));
|
|||
static int wdgetctlr __P((struct wd_softc *));
|
||||
static void bad144intern __P((struct wd_softc *));
|
||||
static int wdcreset __P((struct wdc_softc *));
|
||||
static void wdcrestart __P((struct wdc_softc *));
|
||||
static void wdcrestart __P((void *arg));
|
||||
static void wdcunwedge __P((struct wdc_softc *));
|
||||
static void wdctimeout __P((struct wdc_softc *));
|
||||
static void wdctimeout __P((void *arg));
|
||||
void wddisksort __P((struct buf *, struct buf *));
|
||||
static void wderror __P((void *, struct buf *, char *));
|
||||
int wdcwait __P((struct wdc_softc *, int));
|
||||
|
@ -1484,9 +1484,10 @@ wdcreset(wdc)
|
|||
}
|
||||
|
||||
static void
|
||||
wdcrestart(wdc)
|
||||
struct wdc_softc *wdc;
|
||||
wdcrestart(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct wdc_softc *wdc = (struct wdc_softc *)arg;
|
||||
int s = splbio();
|
||||
|
||||
wdcstart(wdc);
|
||||
|
@ -1522,7 +1523,7 @@ wdcunwedge(wdc)
|
|||
++wdc->sc_errors;
|
||||
|
||||
/* Wake up in a little bit and restart the operation. */
|
||||
timeout((timeout_t)wdcrestart, (caddr_t)wdc, RECOVERYTIME);
|
||||
timeout(wdcrestart, (caddr_t)wdc, RECOVERYTIME);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1553,16 +1554,17 @@ wdcwait(wdc, mask)
|
|||
}
|
||||
|
||||
static void
|
||||
wdctimeout(wdc)
|
||||
struct wdc_softc *wdc;
|
||||
wdctimeout(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct wdc_softc *wdc = (struct wdc_softc *)arg;
|
||||
int s = splbio();
|
||||
|
||||
if (wdc->sc_timeout && --wdc->sc_timeout == 0) {
|
||||
wderror(wdc, NULL, "lost interrupt");
|
||||
wdcunwedge(wdc);
|
||||
}
|
||||
timeout((timeout_t)wdctimeout, (caddr_t)wdc, hz);
|
||||
timeout(wdctimeout, (caddr_t)wdc, hz);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: aha1742.c,v 1.30 1994/04/29 23:15:54 cgd Exp $
|
||||
* $Id: aha1742.c,v 1.31 1994/05/05 05:36:23 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -303,7 +303,7 @@ int ahb_find __P((struct ahb_softc *));
|
|||
void ahb_init __P((struct ahb_softc *));
|
||||
void ahbminphys __P((struct buf *));
|
||||
int ahb_scsi_cmd __P((struct scsi_xfer *));
|
||||
void ahb_timeout __P((caddr_t));
|
||||
void ahb_timeout __P((void *));
|
||||
void ahb_print_ecb __P((struct ecb *));
|
||||
void ahb_print_active_ecb __P((struct ahb_softc *));
|
||||
|
||||
|
@ -667,7 +667,7 @@ ahbintr(ahb)
|
|||
if ((ahb_debug & AHB_SHOWECBS) && ecb)
|
||||
printf("<int ecb(%x)>", ecb);
|
||||
#endif /*AHBDEBUG */
|
||||
untimeout((timeout_t)ahb_timeout, (caddr_t)ecb);
|
||||
untimeout(ahb_timeout, (caddr_t)ecb);
|
||||
ahb_done(ahb, ecb, stat != AHB_ECB_OK);
|
||||
}
|
||||
} while (inb(port + G2STAT) & G2STAT_INT_PEND);
|
||||
|
@ -1028,7 +1028,7 @@ ahb_scsi_cmd(xs)
|
|||
if (!(flags & SCSI_NOMASK)) {
|
||||
s = splbio();
|
||||
ahb_send_immed(ahb, sc_link->target, AHB_TARG_RESET);
|
||||
timeout((timeout_t)ahb_timeout, ecb,
|
||||
timeout(ahb_timeout, ecb,
|
||||
(xs->timeout * hz) / 1000);
|
||||
splx(s);
|
||||
return SUCCESSFULLY_QUEUED;
|
||||
|
@ -1165,7 +1165,7 @@ ahb_scsi_cmd(xs)
|
|||
if (!(flags & SCSI_NOMASK)) {
|
||||
s = splbio();
|
||||
ahb_send_mbox(ahb, OP_START_ECB, sc_link->target, ecb);
|
||||
timeout((timeout_t)ahb_timeout, ecb, (xs->timeout * hz) / 1000);
|
||||
timeout(ahb_timeout, ecb, (xs->timeout * hz) / 1000);
|
||||
splx(s);
|
||||
SC_DEBUG(sc_link, SDEV_DB3, ("cmd_sent\n"));
|
||||
return SUCCESSFULLY_QUEUED;
|
||||
|
@ -1197,10 +1197,10 @@ ahb_scsi_cmd(xs)
|
|||
|
||||
void
|
||||
ahb_timeout(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
struct ecb *ecb = (void *)arg;
|
||||
struct ecb *ecb = (struct ecb *)arg;
|
||||
struct ahb_softc *ahb = ecb->xs->sc_link->adapter_softc;
|
||||
|
||||
sc_print_addr(ecb->xs->sc_link);
|
||||
|
@ -1235,7 +1235,7 @@ ahb_timeout(arg)
|
|||
} else { /* abort the operation that has timed out */
|
||||
printf("\n");
|
||||
ahb_send_mbox(ahb, OP_ABORT_ECB, ecb->xs->sc_link->target, ecb);
|
||||
timeout((timeout_t)ahb_timeout, ecb, 2 * hz);
|
||||
timeout(ahb_timeout, ecb, 2 * hz);
|
||||
ecb->flags = ECB_ABORTED;
|
||||
}
|
||||
splx(s);
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* $Id: aic6360.c,v 1.4 1994/05/03 08:20:43 mycroft Exp $
|
||||
* $Id: aic6360.c,v 1.5 1994/05/05 05:36:25 cgd Exp $
|
||||
*
|
||||
* Acknowledgements: Many of the algorithms used in this driver are
|
||||
* inspired by the work of Julian Elischer (julian@tfs.com) and
|
||||
|
@ -643,7 +643,7 @@ int aic_scsi_cmd __P((struct scsi_xfer *));
|
|||
int aic_poll __P((struct aic_softc *, struct acb *));
|
||||
void aic_add_timeout __P((struct acb *, int));
|
||||
void aic_remove_timeout __P((struct acb *));
|
||||
void aic_timeout __P((caddr_t));
|
||||
void aic_timeout __P((void *arg));
|
||||
int aic_find __P((struct aic_softc *));
|
||||
void aic_sched __P((struct aic_softc *));
|
||||
void aic_scsi_reset __P((struct aic_softc *));
|
||||
|
@ -902,13 +902,13 @@ aic_init(aic)
|
|||
aic->state = AIC_CLEANING;
|
||||
if (aic->nexus != NULL) {
|
||||
aic->nexus->xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, aic->nexus);
|
||||
untimeout(aic_timeout, aic->nexus);
|
||||
aic_done(aic->nexus);
|
||||
}
|
||||
aic->nexus = NULL;
|
||||
while (acb = aic->nexus_list.tqh_first) {
|
||||
acb->xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
}
|
||||
}
|
||||
|
@ -1006,7 +1006,7 @@ aic_scsi_cmd(xs)
|
|||
s = splbio();
|
||||
|
||||
TAILQ_INSERT_TAIL(&aic->ready_list, acb, chain);
|
||||
timeout((timeout_t)aic_timeout, acb, (xs->timeout*hz)/1000);
|
||||
timeout(aic_timeout, acb, (xs->timeout*hz)/1000);
|
||||
|
||||
if (aic->state == AIC_IDLE)
|
||||
aic_sched(aic);
|
||||
|
@ -1429,7 +1429,7 @@ aic_msgin(aic)
|
|||
}
|
||||
acb->xs->resid = acb->dleft = aic->dleft;
|
||||
aic->flags |= AIC_BUSFREE_OK;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
break;
|
||||
case MSG_MESSAGE_REJECT:
|
||||
|
@ -2070,7 +2070,7 @@ aicintr(aic)
|
|||
*/
|
||||
printf("aic: unexpected busfree\n");
|
||||
xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
}
|
||||
LOGLINE(aic);
|
||||
|
@ -2091,7 +2091,7 @@ aicintr(aic)
|
|||
outb(CLRSINT1, CLRSELTIMO);
|
||||
aic->state = AIC_IDLE;
|
||||
acb->xs->error = XS_TIMEOUT;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
LOGLINE(aic);
|
||||
outb(DMACNTRL0, INTEN);
|
||||
|
@ -2169,7 +2169,7 @@ aicintr(aic)
|
|||
__LINE__);
|
||||
Debugger();
|
||||
acb->xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
aic_init(aic);
|
||||
return 1;
|
||||
|
@ -2186,7 +2186,7 @@ aicintr(aic)
|
|||
__LINE__);
|
||||
Debugger();
|
||||
acb->xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
aic_init(aic);
|
||||
return 1;
|
||||
|
@ -2258,10 +2258,10 @@ aicintr(aic)
|
|||
|
||||
void
|
||||
aic_timeout(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
struct acb *acb = (void *)arg;
|
||||
struct acb *acb = (struct acb *)arg;
|
||||
struct aic_softc *aic;
|
||||
|
||||
aic = acb->xs->sc_link->adapter_softc;
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: lpt.c,v 1.17 1994/04/22 23:02:40 mycroft Exp $
|
||||
* $Id: lpt.c,v 1.18 1994/05/05 05:36:39 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -124,7 +124,7 @@ struct cfdriver lptcd = {
|
|||
static int notready __P((u_char, struct lpt_softc *));
|
||||
#endif
|
||||
|
||||
static void lptout __P((struct lpt_softc *));
|
||||
static void lptout __P((void *arg));
|
||||
static int pushbytes __P((struct lpt_softc *));
|
||||
|
||||
/*
|
||||
|
@ -357,11 +357,13 @@ notready(status, sc)
|
|||
#endif
|
||||
|
||||
void
|
||||
lptout(sc)
|
||||
struct lpt_softc *sc;
|
||||
lptout(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct lpt_softc *sc;
|
||||
int s;
|
||||
|
||||
sc = (struct lpt_softc *)arg;
|
||||
if (sc->sc_flags & LPT_NOINTR)
|
||||
return;
|
||||
|
||||
|
@ -369,7 +371,7 @@ lptout(sc)
|
|||
lptintr(sc);
|
||||
splx(s);
|
||||
|
||||
timeout((timeout_t)lptout, (caddr_t)sc, STEP);
|
||||
timeout(lptout, (caddr_t)sc, STEP);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: lptvar.h,v 1.17 1994/04/22 23:02:40 mycroft Exp $
|
||||
* $Id: lptvar.h,v 1.18 1994/05/05 05:36:39 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -124,7 +124,7 @@ struct cfdriver lptcd = {
|
|||
static int notready __P((u_char, struct lpt_softc *));
|
||||
#endif
|
||||
|
||||
static void lptout __P((struct lpt_softc *));
|
||||
static void lptout __P((void *arg));
|
||||
static int pushbytes __P((struct lpt_softc *));
|
||||
|
||||
/*
|
||||
|
@ -357,11 +357,13 @@ notready(status, sc)
|
|||
#endif
|
||||
|
||||
void
|
||||
lptout(sc)
|
||||
struct lpt_softc *sc;
|
||||
lptout(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct lpt_softc *sc;
|
||||
int s;
|
||||
|
||||
sc = (struct lpt_softc *)arg;
|
||||
if (sc->sc_flags & LPT_NOINTR)
|
||||
return;
|
||||
|
||||
|
@ -369,7 +371,7 @@ lptout(sc)
|
|||
lptintr(sc);
|
||||
splx(s);
|
||||
|
||||
timeout((timeout_t)lptout, (caddr_t)sc, STEP);
|
||||
timeout(lptout, (caddr_t)sc, STEP);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: aha1542.c,v 1.29 1994/05/03 20:53:54 mycroft Exp $
|
||||
* $Id: aha1542.c,v 1.30 1994/05/05 05:36:20 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -335,7 +335,7 @@ int aha_scsi_cmd __P((struct scsi_xfer *));
|
|||
int aha_poll __P((struct aha_softc *, struct scsi_xfer *, struct aha_ccb *));
|
||||
int aha_set_bus_speed __P((struct aha_softc *));
|
||||
int aha_bus_speed_check __P((struct aha_softc *, int));
|
||||
void aha_timeout __P((caddr_t));
|
||||
void aha_timeout __P((void *arg));
|
||||
|
||||
struct scsi_adapter aha_switch = {
|
||||
aha_scsi_cmd,
|
||||
|
@ -703,7 +703,7 @@ ahaintr(aha)
|
|||
#endif /*AHADEBUG */
|
||||
}
|
||||
if (ccb) {
|
||||
untimeout((timeout_t)aha_timeout, ccb);
|
||||
untimeout(aha_timeout, ccb);
|
||||
aha_done(aha, ccb);
|
||||
}
|
||||
aha->aha_mbx.mbi[i].stat = AHA_MBI_FREE;
|
||||
|
@ -1207,7 +1207,7 @@ aha_scsi_cmd(xs)
|
|||
bcopy(xs->cmd, &ccb->scsi_cmd, ccb->scsi_cmd_length);
|
||||
if (!(flags & SCSI_NOMASK)) {
|
||||
s = splbio(); /* stop instant timeouts */
|
||||
timeout((timeout_t)aha_timeout, ccb, (xs->timeout * hz) / 1000);
|
||||
timeout(aha_timeout, ccb, (xs->timeout * hz) / 1000);
|
||||
aha_startmbx(ccb->mbx);
|
||||
/*
|
||||
* Usually return SUCCESSFULLY QUEUED
|
||||
|
@ -1264,7 +1264,7 @@ aha_poll(aha, xs, ccb)
|
|||
* because we are polling, take out the timeout entry
|
||||
* aha_timeout made
|
||||
*/
|
||||
untimeout((timeout_t)aha_timeout, ccb);
|
||||
untimeout(aha_timeout, ccb);
|
||||
count = 2000;
|
||||
while (count) {
|
||||
/*
|
||||
|
@ -1404,10 +1404,10 @@ aha_bus_speed_check(aha, speed)
|
|||
|
||||
void
|
||||
aha_timeout(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
struct aha_ccb *ccb = (void *)arg;
|
||||
struct aha_ccb *ccb = (struct aha_ccb *)arg;
|
||||
struct aha_softc *aha;
|
||||
|
||||
aha = ccb->xfer->sc_link->adapter_softc;
|
||||
|
@ -1439,7 +1439,7 @@ aha_timeout(arg)
|
|||
printf("\n");
|
||||
aha_abortmbx(ccb->mbx);
|
||||
/* 4 secs for the abort */
|
||||
timeout((timeout_t)aha_timeout, ccb, 2 * hz);
|
||||
timeout(aha_timeout, ccb, 2 * hz);
|
||||
ccb->flags = CCB_ABORTED;
|
||||
}
|
||||
splx(s);
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* $Id: aic6360.c,v 1.4 1994/05/03 08:20:43 mycroft Exp $
|
||||
* $Id: aic6360.c,v 1.5 1994/05/05 05:36:25 cgd Exp $
|
||||
*
|
||||
* Acknowledgements: Many of the algorithms used in this driver are
|
||||
* inspired by the work of Julian Elischer (julian@tfs.com) and
|
||||
|
@ -643,7 +643,7 @@ int aic_scsi_cmd __P((struct scsi_xfer *));
|
|||
int aic_poll __P((struct aic_softc *, struct acb *));
|
||||
void aic_add_timeout __P((struct acb *, int));
|
||||
void aic_remove_timeout __P((struct acb *));
|
||||
void aic_timeout __P((caddr_t));
|
||||
void aic_timeout __P((void *arg));
|
||||
int aic_find __P((struct aic_softc *));
|
||||
void aic_sched __P((struct aic_softc *));
|
||||
void aic_scsi_reset __P((struct aic_softc *));
|
||||
|
@ -902,13 +902,13 @@ aic_init(aic)
|
|||
aic->state = AIC_CLEANING;
|
||||
if (aic->nexus != NULL) {
|
||||
aic->nexus->xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, aic->nexus);
|
||||
untimeout(aic_timeout, aic->nexus);
|
||||
aic_done(aic->nexus);
|
||||
}
|
||||
aic->nexus = NULL;
|
||||
while (acb = aic->nexus_list.tqh_first) {
|
||||
acb->xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
}
|
||||
}
|
||||
|
@ -1006,7 +1006,7 @@ aic_scsi_cmd(xs)
|
|||
s = splbio();
|
||||
|
||||
TAILQ_INSERT_TAIL(&aic->ready_list, acb, chain);
|
||||
timeout((timeout_t)aic_timeout, acb, (xs->timeout*hz)/1000);
|
||||
timeout(aic_timeout, acb, (xs->timeout*hz)/1000);
|
||||
|
||||
if (aic->state == AIC_IDLE)
|
||||
aic_sched(aic);
|
||||
|
@ -1429,7 +1429,7 @@ aic_msgin(aic)
|
|||
}
|
||||
acb->xs->resid = acb->dleft = aic->dleft;
|
||||
aic->flags |= AIC_BUSFREE_OK;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
break;
|
||||
case MSG_MESSAGE_REJECT:
|
||||
|
@ -2070,7 +2070,7 @@ aicintr(aic)
|
|||
*/
|
||||
printf("aic: unexpected busfree\n");
|
||||
xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
}
|
||||
LOGLINE(aic);
|
||||
|
@ -2091,7 +2091,7 @@ aicintr(aic)
|
|||
outb(CLRSINT1, CLRSELTIMO);
|
||||
aic->state = AIC_IDLE;
|
||||
acb->xs->error = XS_TIMEOUT;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
LOGLINE(aic);
|
||||
outb(DMACNTRL0, INTEN);
|
||||
|
@ -2169,7 +2169,7 @@ aicintr(aic)
|
|||
__LINE__);
|
||||
Debugger();
|
||||
acb->xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
aic_init(aic);
|
||||
return 1;
|
||||
|
@ -2186,7 +2186,7 @@ aicintr(aic)
|
|||
__LINE__);
|
||||
Debugger();
|
||||
acb->xs->error = XS_DRIVER_STUFFUP;
|
||||
untimeout((timeout_t)aic_timeout, acb);
|
||||
untimeout(aic_timeout, acb);
|
||||
aic_done(acb);
|
||||
aic_init(aic);
|
||||
return 1;
|
||||
|
@ -2258,10 +2258,10 @@ aicintr(aic)
|
|||
|
||||
void
|
||||
aic_timeout(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
struct acb *acb = (void *)arg;
|
||||
struct acb *acb = (struct acb *)arg;
|
||||
struct aic_softc *aic;
|
||||
|
||||
aic = acb->xs->sc_link->adapter_softc;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bt742a.c,v 1.25 1994/04/29 23:16:00 cgd Exp $
|
||||
* $Id: bt742a.c,v 1.26 1994/05/05 05:36:28 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -370,7 +370,7 @@ void bt_inquire_setup_information __P((struct bt_softc *));
|
|||
void btminphys __P((struct buf *));
|
||||
int bt_scsi_cmd __P((struct scsi_xfer *));
|
||||
int bt_poll __P((struct bt_softc *, struct scsi_xfer *, struct bt_ccb *));
|
||||
void bt_timeout __P((caddr_t));
|
||||
void bt_timeout __P((void *arg));
|
||||
#ifdef UTEST
|
||||
void bt_print_ccb __P((struct bt_ccb *));
|
||||
void bt_print_active_ccbs __P((struct bt_softc *));
|
||||
|
@ -746,7 +746,7 @@ btintr(bt)
|
|||
}
|
||||
wmbi->stat = BT_MBI_FREE;
|
||||
if (ccb) {
|
||||
untimeout((timeout_t)bt_timeout, ccb);
|
||||
untimeout(bt_timeout, ccb);
|
||||
bt_done(bt, ccb);
|
||||
}
|
||||
/* Set the IN mail Box pointer for next */ bt_nextmbx(wmbi, wmbx, mbi);
|
||||
|
@ -1363,7 +1363,7 @@ bt_scsi_cmd(xs)
|
|||
*/
|
||||
SC_DEBUG(sc_link, SDEV_DB3, ("cmd_sent\n"));
|
||||
if (!(flags & SCSI_NOMASK)) {
|
||||
timeout((timeout_t)bt_timeout, ccb, (xs->timeout * hz) / 1000);
|
||||
timeout(bt_timeout, ccb, (xs->timeout * hz) / 1000);
|
||||
return SUCCESSFULLY_QUEUED;
|
||||
}
|
||||
|
||||
|
@ -1412,7 +1412,7 @@ bt_poll(bt, xs, ccb)
|
|||
* because we are polling, take out the timeout entry
|
||||
* bt_timeout made
|
||||
*/
|
||||
untimeout((timeout_t)bt_timeout, ccb);
|
||||
untimeout(bt_timeout, ccb);
|
||||
count = 2000;
|
||||
while (count) {
|
||||
/*
|
||||
|
@ -1441,10 +1441,10 @@ bt_poll(bt, xs, ccb)
|
|||
|
||||
void
|
||||
bt_timeout(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
struct bt_ccb *ccb = (void *)arg;
|
||||
struct bt_ccb *ccb = (struct bt_ccb *)arg;
|
||||
struct bt_softc *bt;
|
||||
|
||||
bt = ccb->xfer->sc_link->adapter_softc;
|
||||
|
@ -1479,7 +1479,7 @@ bt_timeout(arg)
|
|||
printf("\n");
|
||||
bt_send_mbo(bt, ~SCSI_NOMASK, BT_MBO_ABORT, ccb);
|
||||
/* 2 secs for the abort */
|
||||
timeout((timeout_t)bt_timeout, ccb, 2 * hz);
|
||||
timeout(bt_timeout, ccb, 2 * hz);
|
||||
ccb->flags = CCB_ABORTED;
|
||||
}
|
||||
splx(s);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
|
||||
* $Id: isa.c,v 1.54 1994/05/03 20:32:22 mycroft Exp $
|
||||
* $Id: isa.c,v 1.55 1994/05/05 05:36:35 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -259,6 +259,8 @@ void
|
|||
isa_configure()
|
||||
{
|
||||
|
||||
startrtclock();
|
||||
|
||||
while (config_search(isasubmatch, NULL, NULL));
|
||||
|
||||
printf("biomask %x netmask %x ttymask %x\n",
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: lpt.c,v 1.17 1994/04/22 23:02:40 mycroft Exp $
|
||||
* $Id: lpt.c,v 1.18 1994/05/05 05:36:39 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -124,7 +124,7 @@ struct cfdriver lptcd = {
|
|||
static int notready __P((u_char, struct lpt_softc *));
|
||||
#endif
|
||||
|
||||
static void lptout __P((struct lpt_softc *));
|
||||
static void lptout __P((void *arg));
|
||||
static int pushbytes __P((struct lpt_softc *));
|
||||
|
||||
/*
|
||||
|
@ -357,11 +357,13 @@ notready(status, sc)
|
|||
#endif
|
||||
|
||||
void
|
||||
lptout(sc)
|
||||
struct lpt_softc *sc;
|
||||
lptout(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct lpt_softc *sc;
|
||||
int s;
|
||||
|
||||
sc = (struct lpt_softc *)arg;
|
||||
if (sc->sc_flags & LPT_NOINTR)
|
||||
return;
|
||||
|
||||
|
@ -369,7 +371,7 @@ lptout(sc)
|
|||
lptintr(sc);
|
||||
splx(s);
|
||||
|
||||
timeout((timeout_t)lptout, (caddr_t)sc, STEP);
|
||||
timeout(lptout, (caddr_t)sc, STEP);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: lpt_isa.c,v 1.17 1994/04/22 23:02:40 mycroft Exp $
|
||||
* $Id: lpt_isa.c,v 1.18 1994/05/05 05:36:39 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -124,7 +124,7 @@ struct cfdriver lptcd = {
|
|||
static int notready __P((u_char, struct lpt_softc *));
|
||||
#endif
|
||||
|
||||
static void lptout __P((struct lpt_softc *));
|
||||
static void lptout __P((void *arg));
|
||||
static int pushbytes __P((struct lpt_softc *));
|
||||
|
||||
/*
|
||||
|
@ -357,11 +357,13 @@ notready(status, sc)
|
|||
#endif
|
||||
|
||||
void
|
||||
lptout(sc)
|
||||
struct lpt_softc *sc;
|
||||
lptout(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct lpt_softc *sc;
|
||||
int s;
|
||||
|
||||
sc = (struct lpt_softc *)arg;
|
||||
if (sc->sc_flags & LPT_NOINTR)
|
||||
return;
|
||||
|
||||
|
@ -369,7 +371,7 @@ lptout(sc)
|
|||
lptintr(sc);
|
||||
splx(s);
|
||||
|
||||
timeout((timeout_t)lptout, (caddr_t)sc, STEP);
|
||||
timeout(lptout, (caddr_t)sc, STEP);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mcd.c,v 1.12 1994/04/22 23:02:42 mycroft Exp $
|
||||
* $Id: mcd.c,v 1.13 1994/05/05 05:36:42 cgd Exp $
|
||||
*/
|
||||
|
||||
/*static char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore";*/
|
||||
|
@ -148,8 +148,9 @@ void hsg2msf __P((int, bcd_t *));
|
|||
int msf2hsg __P((bcd_t *));
|
||||
int mcd_volinfo __P((struct mcd_softc *));
|
||||
int mcdintr __P((struct mcd_softc *));
|
||||
void mcd_doread __P((int, struct mcd_mbx *));
|
||||
int mcd_setmode __P((struct mcd_softc *, int));
|
||||
void mcd_doread __P((int, struct mcd_mbx *));
|
||||
void mcd_doreadtimeout __P((void *arg));
|
||||
int mcd_toc_header __P((struct mcd_softc *, struct ioc_toc_header *));
|
||||
int mcd_read_toc __P((struct mcd_softc *));
|
||||
int mcd_toc_entry __P((struct mcd_softc *, struct ioc_read_toc_entry *));
|
||||
|
@ -839,6 +840,15 @@ mcdintr(sc)
|
|||
*/
|
||||
struct mcd_mbx *mbxsave;
|
||||
|
||||
void
|
||||
mcd_doreadtimeout(arg)
|
||||
void *arg;
|
||||
{
|
||||
int state = (long)arg;
|
||||
|
||||
mcd_doread(state, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
mcd_doread(state, mbxin)
|
||||
int state;
|
||||
|
@ -863,16 +873,16 @@ loop:
|
|||
/* Get status. */
|
||||
outb(iobase + mcd_command, MCD_CMDGETSTAT);
|
||||
mbx->count = RDELAY_WAITSTAT;
|
||||
timeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITSTAT,
|
||||
timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITSTAT,
|
||||
hz/100);
|
||||
return;
|
||||
|
||||
case MCD_S_WAITSTAT:
|
||||
untimeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITSTAT);
|
||||
untimeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITSTAT);
|
||||
if (mbx->count-- >= 0) {
|
||||
if (inb(iobase + mcd_xfer) & MCD_ST_BUSY) {
|
||||
timeout((timeout_t) mcd_doread,
|
||||
(caddr_t) MCD_S_WAITSTAT, hz/100);
|
||||
timeout(mcd_doreadtimeout,
|
||||
(caddr_t)MCD_S_WAITSTAT, hz/100);
|
||||
return;
|
||||
}
|
||||
mcd_setflags(sc);
|
||||
|
@ -898,8 +908,8 @@ loop:
|
|||
|
||||
mcd_put(iobase + mcd_command, MCD_CMDSETMODE);
|
||||
mcd_put(iobase + mcd_command, rm);
|
||||
timeout((timeout_t) mcd_doread,
|
||||
(caddr_t) MCD_S_WAITMODE, hz/100);
|
||||
timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITMODE,
|
||||
hz/100);
|
||||
return;
|
||||
} else {
|
||||
printf("%s: timeout getting status\n",
|
||||
|
@ -908,15 +918,15 @@ loop:
|
|||
}
|
||||
|
||||
case MCD_S_WAITMODE:
|
||||
untimeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITMODE);
|
||||
untimeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITMODE);
|
||||
if (mbx->count-- < 0) {
|
||||
printf("%s: timeout setting mode\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
goto readerr;
|
||||
}
|
||||
if (inb(iobase + mcd_xfer) & MCD_ST_BUSY) {
|
||||
timeout((timeout_t) mcd_doread,
|
||||
(caddr_t) MCD_S_WAITMODE, hz/100);
|
||||
timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITMODE,
|
||||
hz/100);
|
||||
return;
|
||||
}
|
||||
mcd_setflags(sc);
|
||||
|
@ -945,12 +955,11 @@ nextblock:
|
|||
mcd_put(iobase + mcd_command, 0);
|
||||
mcd_put(iobase + mcd_command, 1);
|
||||
mbx->count = RDELAY_WAITREAD;
|
||||
timeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITREAD,
|
||||
hz/100);
|
||||
timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITREAD, hz/100);
|
||||
return;
|
||||
|
||||
case MCD_S_WAITREAD:
|
||||
untimeout((timeout_t) mcd_doread, (caddr_t) MCD_S_WAITREAD);
|
||||
untimeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITREAD);
|
||||
if (mbx->count-- > 0) {
|
||||
k = inb(iobase + mcd_xfer);
|
||||
if ((k & 2) == 0) { /* XXX MCD_ST_AUDIOBSY? */
|
||||
|
@ -978,8 +987,8 @@ nextblock:
|
|||
}
|
||||
if ((k & MCD_ST_BUSY) == 0)
|
||||
mcd_getstat(sc, 0);
|
||||
timeout((timeout_t) mcd_doread,
|
||||
(caddr_t) MCD_S_WAITREAD, hz/100);
|
||||
timeout(mcd_doreadtimeout, (caddr_t)MCD_S_WAITREAD,
|
||||
hz/100);
|
||||
return;
|
||||
} else {
|
||||
printf("%s: timeout reading data\n",
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: ultra14f.c,v 1.27 1994/04/29 23:16:02 cgd Exp $
|
||||
* $Id: ultra14f.c,v 1.28 1994/05/05 05:36:58 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -267,7 +267,7 @@ int uha_find __P((struct uha_softc *));
|
|||
void uha_init __P((struct uha_softc *));
|
||||
void uhaminphys __P((struct buf *));
|
||||
int uha_scsi_cmd __P((struct scsi_xfer *));
|
||||
void uha_timeout __P((caddr_t));
|
||||
void uha_timeout __P((void *arg));
|
||||
#ifdef UHADEBUG
|
||||
void uha_print_mscp __P((struct mscp *));
|
||||
void uha_print_active_mscp __P((struct uha_softc *));
|
||||
|
@ -559,7 +559,7 @@ uhaintr(uha)
|
|||
printf("uha: BAD MSCP RETURNED\n");
|
||||
return 0; /* whatever it was, it'll timeout */
|
||||
}
|
||||
untimeout((timeout_t)uha_timeout, mscp);
|
||||
untimeout(uha_timeout, mscp);
|
||||
|
||||
uha_done(uha, mscp);
|
||||
} while (inb(iobase + UHA_SINT) & UHA_SINTP);
|
||||
|
@ -1057,7 +1057,7 @@ uha_scsi_cmd(xs)
|
|||
if (!(flags & SCSI_NOMASK)) {
|
||||
s = splbio();
|
||||
uha_send_mbox(uha, mscp);
|
||||
timeout((timeout_t)uha_timeout, mscp,
|
||||
timeout(uha_timeout, mscp,
|
||||
(xs->timeout * hz) / 1000);
|
||||
splx(s);
|
||||
SC_DEBUG(sc_link, SDEV_DB3, ("cmd_sent\n"));
|
||||
|
@ -1089,10 +1089,10 @@ uha_scsi_cmd(xs)
|
|||
|
||||
void
|
||||
uha_timeout(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
int s = splbio();
|
||||
struct mscp *mscp = (void *)arg;
|
||||
struct mscp *mscp = (struct mscp *)arg;
|
||||
struct uha_softc *uha = mscp->xs->sc_link->adapter_softc;
|
||||
|
||||
sc_print_addr(mscp->xs->sc_link);
|
||||
|
@ -1108,7 +1108,7 @@ uha_timeout(arg)
|
|||
uha_done(uha, mscp);
|
||||
} else { /* abort the operation that has timed out */
|
||||
printf("\n");
|
||||
timeout((timeout_t)uha_timeout, mscp, 2 * hz);
|
||||
timeout(uha_timeout, mscp, 2 * hz);
|
||||
mscp->flags = MSCP_ABORTED;
|
||||
}
|
||||
splx(s);
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
|
||||
* $Id: wd.c,v 1.80 1994/04/25 03:16:03 mycroft Exp $
|
||||
* $Id: wd.c,v 1.81 1994/05/05 05:37:05 cgd Exp $
|
||||
*/
|
||||
|
||||
#define INSTRUMENT /* instrumentation stuff by Brad Parker */
|
||||
|
@ -165,9 +165,9 @@ static int wdsetctlr __P((struct wd_softc *));
|
|||
static int wdgetctlr __P((struct wd_softc *));
|
||||
static void bad144intern __P((struct wd_softc *));
|
||||
static int wdcreset __P((struct wdc_softc *));
|
||||
static void wdcrestart __P((struct wdc_softc *));
|
||||
static void wdcrestart __P((void *arg));
|
||||
static void wdcunwedge __P((struct wdc_softc *));
|
||||
static void wdctimeout __P((struct wdc_softc *));
|
||||
static void wdctimeout __P((void *arg));
|
||||
void wddisksort __P((struct buf *, struct buf *));
|
||||
static void wderror __P((void *, struct buf *, char *));
|
||||
int wdcwait __P((struct wdc_softc *, int));
|
||||
|
@ -1484,9 +1484,10 @@ wdcreset(wdc)
|
|||
}
|
||||
|
||||
static void
|
||||
wdcrestart(wdc)
|
||||
struct wdc_softc *wdc;
|
||||
wdcrestart(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct wdc_softc *wdc = (struct wdc_softc *)arg;
|
||||
int s = splbio();
|
||||
|
||||
wdcstart(wdc);
|
||||
|
@ -1522,7 +1523,7 @@ wdcunwedge(wdc)
|
|||
++wdc->sc_errors;
|
||||
|
||||
/* Wake up in a little bit and restart the operation. */
|
||||
timeout((timeout_t)wdcrestart, (caddr_t)wdc, RECOVERYTIME);
|
||||
timeout(wdcrestart, (caddr_t)wdc, RECOVERYTIME);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -1553,16 +1554,17 @@ wdcwait(wdc, mask)
|
|||
}
|
||||
|
||||
static void
|
||||
wdctimeout(wdc)
|
||||
struct wdc_softc *wdc;
|
||||
wdctimeout(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct wdc_softc *wdc = (struct wdc_softc *)arg;
|
||||
int s = splbio();
|
||||
|
||||
if (wdc->sc_timeout && --wdc->sc_timeout == 0) {
|
||||
wderror(wdc, NULL, "lost interrupt");
|
||||
wdcunwedge(wdc);
|
||||
}
|
||||
timeout((timeout_t)wdctimeout, (caddr_t)wdc, hz);
|
||||
timeout(wdctimeout, (caddr_t)wdc, hz);
|
||||
splx(s);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* This driver is derived from the old 386bsd Wangtek streamer tape driver,
|
||||
* made by Robert Baron at CMU, based on Intel sources.
|
||||
*
|
||||
* $Id: wt.c,v 1.13 1994/04/22 22:59:02 mycroft Exp $
|
||||
* $Id: wt.c,v 1.14 1994/05/05 05:37:09 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -153,7 +153,7 @@ int wtwait __P((struct wt_softc *sc, int catch, char *msg));
|
|||
int wtcmd __P((struct wt_softc *sc, int cmd));
|
||||
int wtstart __P((struct wt_softc *sc, int flag, void *vaddr, size_t len));
|
||||
void wtdma __P((struct wt_softc *sc));
|
||||
void wttimer __P((struct wt_softc *sc));
|
||||
void wttimer __P((void *arg));
|
||||
void wtclock __P((struct wt_softc *sc));
|
||||
int wtreset __P((struct wt_softc *sc));
|
||||
int wtsense __P((struct wt_softc *sc, int verbose, int ignore));
|
||||
|
@ -880,7 +880,7 @@ wtclock(sc)
|
|||
* Some controllers seem to lose dma interrupts too often. To make the
|
||||
* tape stream we need 1 tick timeout.
|
||||
*/
|
||||
timeout((timeout_t)wttimer, (caddr_t)sc, (sc->flags & TPACTIVE) ? 1 : hz);
|
||||
timeout(wttimer, (caddr_t)sc, (sc->flags & TPACTIVE) ? 1 : hz);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -889,9 +889,10 @@ wtclock(sc)
|
|||
* multiple devices on a single IRQ line.
|
||||
*/
|
||||
void
|
||||
wttimer(sc)
|
||||
struct wt_softc *sc;
|
||||
wttimer(arg)
|
||||
void *arg;
|
||||
{
|
||||
struct wt_softc *sc = (struct wt_softc *)arg;
|
||||
int s;
|
||||
|
||||
sc->flags &= ~TPTIMER;
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.39 intentionally removed
|
||||
revision 1.40 intentionally removed
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.19 intentionally removed
|
||||
revision 1.20 intentionally removed
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.16 intentionally removed
|
||||
revision 1.17 intentionally removed
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.17 intentionally removed
|
||||
revision 1.18 intentionally removed
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.13 intentionally removed
|
||||
revision 1.14 intentionally removed
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)kern_kinfo.c 7.17 (Berkeley) 6/26/91
|
||||
* $Id: kern_kinfo.c,v 1.14 1994/05/04 03:41:55 cgd Exp $
|
||||
* $Id: kern_kinfo.c,v 1.15 1994/05/05 05:38:11 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -161,7 +161,7 @@ kinfo_doproc(op, where, acopysize, arg, aneeded)
|
|||
p = (struct proc *)allproc;
|
||||
doingzomb = 0;
|
||||
again:
|
||||
for (; p != NULL; p = p->p_nxt) {
|
||||
for (; p != NULL; p = p->p_next) {
|
||||
/*
|
||||
* If process not yet fully-formed, skip it.
|
||||
*/
|
||||
|
@ -327,3 +327,11 @@ kinfo_file(op, where, acopysize, arg, aneeded)
|
|||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* XXX THE FOLLOWING DO NOT BLEONG HERE */
|
||||
char hostname[MAXHOSTNAMELEN];
|
||||
int hostnamelen;
|
||||
char domainname[MAXHOSTNAMELEN];
|
||||
int domainnamelen;
|
||||
long hostid;
|
||||
int securelevel;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)kern_ktrace.c 7.15 (Berkeley) 6/21/91
|
||||
* $Id: kern_ktrace.c,v 1.7 1993/12/18 04:20:37 mycroft Exp $
|
||||
* $Id: kern_ktrace.c,v 1.8 1994/05/05 05:38:13 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -225,7 +225,7 @@ ktrace(curp, uap, retval)
|
|||
* Clear all uses of the tracefile
|
||||
*/
|
||||
if (ops == KTROP_CLEARFILE) {
|
||||
for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt) {
|
||||
for (p = (struct proc *)allproc; p != NULL; p = p->p_next) {
|
||||
if (p->p_tracep == vp) {
|
||||
if (ktrcanset(curp, p)) {
|
||||
p->p_tracep = NULL;
|
||||
|
@ -395,7 +395,7 @@ ktrwrite(vp, kth)
|
|||
*/
|
||||
log(LOG_NOTICE, "ktrace write failed, errno %d, tracing stopped\n",
|
||||
error);
|
||||
for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt) {
|
||||
for (p = (struct proc *)allproc; p != NULL; p = p->p_next) {
|
||||
if (p->p_tracep == vp) {
|
||||
p->p_tracep = NULL;
|
||||
p->p_traceflag = 0;
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.14 intentionally removed
|
||||
revision 1.15 intentionally removed
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.19 intentionally removed
|
||||
revision 1.20 intentionally removed
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.16 intentionally removed
|
||||
revision 1.17 intentionally removed
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)kern_time.c 7.15 (Berkeley) 3/17/91
|
||||
* $Id: kern_time.c,v 1.5 1993/12/18 04:21:18 mycroft Exp $
|
||||
* $Id: kern_time.c,v 1.6 1994/05/05 05:38:20 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -187,7 +187,6 @@ struct getitimer_args {
|
|||
u_int which;
|
||||
struct itimerval *itv;
|
||||
};
|
||||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
getitimer(p, uap, retval)
|
||||
|
@ -213,7 +212,8 @@ getitimer(p, uap, retval)
|
|||
if (timercmp(&aitv.it_value, &time, <))
|
||||
timerclear(&aitv.it_value);
|
||||
else
|
||||
timevalsub(&aitv.it_value, &time);
|
||||
timevalsub(&aitv.it_value,
|
||||
(struct timeval *)&time);
|
||||
} else
|
||||
aitv = p->p_stats->p_timer[uap->which];
|
||||
splx(s);
|
||||
|
@ -251,10 +251,10 @@ setitimer(p, uap, retval)
|
|||
return (EINVAL);
|
||||
s = splclock();
|
||||
if (uap->which == ITIMER_REAL) {
|
||||
untimeout((timeout_t)realitexpire, (caddr_t)p);
|
||||
untimeout(realitexpire, (caddr_t)p);
|
||||
if (timerisset(&aitv.it_value)) {
|
||||
timevaladd(&aitv.it_value, &time);
|
||||
timeout((timeout_t)realitexpire, (caddr_t)p, hzto(&aitv.it_value));
|
||||
timevaladd(&aitv.it_value, (struct timeval *)&time);
|
||||
timeout(realitexpire, (caddr_t)p, hzto(&aitv.it_value));
|
||||
}
|
||||
p->p_realtimer = aitv;
|
||||
} else
|
||||
|
@ -272,11 +272,13 @@ setitimer(p, uap, retval)
|
|||
* SIGALRM calls to be compressed into one.
|
||||
*/
|
||||
void
|
||||
realitexpire(p)
|
||||
register struct proc *p;
|
||||
realitexpire(arg)
|
||||
void *arg;
|
||||
{
|
||||
register struct proc *p;
|
||||
int s;
|
||||
|
||||
p = (struct proc *)arg;
|
||||
psignal(p, SIGALRM);
|
||||
if (!timerisset(&p->p_realtimer.it_interval)) {
|
||||
timerclear(&p->p_realtimer.it_value);
|
||||
|
@ -287,7 +289,7 @@ realitexpire(p)
|
|||
timevaladd(&p->p_realtimer.it_value,
|
||||
&p->p_realtimer.it_interval);
|
||||
if (timercmp(&p->p_realtimer.it_value, &time, >)) {
|
||||
timeout((timeout_t)realitexpire, (caddr_t)p,
|
||||
timeout(realitexpire, (caddr_t)p,
|
||||
hzto(&p->p_realtimer.it_value));
|
||||
splx(s);
|
||||
return;
|
||||
|
|
|
@ -1 +1,628 @@
|
|||
revision 1.11 intentionally removed
|
||||
/*-
|
||||
* Copyright (c) 1986, 1988, 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
* (c) UNIX System Laboratories, Inc.
|
||||
* All or some portions of this file are derived from material licensed
|
||||
* to the University of California by American Telephone and Telegraph
|
||||
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
* the permission of UNIX System Laboratories, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)subr_prf.c 7.30 (Berkeley) 6/29/91
|
||||
* $Id: subr_prf.c,v 1.12 1994/05/05 05:38:22 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/msgbuf.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/file.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/tprintf.h>
|
||||
#include <sys/syslog.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
/*
|
||||
* Note that stdarg.h and the ANSI style va_start macro is used for both
|
||||
* ANSI and traditional C compilers.
|
||||
*/
|
||||
#include <machine/stdarg.h>
|
||||
|
||||
#ifdef KADB
|
||||
#include <machine/kdbparam.h>
|
||||
#endif
|
||||
|
||||
#define TOCONS 0x01
|
||||
#define TOTTY 0x02
|
||||
#define TOLOG 0x04
|
||||
|
||||
struct tty *constty; /* pointer to console "window" tty */
|
||||
|
||||
#if defined(KADB) || defined(PANICWAIT)
|
||||
extern cngetc(); /* standard console getc */
|
||||
#endif
|
||||
#ifdef KADB
|
||||
int (*v_getc)() = cngetc; /* "" getc from virtual console */
|
||||
extern cnpoll();
|
||||
int (*v_poll)() = cnpoll; /* kdb hook to enable input polling */
|
||||
#endif
|
||||
extern cnputc(); /* standard console putc */
|
||||
int (*v_putc)() = cnputc; /* routine to putc on virtual console */
|
||||
|
||||
static void logpri __P((int level));
|
||||
static void putchar __P((int ch, int flags, struct tty *tp));
|
||||
static char *ksprintn __P((u_long num, int base, int *len));
|
||||
void kprintf __P((const char *fmt, int flags, struct tty *tp, va_list));
|
||||
volatile void boot(int bootopt);
|
||||
|
||||
/*
|
||||
* Variable panicstr contains argument to first call to panic; used
|
||||
* as flag to indicate that the kernel has already called panic.
|
||||
*/
|
||||
const char *panicstr;
|
||||
|
||||
/*
|
||||
* Message buffer
|
||||
*/
|
||||
struct msgbuf *msgbufp;
|
||||
int msgbufmapped;
|
||||
|
||||
/*
|
||||
* Panic is called on unresolvable fatal errors. It prints "panic: mesg",
|
||||
* and then reboots. If we are called twice, then we avoid trying to sync
|
||||
* the disks as this often leads to recursive panics.
|
||||
*/
|
||||
#ifdef __STDC__
|
||||
volatile void
|
||||
panic(const char *fmt, ...)
|
||||
#else
|
||||
void
|
||||
panic(fmt)
|
||||
char *fmt;
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
int bootopt = RB_AUTOBOOT | RB_DUMP;
|
||||
char buf[256];
|
||||
|
||||
if (panicstr)
|
||||
bootopt |= RB_NOSYNC;
|
||||
else
|
||||
panicstr = fmt;
|
||||
|
||||
va_start(ap, fmt);
|
||||
sprintf(buf, "panic: %s\n", fmt);
|
||||
kprintf(buf, TOCONS | TOLOG, NULL, ap);
|
||||
va_end(ap);
|
||||
|
||||
#ifdef KGDB
|
||||
kgdb_panic();
|
||||
#endif
|
||||
#ifdef KADB
|
||||
if (boothowto & RB_KDB) {
|
||||
int s;
|
||||
|
||||
s = splnet(); /* below kdb pri */
|
||||
setsoftkdb();
|
||||
splx(s);
|
||||
}
|
||||
#endif
|
||||
#ifdef DDB
|
||||
Debugger();
|
||||
#else
|
||||
#ifdef PANICWAIT
|
||||
printf("hit any key to boot/dump...\n>");
|
||||
cngetc();
|
||||
#endif
|
||||
#endif
|
||||
boot(bootopt);
|
||||
}
|
||||
|
||||
/*
|
||||
* Warn that a system table is full.
|
||||
*/
|
||||
void
|
||||
tablefull(tab)
|
||||
const char *tab;
|
||||
{
|
||||
|
||||
log(LOG_ERR, "%s: table is full\n", tab);
|
||||
}
|
||||
|
||||
/*
|
||||
* Uprintf prints to the controlling terminal for the current process.
|
||||
* It may block if the tty queue is overfull. No message is printed if
|
||||
* the queue does not clear in a reasonable time.
|
||||
*/
|
||||
void
|
||||
#ifdef __STDC__
|
||||
uprintf(const char *fmt, ...)
|
||||
#else
|
||||
uprintf(fmt /*, va_alist */)
|
||||
char *fmt;
|
||||
#endif
|
||||
{
|
||||
register struct proc *p = curproc;
|
||||
va_list ap;
|
||||
|
||||
if (p->p_flag & P_CONTROLT && p->p_session->s_ttyvp) {
|
||||
va_start(ap, fmt);
|
||||
kprintf(fmt, TOTTY, p->p_session->s_ttyp, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
}
|
||||
|
||||
tpr_t
|
||||
tprintf_open(p)
|
||||
register struct proc *p;
|
||||
{
|
||||
|
||||
if (p->p_flag & P_CONTROLT && p->p_session->s_ttyvp) {
|
||||
SESSHOLD(p->p_session);
|
||||
return ((tpr_t) p->p_session);
|
||||
}
|
||||
return ((tpr_t) NULL);
|
||||
}
|
||||
|
||||
void
|
||||
tprintf_close(sess)
|
||||
tpr_t sess;
|
||||
{
|
||||
|
||||
if (sess)
|
||||
SESSRELE((struct session *) sess);
|
||||
}
|
||||
|
||||
/*
|
||||
* tprintf prints on the controlling terminal associated
|
||||
* with the given session.
|
||||
*/
|
||||
void
|
||||
#ifdef __STDC__
|
||||
tprintf(tpr_t tpr, const char *fmt, ...)
|
||||
#else
|
||||
tprintf(tpr, fmt /*, va_alist */)
|
||||
tpr_t tpr;
|
||||
char *fmt;
|
||||
#endif
|
||||
{
|
||||
register struct session *sess = (struct session *)tpr;
|
||||
struct tty *tp = NULL;
|
||||
int flags = TOLOG;
|
||||
va_list ap;
|
||||
|
||||
logpri(LOG_INFO);
|
||||
if (sess && sess->s_ttyvp && ttycheckoutq(sess->s_ttyp, 0)) {
|
||||
flags |= TOTTY;
|
||||
tp = sess->s_ttyp;
|
||||
}
|
||||
va_start(ap, fmt);
|
||||
kprintf(fmt, flags, tp, ap);
|
||||
va_end(ap);
|
||||
logwakeup();
|
||||
}
|
||||
|
||||
/*
|
||||
* Ttyprintf displays a message on a tty; it should be used only by
|
||||
* the tty driver, or anything that knows the underlying tty will not
|
||||
* be revoke(2)'d away. Other callers should use tprintf.
|
||||
*/
|
||||
void
|
||||
#ifdef __STDC__
|
||||
ttyprintf(struct tty *tp, const char *fmt, ...)
|
||||
#else
|
||||
ttyprintf(tp, fmt /*, va_alist */)
|
||||
struct tty *tp;
|
||||
char *fmt;
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
kprintf(fmt, TOTTY, tp, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
extern int log_open;
|
||||
|
||||
/*
|
||||
* Log writes to the log buffer, and guarantees not to sleep (so can be
|
||||
* called by interrupt routines). If there is no process reading the
|
||||
* log yet, it writes to the console also.
|
||||
*/
|
||||
void
|
||||
#ifdef __STDC__
|
||||
log(int level, const char *fmt, ...)
|
||||
#else
|
||||
log(level, fmt /*, va_alist */)
|
||||
int level;
|
||||
char *fmt;
|
||||
#endif
|
||||
{
|
||||
register int s;
|
||||
va_list ap;
|
||||
|
||||
s = splhigh();
|
||||
logpri(level);
|
||||
va_start(ap, fmt);
|
||||
kprintf(fmt, TOLOG, NULL, ap);
|
||||
splx(s);
|
||||
va_end(ap);
|
||||
if (!log_open) {
|
||||
va_start(ap, fmt);
|
||||
kprintf(fmt, TOCONS, NULL, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
logwakeup();
|
||||
}
|
||||
|
||||
static void
|
||||
logpri(level)
|
||||
int level;
|
||||
{
|
||||
register int ch;
|
||||
register char *p;
|
||||
|
||||
putchar('<', TOLOG, NULL);
|
||||
for (p = ksprintn((u_long)level, 10, NULL); ch = *p--;)
|
||||
putchar(ch, TOLOG, NULL);
|
||||
putchar('>', TOLOG, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
#ifdef __STDC__
|
||||
addlog(const char *fmt, ...)
|
||||
#else
|
||||
addlog(fmt /*, va_alist */)
|
||||
char *fmt;
|
||||
#endif
|
||||
{
|
||||
register int s;
|
||||
va_list ap;
|
||||
|
||||
s = splhigh();
|
||||
va_start(ap, fmt);
|
||||
kprintf(fmt, TOLOG, NULL, ap);
|
||||
splx(s);
|
||||
va_end(ap);
|
||||
if (!log_open) {
|
||||
va_start(ap, fmt);
|
||||
kprintf(fmt, TOCONS, NULL, ap);
|
||||
va_end(ap);
|
||||
}
|
||||
logwakeup();
|
||||
}
|
||||
|
||||
int consintr = 1; /* ok to handle console interrupts? */
|
||||
|
||||
void
|
||||
#ifdef __STDC__
|
||||
printf(const char *fmt, ...)
|
||||
#else
|
||||
printf(fmt, va_alist)
|
||||
char *fmt;
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
register int savintr;
|
||||
|
||||
savintr = consintr; /* disable interrupts */
|
||||
consintr = 0;
|
||||
va_start(ap, fmt);
|
||||
kprintf(fmt, TOCONS | TOLOG, NULL, ap);
|
||||
va_end(ap);
|
||||
if (!panicstr)
|
||||
logwakeup();
|
||||
consintr = savintr; /* reenable interrupts */
|
||||
}
|
||||
|
||||
/*
|
||||
* Scaled down version of printf(3).
|
||||
*
|
||||
* Two additional formats:
|
||||
*
|
||||
* The format %b is supported to decode error registers.
|
||||
* Its usage is:
|
||||
*
|
||||
* printf("reg=%b\n", regval, "<base><arg>*");
|
||||
*
|
||||
* where <base> is the output base expressed as a control character, e.g.
|
||||
* \10 gives octal; \20 gives hex. Each arg is a sequence of characters,
|
||||
* the first of which gives the bit number to be inspected (origin 1), and
|
||||
* the next characters (up to a control character, i.e. a character <= 32),
|
||||
* give the name of the register. Thus:
|
||||
*
|
||||
* printf("reg=%b\n", 3, "\10\2BITTWO\1BITONE\n");
|
||||
*
|
||||
* would produce output:
|
||||
*
|
||||
* reg=3<BITTWO,BITONE>
|
||||
*
|
||||
* The format %r is supposed to pass an additional format string and argument
|
||||
* list recursively.
|
||||
* Its usage is:
|
||||
*
|
||||
* fn(otherstuff, char *fmt, ...)
|
||||
* {
|
||||
* va_list ap;
|
||||
* va_start(ap, fmt);
|
||||
* printf("prefix: %r, other stuff\n", fmt, ap);
|
||||
* va_end(ap);
|
||||
*
|
||||
* Space or zero padding and a field width are supported for the numeric
|
||||
* formats only.
|
||||
*/
|
||||
void
|
||||
kprintf(fmt, flags, tp, ap)
|
||||
register const char *fmt;
|
||||
int flags;
|
||||
struct tty *tp;
|
||||
va_list ap;
|
||||
{
|
||||
register char *p, *p2;
|
||||
register int ch, n;
|
||||
u_long ul;
|
||||
int base, lflag, tmp, width;
|
||||
char padc;
|
||||
|
||||
for (;;) {
|
||||
padc = ' ';
|
||||
width = 0;
|
||||
while ((ch = *(u_char *)fmt++) != '%') {
|
||||
if (ch == '\0')
|
||||
return;
|
||||
putchar(ch, flags, tp);
|
||||
}
|
||||
lflag = 0;
|
||||
reswitch: switch (ch = *(u_char *)fmt++) {
|
||||
case '0':
|
||||
padc = '0';
|
||||
goto reswitch;
|
||||
case '1': case '2': case '3': case '4':
|
||||
case '5': case '6': case '7': case '8': case '9':
|
||||
for (width = 0;; ++fmt) {
|
||||
width = width * 10 + ch - '0';
|
||||
ch = *fmt;
|
||||
if (ch < '0' || ch > '9')
|
||||
break;
|
||||
}
|
||||
goto reswitch;
|
||||
case 'l':
|
||||
lflag = 1;
|
||||
goto reswitch;
|
||||
case 'b':
|
||||
ul = va_arg(ap, int);
|
||||
p = va_arg(ap, char *);
|
||||
for (p2 = ksprintn(ul, *p++, NULL); ch = *p2--;)
|
||||
putchar(ch, flags, tp);
|
||||
|
||||
if (!ul)
|
||||
break;
|
||||
|
||||
for (tmp = 0; n = *p++;) {
|
||||
if (ul & (1 << (n - 1))) {
|
||||
putchar(tmp ? ',' : '<', flags, tp);
|
||||
for (; (n = *p) > ' '; ++p)
|
||||
putchar(n, flags, tp);
|
||||
tmp = 1;
|
||||
} else
|
||||
for (; *p > ' '; ++p);
|
||||
}
|
||||
if (tmp)
|
||||
putchar('>', flags, tp);
|
||||
break;
|
||||
case 'c':
|
||||
putchar(va_arg(ap, int), flags, tp);
|
||||
break;
|
||||
case 'r':
|
||||
p = va_arg(ap, char *);
|
||||
kprintf(p, flags, tp, va_arg(ap, va_list));
|
||||
break;
|
||||
case 's':
|
||||
p = va_arg(ap, char *);
|
||||
while (ch = *p++)
|
||||
putchar(ch, flags, tp);
|
||||
break;
|
||||
case 'd':
|
||||
ul = lflag ? va_arg(ap, long) : va_arg(ap, int);
|
||||
if ((long)ul < 0) {
|
||||
putchar('-', flags, tp);
|
||||
ul = -(long)ul;
|
||||
}
|
||||
base = 10;
|
||||
goto number;
|
||||
case 'o':
|
||||
ul = lflag ? va_arg(ap, u_long) : va_arg(ap, u_int);
|
||||
base = 8;
|
||||
goto number;
|
||||
case 'u':
|
||||
ul = lflag ? va_arg(ap, u_long) : va_arg(ap, u_int);
|
||||
base = 10;
|
||||
goto number;
|
||||
case 'x':
|
||||
ul = lflag ? va_arg(ap, u_long) : va_arg(ap, u_int);
|
||||
base = 16;
|
||||
number: p = ksprintn(ul, base, &tmp);
|
||||
if (width && (width -= tmp) > 0)
|
||||
while (width--)
|
||||
putchar(padc, flags, tp);
|
||||
while (ch = *p--)
|
||||
putchar(ch, flags, tp);
|
||||
break;
|
||||
default:
|
||||
putchar('%', flags, tp);
|
||||
if (lflag)
|
||||
putchar('l', flags, tp);
|
||||
/* FALLTHROUGH */
|
||||
case '%':
|
||||
putchar(ch, flags, tp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Print a character on console or users terminal. If destination is
|
||||
* the console then the last MSGBUFS characters are saved in msgbuf for
|
||||
* inspection later.
|
||||
*/
|
||||
static void
|
||||
putchar(c, flags, tp)
|
||||
register int c;
|
||||
int flags;
|
||||
struct tty *tp;
|
||||
{
|
||||
register struct msgbuf *mbp;
|
||||
|
||||
if (panicstr)
|
||||
constty = NULL;
|
||||
if ((flags & TOCONS) && tp == NULL && constty) {
|
||||
tp = constty;
|
||||
flags |= TOTTY;
|
||||
}
|
||||
if ((flags & TOTTY) && tp && tputchar(c, tp) < 0 &&
|
||||
(flags & TOCONS) && tp == constty)
|
||||
constty = NULL;
|
||||
if ((flags & TOLOG) &&
|
||||
c != '\0' && c != '\r' && c != 0177 && msgbufmapped) {
|
||||
mbp = msgbufp;
|
||||
if (mbp->msg_magic != MSG_MAGIC) {
|
||||
bzero((caddr_t)mbp, sizeof(*mbp));
|
||||
mbp->msg_magic = MSG_MAGIC;
|
||||
}
|
||||
mbp->msg_bufc[mbp->msg_bufx++] = c;
|
||||
if (mbp->msg_bufx < 0 || mbp->msg_bufx >= MSG_BSIZE)
|
||||
mbp->msg_bufx = 0;
|
||||
}
|
||||
if ((flags & TOCONS) && constty == NULL && c != '\0')
|
||||
(*v_putc)(c);
|
||||
}
|
||||
|
||||
/*
|
||||
* Scaled down version of sprintf(3).
|
||||
*/
|
||||
#ifdef __STDC__
|
||||
int
|
||||
sprintf(char *buf, const char *cfmt, ...)
|
||||
#else
|
||||
int
|
||||
sprintf(buf, cfmt /*, va_alist */)
|
||||
char *buf, *cfmt;
|
||||
#endif
|
||||
{
|
||||
register const char *fmt = cfmt;
|
||||
register char *p, *bp;
|
||||
register int ch, base;
|
||||
u_long ul;
|
||||
int lflag;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, cfmt);
|
||||
for (bp = buf; ; ) {
|
||||
while ((ch = *(u_char *)fmt++) != '%')
|
||||
if ((*bp++ = ch) == '\0')
|
||||
return ((bp - buf) - 1);
|
||||
|
||||
lflag = 0;
|
||||
reswitch: switch (ch = *(u_char *)fmt++) {
|
||||
case 'l':
|
||||
lflag = 1;
|
||||
goto reswitch;
|
||||
case 'c':
|
||||
*bp++ = va_arg(ap, int);
|
||||
break;
|
||||
case 's':
|
||||
p = va_arg(ap, char *);
|
||||
while (*bp++ = *p++)
|
||||
;
|
||||
--bp;
|
||||
break;
|
||||
case 'd':
|
||||
ul = lflag ? va_arg(ap, long) : va_arg(ap, int);
|
||||
if ((long)ul < 0) {
|
||||
*bp++ = '-';
|
||||
ul = -(long)ul;
|
||||
}
|
||||
base = 10;
|
||||
goto number;
|
||||
break;
|
||||
case 'o':
|
||||
ul = lflag ? va_arg(ap, u_long) : va_arg(ap, u_int);
|
||||
base = 8;
|
||||
goto number;
|
||||
break;
|
||||
case 'u':
|
||||
ul = lflag ? va_arg(ap, u_long) : va_arg(ap, u_int);
|
||||
base = 10;
|
||||
goto number;
|
||||
break;
|
||||
case 'x':
|
||||
ul = lflag ? va_arg(ap, u_long) : va_arg(ap, u_int);
|
||||
base = 16;
|
||||
number: for (p = ksprintn(ul, base, NULL); ch = *p--;)
|
||||
*bp++ = ch;
|
||||
break;
|
||||
default:
|
||||
*bp++ = '%';
|
||||
if (lflag)
|
||||
*bp++ = 'l';
|
||||
/* FALLTHROUGH */
|
||||
case '%':
|
||||
*bp++ = ch;
|
||||
}
|
||||
}
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/*
|
||||
* Put a number (base <= 16) in a buffer in reverse order; return an
|
||||
* optional length and a pointer to the NULL terminated (preceded?)
|
||||
* buffer.
|
||||
*/
|
||||
static char *
|
||||
ksprintn(ul, base, lenp)
|
||||
register u_long ul;
|
||||
register int base, *lenp;
|
||||
{ /* A long in base 8, plus NULL. */
|
||||
static char buf[sizeof(long) * NBBY / 3 + 2];
|
||||
register char *p;
|
||||
|
||||
p = buf;
|
||||
do {
|
||||
*++p = "0123456789abcdef"[ul % base];
|
||||
} while (ul /= base);
|
||||
if (lenp)
|
||||
*lenp = p - buf;
|
||||
return (p);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,259 @@
|
|||
/*-
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)subr_prof.c 8.3 (Berkeley) 9/23/93
|
||||
* $Id: subr_prof.c,v 1.1 1994/05/05 05:38:24 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/user.h>
|
||||
#include <machine/cpu.h>
|
||||
|
||||
#ifdef GPROF
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/gmon.h>
|
||||
|
||||
/*
|
||||
* Froms is actually a bunch of unsigned shorts indexing tos
|
||||
*/
|
||||
struct gmonparam _gmonparam = { GMON_PROF_OFF };
|
||||
|
||||
extern char etext[];
|
||||
|
||||
kmstartup()
|
||||
{
|
||||
char *cp;
|
||||
struct gmonparam *p = &_gmonparam;
|
||||
/*
|
||||
* Round lowpc and highpc to multiples of the density we're using
|
||||
* so the rest of the scaling (here and in gprof) stays in ints.
|
||||
*/
|
||||
p->lowpc = ROUNDDOWN(KERNBASE, HISTFRACTION * sizeof(HISTCOUNTER));
|
||||
p->highpc = ROUNDUP((u_long)etext, HISTFRACTION * sizeof(HISTCOUNTER));
|
||||
p->textsize = p->highpc - p->lowpc;
|
||||
printf("Profiling kernel, textsize=%d [%x..%x]\n",
|
||||
p->textsize, p->lowpc, p->highpc);
|
||||
p->kcountsize = p->textsize / HISTFRACTION;
|
||||
p->hashfraction = HASHFRACTION;
|
||||
p->fromssize = p->textsize / HASHFRACTION;
|
||||
p->tolimit = p->textsize * ARCDENSITY / 100;
|
||||
if (p->tolimit < MINARCS)
|
||||
p->tolimit = MINARCS;
|
||||
else if (p->tolimit > MAXARCS)
|
||||
p->tolimit = MAXARCS;
|
||||
p->tossize = p->tolimit * sizeof(struct tostruct);
|
||||
cp = (char *)malloc(p->kcountsize + p->fromssize + p->tossize,
|
||||
M_GPROF, M_NOWAIT);
|
||||
if (cp == 0) {
|
||||
printf("No memory for profiling.\n");
|
||||
return;
|
||||
}
|
||||
bzero(cp, p->kcountsize + p->tossize + p->fromssize);
|
||||
p->tos = (struct tostruct *)cp;
|
||||
cp += p->tossize;
|
||||
p->kcount = (u_short *)cp;
|
||||
cp += p->kcountsize;
|
||||
p->froms = (u_short *)cp;
|
||||
}
|
||||
|
||||
#ifdef notyet
|
||||
/*
|
||||
* Return kernel profiling information.
|
||||
*/
|
||||
sysctl_doprof(name, namelen, oldp, oldlenp, newp, newlen, p)
|
||||
int *name;
|
||||
u_int namelen;
|
||||
void *oldp;
|
||||
size_t *oldlenp;
|
||||
void *newp;
|
||||
size_t newlen;
|
||||
{
|
||||
struct gmonparam *gp = &_gmonparam;
|
||||
int error;
|
||||
|
||||
/* all sysctl names at this level are terminal */
|
||||
if (namelen != 1)
|
||||
return (ENOTDIR); /* overloaded */
|
||||
|
||||
switch (name[0]) {
|
||||
case GPROF_STATE:
|
||||
error = sysctl_int(oldp, oldlenp, newp, newlen, &gp->state);
|
||||
if (error)
|
||||
return (error);
|
||||
if (gp->state == GMON_PROF_OFF)
|
||||
stopprofclock(&proc0);
|
||||
else
|
||||
startprofclock(&proc0);
|
||||
return (0);
|
||||
case GPROF_COUNT:
|
||||
return (sysctl_struct(oldp, oldlenp, newp, newlen,
|
||||
gp->kcount, gp->kcountsize));
|
||||
case GPROF_FROMS:
|
||||
return (sysctl_struct(oldp, oldlenp, newp, newlen,
|
||||
gp->froms, gp->fromssize));
|
||||
case GPROF_TOS:
|
||||
return (sysctl_struct(oldp, oldlenp, newp, newlen,
|
||||
gp->tos, gp->tossize));
|
||||
case GPROF_GMONPARAM:
|
||||
return (sysctl_rdstruct(oldp, oldlenp, newp, gp, sizeof *gp));
|
||||
default:
|
||||
return (EOPNOTSUPP);
|
||||
}
|
||||
/* NOTREACHED */
|
||||
}
|
||||
#endif
|
||||
#endif /* GPROF */
|
||||
|
||||
/*
|
||||
* Profiling system call.
|
||||
*
|
||||
* The scale factor is a fixed point number with 16 bits of fraction, so that
|
||||
* 1.0 is represented as 0x10000. A scale factor of 0 turns off profiling.
|
||||
*/
|
||||
struct profil_args {
|
||||
caddr_t samples;
|
||||
u_int size;
|
||||
u_int offset;
|
||||
u_int scale;
|
||||
};
|
||||
/* ARGSUSED */
|
||||
profil(p, uap, retval)
|
||||
struct proc *p;
|
||||
register struct profil_args *uap;
|
||||
int *retval;
|
||||
{
|
||||
register struct uprof *upp;
|
||||
int s;
|
||||
|
||||
if (uap->scale > (1 << 16))
|
||||
return (EINVAL);
|
||||
if (uap->scale == 0) {
|
||||
stopprofclock(p);
|
||||
return (0);
|
||||
}
|
||||
upp = &p->p_stats->p_prof;
|
||||
|
||||
/* Block profile interrupts while changing state. */
|
||||
s = splstatclock();
|
||||
upp->pr_off = uap->offset;
|
||||
upp->pr_scale = uap->scale;
|
||||
upp->pr_base = uap->samples;
|
||||
upp->pr_size = uap->size;
|
||||
startprofclock(p);
|
||||
splx(s);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Scale is a fixed-point number with the binary point 16 bits
|
||||
* into the value, and is <= 1.0. pc is at most 32 bits, so the
|
||||
* intermediate result is at most 48 bits.
|
||||
*/
|
||||
#define PC_TO_INDEX(pc, prof) \
|
||||
((int)(((u_quad_t)((pc) - (prof)->pr_off) * \
|
||||
(u_quad_t)((prof)->pr_scale)) >> 16) & ~1)
|
||||
|
||||
/*
|
||||
* Collect user-level profiling statistics; called on a profiling tick,
|
||||
* when a process is running in user-mode. This routine may be called
|
||||
* from an interrupt context. We try to update the user profiling buffers
|
||||
* cheaply with fuswintr() and suswintr(). If that fails, we revert to
|
||||
* an AST that will vector us to trap() with a context in which copyin
|
||||
* and copyout will work. Trap will then call addupc_task().
|
||||
*
|
||||
* Note that we may (rarely) not get around to the AST soon enough, and
|
||||
* lose profile ticks when the next tick overwrites this one, but in this
|
||||
* case the system is overloaded and the profile is probably already
|
||||
* inaccurate.
|
||||
*/
|
||||
void
|
||||
addupc_intr(p, pc, ticks)
|
||||
register struct proc *p;
|
||||
register u_long pc;
|
||||
u_int ticks;
|
||||
{
|
||||
register struct uprof *prof;
|
||||
register caddr_t addr;
|
||||
register u_int i;
|
||||
register int v;
|
||||
|
||||
if (ticks == 0)
|
||||
return;
|
||||
prof = &p->p_stats->p_prof;
|
||||
if (pc < prof->pr_off ||
|
||||
(i = PC_TO_INDEX(pc, prof)) >= prof->pr_size)
|
||||
return; /* out of range; ignore */
|
||||
|
||||
addr = prof->pr_base + i;
|
||||
if ((v = fuswintr(addr)) == -1 || suswintr(addr, v + ticks) == -1) {
|
||||
prof->pr_addr = pc;
|
||||
prof->pr_ticks = ticks;
|
||||
need_proftick(p);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Much like before, but we can afford to take faults here. If the
|
||||
* update fails, we simply turn off profiling.
|
||||
*/
|
||||
void
|
||||
addupc_task(p, pc, ticks)
|
||||
register struct proc *p;
|
||||
register u_long pc;
|
||||
u_int ticks;
|
||||
{
|
||||
register struct uprof *prof;
|
||||
register caddr_t addr;
|
||||
register u_int i;
|
||||
u_short v;
|
||||
|
||||
/* Testing P_PROFIL may be unnecessary, but is certainly safe. */
|
||||
if ((p->p_flag & P_PROFIL) == 0 || ticks == 0)
|
||||
return;
|
||||
|
||||
prof = &p->p_stats->p_prof;
|
||||
if (pc < prof->pr_off ||
|
||||
(i = PC_TO_INDEX(pc, prof)) >= prof->pr_size)
|
||||
return;
|
||||
|
||||
addr = prof->pr_base + i;
|
||||
if (copyin(addr, (caddr_t)&v, sizeof(v)) == 0) {
|
||||
v += ticks;
|
||||
if (copyout((caddr_t)&v, addr, sizeof(v)) == 0)
|
||||
return;
|
||||
}
|
||||
stopprofclock(p);
|
||||
}
|
|
@ -1 +1 @@
|
|||
revision 1.11 intentionally removed
|
||||
revision 1.12 intentionally removed
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.28 intentionally removed
|
||||
revision 1.29 intentionally removed
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.45 intentionally removed
|
||||
revision 1.46 intentionally removed
|
||||
|
|
|
@ -1 +1,147 @@
|
|||
revision 1.9 intentionally removed
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
* (c) UNIX System Laboratories, Inc.
|
||||
* All or some portions of this file are derived from material licensed
|
||||
* to the University of California by American Telephone and Telegraph
|
||||
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
* the permission of UNIX System Laboratories, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)tty_conf.c 8.4 (Berkeley) 1/21/94
|
||||
* $Id: tty_conf.c,v 1.10 1994/05/05 05:38:38 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/buf.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/tty.h>
|
||||
#include <sys/conf.h>
|
||||
|
||||
#define ttynodisc ((int (*) __P((dev_t, struct tty *)))enodev)
|
||||
#define ttyerrclose ((int (*) __P((struct tty *, int flags)))enodev)
|
||||
#define ttyerrio ((int (*) __P((struct tty *, struct uio *, int)))enodev)
|
||||
#define ttyerrinput ((int (*) __P((int c, struct tty *)))enodev)
|
||||
#define ttyerrstart ((int (*) __P((struct tty *)))enodev)
|
||||
|
||||
int nullioctl __P((struct tty *tp, int cmd, caddr_t data,
|
||||
int flag, struct proc *p));
|
||||
|
||||
#include "tb.h"
|
||||
#if NTB > 0
|
||||
int tbopen __P((dev_t dev, struct tty *tp));
|
||||
int tbclose __P((struct tty *tp, int flags));
|
||||
int tbread __P((struct tty *tp, struct uio *uio, int flags));
|
||||
int tbtioctl __P((struct tty *tp, int cmd, caddr_t data,
|
||||
int flag, struct proc *p));
|
||||
int tbinput __P((int c, struct tty *tp));
|
||||
#endif
|
||||
|
||||
#include "sl.h"
|
||||
#if NSL > 0
|
||||
int slopen __P((dev_t dev, struct tty *tp));
|
||||
int slclose __P((struct tty *tp, int flags));
|
||||
int sltioctl __P((struct tty *tp, int cmd, caddr_t data,
|
||||
int flag, struct proc *p));
|
||||
int slinput __P((int c, struct tty *tp));
|
||||
int slstart __P((struct tty *tp));
|
||||
#endif
|
||||
|
||||
#include "ppp.h"
|
||||
#if NPPP > 0
|
||||
int pppopen __P((dev_t dev, struct tty *tp));
|
||||
int pppclose __P((struct tty *tp, int flags));
|
||||
int ppptioctl __P((struct tty *tp, int cmd, caddr_t data,
|
||||
int flag, struct proc *p));
|
||||
void pppinput __P((int c, struct tty *tp));
|
||||
void pppstart __P((struct tty *tp));
|
||||
int pppread __P((struct tty *tp, struct uio *uio, int flag));
|
||||
int pppwrite __P((struct tty *tp, struct uio *uio, int flag));
|
||||
#endif
|
||||
|
||||
struct linesw linesw[] =
|
||||
{
|
||||
{ ttyopen, ttylclose, ttread, ttwrite, nullioctl,
|
||||
ttyinput, ttstart, ttymodem }, /* 0- termios */
|
||||
|
||||
{ ttynodisc, ttyerrclose, ttyerrio, ttyerrio, nullioctl,
|
||||
ttyerrinput, ttyerrstart, nullmodem }, /* 1- defunct */
|
||||
|
||||
{ ttynodisc, ttyerrclose, ttyerrio, ttyerrio, nullioctl,
|
||||
ttyerrinput, ttyerrstart, nullmodem }, /* 2- defunct */
|
||||
|
||||
#if NTB > 0
|
||||
{ tbopen, tbclose, tbread, ttyerrio, tbtioctl,
|
||||
tbinput, ttstart, nullmodem }, /* 3- TABLDISC */
|
||||
#else
|
||||
{ ttynodisc, ttyerrclose, ttyerrio, ttyerrio, nullioctl,
|
||||
ttyerrinput, ttyerrstart, nullmodem },
|
||||
#endif
|
||||
|
||||
#if NSL > 0
|
||||
{ slopen, slclose, ttyerrio, ttyerrio, sltioctl,
|
||||
slinput, slstart, nullmodem }, /* 4- SLIPDISC */
|
||||
#else
|
||||
{ ttynodisc, ttyerrclose, ttyerrio, ttyerrio, nullioctl,
|
||||
ttyerrinput, ttyerrstart, nullmodem },
|
||||
#endif
|
||||
|
||||
#if NPPP > 0
|
||||
{ pppopen, pppclose, pppread, pppwrite, ppptioctl,
|
||||
pppinput, pppstart, ttymodem }, /* 5- PPPDISC */
|
||||
#else
|
||||
{ ttynodisc, ttyerrclose, ttyerrio, ttyerrio, nullioctl,
|
||||
ttyerrinput, ttyerrstart, nullmodem },
|
||||
#endif
|
||||
};
|
||||
|
||||
int nlinesw = sizeof (linesw) / sizeof (linesw[0]);
|
||||
|
||||
/*
|
||||
* Do nothing specific version of line
|
||||
* discipline specific ioctl command.
|
||||
*/
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
nullioctl(tp, cmd, data, flags, p)
|
||||
struct tty *tp;
|
||||
int cmd;
|
||||
char *data;
|
||||
int flags;
|
||||
struct proc *p;
|
||||
{
|
||||
|
||||
#ifdef lint
|
||||
tp = tp; data = data; flags = flags; p = p;
|
||||
#endif
|
||||
return (-1);
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)tty_pty.c 7.21 (Berkeley) 5/30/91
|
||||
* $Id: tty_pty.c,v 1.20 1994/05/04 03:42:07 cgd Exp $
|
||||
* $Id: tty_pty.c,v 1.21 1994/05/05 05:38:40 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -638,7 +638,7 @@ ptyioctl(dev, cmd, data, flag, p)
|
|||
case TIOCSETA:
|
||||
case TIOCSETAW:
|
||||
case TIOCSETAF:
|
||||
flushq(&tp->t_outq);
|
||||
ndflush(&tp->t_outq, tp->t_outq.c_cc);
|
||||
break;
|
||||
|
||||
case TIOCSIG:
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* 4. The name of Theo de Raadt may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* $Id: tty_subr.c,v 1.5 1994/02/24 01:37:18 deraadt Exp $
|
||||
* $Id: tty_subr.c,v 1.6 1994/05/05 05:38:43 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -71,22 +71,22 @@ clalloc(clp, size, quot)
|
|||
int quot;
|
||||
{
|
||||
|
||||
MALLOC(clp->c_cs, u_char *, size, M_TTYS, M_WAITOK);
|
||||
MALLOC(clp->c_cs, char *, size, M_TTYS, M_WAITOK);
|
||||
if (!clp->c_cs)
|
||||
return (-1);
|
||||
bzero(clp->c_cs, size);
|
||||
|
||||
if(quot) {
|
||||
MALLOC(clp->c_cq, u_char *, QMEM(size), M_TTYS, M_WAITOK);
|
||||
MALLOC(clp->c_cq, char *, QMEM(size), M_TTYS, M_WAITOK);
|
||||
if (!clp->c_cq) {
|
||||
FREE(clp->c_cs, M_TTYS);
|
||||
return (-1);
|
||||
}
|
||||
bzero(clp->c_cs, QMEM(size));
|
||||
} else
|
||||
clp->c_cq = (u_char *)0;
|
||||
clp->c_cq = (char *)0;
|
||||
|
||||
clp->c_cf = clp->c_cl = (u_char *)0;
|
||||
clp->c_cf = clp->c_cl = (char *)0;
|
||||
clp->c_ce = clp->c_cs + size;
|
||||
clp->c_cn = size;
|
||||
clp->c_cc = 0;
|
||||
|
@ -101,7 +101,7 @@ clfree(clp)
|
|||
FREE(clp->c_cs, M_TTYS);
|
||||
if(clp->c_cq)
|
||||
FREE(clp->c_cq, M_TTYS);
|
||||
clp->c_cs = clp->c_cq = (u_char *)0;
|
||||
clp->c_cs = clp->c_cq = (char *)0;
|
||||
}
|
||||
|
||||
|
||||
|
@ -132,7 +132,7 @@ getc(clp)
|
|||
if (++clp->c_cf == clp->c_ce)
|
||||
clp->c_cf = clp->c_cs;
|
||||
if (--clp->c_cc == 0)
|
||||
clp->c_cf = clp->c_cl = (u_char *)0;
|
||||
clp->c_cf = clp->c_cl = (char *)0;
|
||||
out:
|
||||
splx(s);
|
||||
return c;
|
||||
|
@ -145,11 +145,11 @@ out:
|
|||
int
|
||||
q_to_b(clp, cp, count)
|
||||
struct clist *clp;
|
||||
u_char *cp;
|
||||
char *cp;
|
||||
int count;
|
||||
{
|
||||
register int cc;
|
||||
u_char *p = cp;
|
||||
char *p = cp;
|
||||
int s;
|
||||
|
||||
s = spltty();
|
||||
|
@ -169,7 +169,7 @@ q_to_b(clp, cp, count)
|
|||
clp->c_cf = clp->c_cs;
|
||||
}
|
||||
if (clp->c_cc == 0)
|
||||
clp->c_cf = clp->c_cl = (u_char *)0;
|
||||
clp->c_cf = clp->c_cl = (char *)0;
|
||||
splx(s);
|
||||
return p - cp;
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ ndflush(clp, count)
|
|||
s = spltty();
|
||||
if (count == clp->c_cc) {
|
||||
clp->c_cc = 0;
|
||||
clp->c_cf = clp->c_cl = (u_char *)0;
|
||||
clp->c_cf = clp->c_cl = (char *)0;
|
||||
goto out;
|
||||
}
|
||||
/* optimize this while loop */
|
||||
|
@ -249,7 +249,7 @@ ndflush(clp, count)
|
|||
clp->c_cf = clp->c_cs;
|
||||
}
|
||||
if (clp->c_cc == 0)
|
||||
clp->c_cf = clp->c_cl = (u_char *)0;
|
||||
clp->c_cf = clp->c_cl = (char *)0;
|
||||
out:
|
||||
splx(s);
|
||||
}
|
||||
|
@ -262,7 +262,7 @@ putc(c, clp)
|
|||
int c;
|
||||
struct clist *clp;
|
||||
{
|
||||
register u_char *q;
|
||||
register char *q;
|
||||
register int i;
|
||||
int r = -1;
|
||||
int s;
|
||||
|
@ -315,13 +315,13 @@ out:
|
|||
*/
|
||||
void
|
||||
clrbits(cp, off, len)
|
||||
u_char *cp;
|
||||
char *cp;
|
||||
int off;
|
||||
int len;
|
||||
{
|
||||
int sby, sbi, eby, ebi;
|
||||
register int i;
|
||||
u_char mask;
|
||||
char mask;
|
||||
|
||||
if(len==1) {
|
||||
clrbit(cp, off);
|
||||
|
@ -354,12 +354,12 @@ clrbits(cp, off, len)
|
|||
*/
|
||||
int
|
||||
b_to_q(cp, count, clp)
|
||||
u_char *cp;
|
||||
char *cp;
|
||||
int count;
|
||||
struct clist *clp;
|
||||
{
|
||||
register int i, cc;
|
||||
register u_char *p = cp;
|
||||
register char *p = cp;
|
||||
int off, s;
|
||||
|
||||
if (count <= 0)
|
||||
|
@ -417,10 +417,10 @@ static int cc;
|
|||
* so that the pointer becomes invalid. Note that interrupts are NOT
|
||||
* masked.
|
||||
*/
|
||||
u_char *
|
||||
char *
|
||||
nextc(clp, cp, c)
|
||||
struct clist *clp;
|
||||
register u_char *cp;
|
||||
register char *cp;
|
||||
int *c;
|
||||
{
|
||||
|
||||
|
@ -459,13 +459,13 @@ nextc(clp, cp, c)
|
|||
*
|
||||
* *c is set to the NEXT character
|
||||
*/
|
||||
u_char *
|
||||
char *
|
||||
firstc(clp, c)
|
||||
struct clist *clp;
|
||||
int *c;
|
||||
{
|
||||
int empty = 0;
|
||||
register u_char *cp;
|
||||
register char *cp;
|
||||
register int i;
|
||||
|
||||
cc = clp->c_cc;
|
||||
|
@ -516,7 +516,7 @@ unputc(clp)
|
|||
#endif
|
||||
}
|
||||
if (clp->c_cc == 0)
|
||||
clp->c_cf = clp->c_cl = (u_char *)0;
|
||||
clp->c_cf = clp->c_cl = (char *)0;
|
||||
out:
|
||||
splx(s);
|
||||
return c;
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)uipc_domain.c 7.9 (Berkeley) 3/4/91
|
||||
* $Id: uipc_domain.c,v 1.7 1994/04/29 23:16:22 cgd Exp $
|
||||
* $Id: uipc_domain.c,v 1.8 1994/05/05 05:38:45 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
@ -50,8 +50,8 @@
|
|||
domains = &__CONCAT(x,domain); \
|
||||
}
|
||||
|
||||
void pffasttimo __P((caddr_t));
|
||||
void pfslowtimo __P((caddr_t));
|
||||
void pffasttimo __P((void *));
|
||||
void pfslowtimo __P((void *));
|
||||
|
||||
void
|
||||
domaininit()
|
||||
|
@ -95,8 +95,8 @@ if (max_linkhdr < 16) /* XXX */
|
|||
max_linkhdr = 16;
|
||||
max_hdr = max_linkhdr + max_protohdr;
|
||||
max_datalen = MHLEN - max_hdr;
|
||||
timeout((timeout_t)pffasttimo, (caddr_t)0, 1);
|
||||
timeout((timeout_t)pfslowtimo, (caddr_t)0, 1);
|
||||
timeout(pffasttimo, (caddr_t)0, 1);
|
||||
timeout(pfslowtimo, (caddr_t)0, 1);
|
||||
}
|
||||
|
||||
struct protosw *
|
||||
|
@ -160,7 +160,7 @@ pfctlinput(cmd, sa)
|
|||
/* ARGSUSED */
|
||||
void
|
||||
pfslowtimo(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
register struct domain *dp;
|
||||
register struct protosw *pr;
|
||||
|
@ -169,13 +169,13 @@ pfslowtimo(arg)
|
|||
for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
|
||||
if (pr->pr_slowtimo)
|
||||
(*pr->pr_slowtimo)();
|
||||
timeout((timeout_t)pfslowtimo, (caddr_t)0, hz/2);
|
||||
timeout(pfslowtimo, (caddr_t)0, hz/2);
|
||||
}
|
||||
|
||||
/* ARGSUSED */
|
||||
void
|
||||
pffasttimo(arg)
|
||||
caddr_t arg;
|
||||
void *arg;
|
||||
{
|
||||
register struct domain *dp;
|
||||
register struct protosw *pr;
|
||||
|
@ -184,5 +184,5 @@ pffasttimo(arg)
|
|||
for (pr = dp->dom_protosw; pr < dp->dom_protoswNPROTOSW; pr++)
|
||||
if (pr->pr_fasttimo)
|
||||
(*pr->pr_fasttimo)();
|
||||
timeout((timeout_t)pffasttimo, (caddr_t)0, hz/5);
|
||||
timeout(pffasttimo, (caddr_t)0, hz/5);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,98 @@
|
|||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)libkern.h 8.1 (Berkeley) 6/10/93
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
static inline int
|
||||
imax(a, b)
|
||||
int a, b;
|
||||
{
|
||||
return (a > b ? a : b);
|
||||
}
|
||||
static inline int
|
||||
imin(a, b)
|
||||
int a, b;
|
||||
{
|
||||
return (a < b ? a : b);
|
||||
}
|
||||
static inline long
|
||||
lmax(a, b)
|
||||
long a, b;
|
||||
{
|
||||
return (a > b ? a : b);
|
||||
}
|
||||
static inline long
|
||||
lmin(a, b)
|
||||
long a, b;
|
||||
{
|
||||
return (a < b ? a : b);
|
||||
}
|
||||
static inline u_int
|
||||
max(a, b)
|
||||
u_int a, b;
|
||||
{
|
||||
return (a > b ? a : b);
|
||||
}
|
||||
static inline u_int
|
||||
min(a, b)
|
||||
u_int a, b;
|
||||
{
|
||||
return (a < b ? a : b);
|
||||
}
|
||||
static inline u_long
|
||||
ulmax(a, b)
|
||||
u_long a, b;
|
||||
{
|
||||
return (a > b ? a : b);
|
||||
}
|
||||
static inline u_long
|
||||
ulmin(a, b)
|
||||
u_long a, b;
|
||||
{
|
||||
return (a < b ? a : b);
|
||||
}
|
||||
|
||||
/* Prototypes for non-quad routines. */
|
||||
int bcmp __P((const void *, const void *, size_t));
|
||||
int ffs __P((int));
|
||||
int locc __P((int, char *, u_int));
|
||||
u_long random __P((void));
|
||||
char *rindex __P((const char *, int));
|
||||
int scanc __P((u_int, u_char *, u_char *, int));
|
||||
int skpc __P((int, int, char *));
|
||||
char *strcat __P((char *, const char *));
|
||||
char *strcpy __P((char *, const char *));
|
||||
size_t strlen __P((const char *));
|
||||
char *strncpy __P((char *, const char *, size_t));
|
|
@ -37,7 +37,7 @@
|
|||
* From:
|
||||
* Id: procfs_note.c,v 4.1 1993/12/17 10:47:45 jsp Rel
|
||||
*
|
||||
* $Id: procfs_note.c,v 1.4 1994/05/04 05:41:55 cgd Exp $
|
||||
* $Id: procfs_note.c,v 1.5 1994/05/05 05:39:10 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -111,10 +111,7 @@ pfs_donote(curp, p, pfs, uio)
|
|||
|
||||
if (pfs->pfs_type == Pnote && uio->uio_rw == UIO_READ) {
|
||||
|
||||
mask = p->p_sig & ~p->p_sigmask;
|
||||
|
||||
if (p->p_flag&P_PPWAIT)
|
||||
mask &= ~stopsigmask;
|
||||
mask = p->p_siglist & ~p->p_sigmask;
|
||||
if (mask == 0)
|
||||
return 0;
|
||||
sig = ffs((long)mask);
|
||||
|
@ -122,7 +119,7 @@ pfs_donote(curp, p, pfs, uio)
|
|||
if (error = pfs_readnote(sig, uio))
|
||||
return error;
|
||||
|
||||
p->p_sig &= ~mask;
|
||||
p->p_siglist &= ~mask;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
* From:
|
||||
* Id: procfs_status.c,v 4.1 1993/12/17 10:47:45 jsp Rel
|
||||
*
|
||||
* $Id: procfs_status.c,v 1.4 1994/05/04 03:42:22 cgd Exp $
|
||||
* $Id: procfs_status.c,v 1.5 1994/05/05 05:39:13 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -109,12 +109,17 @@ pfs_dostatus(curp, p, pfs, uio)
|
|||
p->p_stats->p_start.tv_usec);
|
||||
else
|
||||
ps += sprintf(ps, " -1 -1");
|
||||
|
||||
ps += sprintf(ps, " %d %d %d %d",
|
||||
p->p_utime.tv_sec,
|
||||
p->p_utime.tv_usec,
|
||||
p->p_stime.tv_sec,
|
||||
p->p_stime.tv_usec);
|
||||
|
||||
{
|
||||
struct timeval ut, st;
|
||||
|
||||
calcru(p, &ut, &st, (void *) 0);
|
||||
ps += sprintf(ps, " %d,%d %d,%d",
|
||||
ut.tv_sec,
|
||||
ut.tv_usec,
|
||||
st.tv_sec,
|
||||
st.tv_usec);
|
||||
}
|
||||
|
||||
ps += sprintf(ps, " %s",
|
||||
(p->p_wchan && p->p_wmesg) ? p->p_wmesg : "nochan");
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
* From:
|
||||
* Id: procfs_vnops.c,v 4.2 1994/01/02 15:28:44 jsp Exp
|
||||
*
|
||||
* $Id: procfs_vnops.c,v 1.19 1994/04/15 20:49:29 cgd Exp $
|
||||
* $Id: procfs_vnops.c,v 1.20 1994/05/05 05:39:17 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -757,7 +757,7 @@ procfs_readdir(vp, uio, cred, eofflagp, cookies, ncookies)
|
|||
dp->d_namlen = sprintf(dp->d_name, "%ld", (long) p->p_pid);
|
||||
}
|
||||
|
||||
p = p->p_nxt;
|
||||
p = p->p_next;
|
||||
|
||||
#ifdef PROCFS_ZOMBIE
|
||||
if (p == 0 && doingzomb == 0) {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)if.c 7.14 (Berkeley) 4/20/91
|
||||
* $Id: if.c,v 1.12 1994/04/29 23:16:33 cgd Exp $
|
||||
* $Id: if.c,v 1.13 1994/05/05 05:39:29 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -53,7 +53,7 @@
|
|||
|
||||
int ifqmaxlen = IFQ_MAXLEN;
|
||||
|
||||
void if_slowtimo(caddr_t);
|
||||
void if_slowtimo __P((void *));
|
||||
|
||||
/*
|
||||
* Network interface utility routines.
|
||||
|
@ -373,7 +373,8 @@ if_qflush(ifq)
|
|||
*/
|
||||
/* ARGSUSED */
|
||||
void
|
||||
if_slowtimo(caddr_t arg)
|
||||
if_slowtimo(arg)
|
||||
void *arg;
|
||||
{
|
||||
register struct ifnet *ifp;
|
||||
int s = splimp();
|
||||
|
@ -385,7 +386,7 @@ if_slowtimo(caddr_t arg)
|
|||
(*ifp->if_watchdog)(ifp->if_unit);
|
||||
}
|
||||
splx(s);
|
||||
timeout((timeout_t)if_slowtimo, (caddr_t)0, hz / IFNET_SLOWHZ);
|
||||
timeout(if_slowtimo, (caddr_t)0, hz / IFNET_SLOWHZ);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -28,11 +28,11 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Header: /cvsroot/src/sys/nfs/nfs_boot.c,v 1.1 1994/04/18 06:18:20 glass Exp $
|
||||
* $Id: nfs_boot.c,v 1.2 1994/05/05 05:39:42 cgd Exp $
|
||||
*/
|
||||
|
||||
#include <sys/systm.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
@ -40,7 +40,6 @@
|
|||
#include <sys/mount.h>
|
||||
#include <sys/mbuf.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/reboot.h>
|
||||
|
||||
#include <net/if.h>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)nfs_socket.c 7.23 (Berkeley) 4/20/91
|
||||
* $Id: nfs_socket.c,v 1.11 1994/04/10 06:45:59 cgd Exp $
|
||||
* $Id: nfs_socket.c,v 1.12 1994/05/05 05:39:46 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -1320,7 +1320,8 @@ nfs_backofftimer(nmp)
|
|||
nfs_sigintr(p)
|
||||
register struct proc *p;
|
||||
{
|
||||
if (p && p->p_sig && (((p->p_sig &~ p->p_sigmask) &~ p->p_sigignore) &
|
||||
if (p && p->p_siglist &&
|
||||
(((p->p_siglist &~ p->p_sigmask) &~ p->p_sigignore) &
|
||||
NFSINT_SIGMASK))
|
||||
return (1);
|
||||
else
|
||||
|
|
125
sys/sys/conf.h
125
sys/sys/conf.h
|
@ -1 +1,124 @@
|
|||
revision 1.10 intentionally removed
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
* (c) UNIX System Laboratories, Inc.
|
||||
* All or some portions of this file are derived from material licensed
|
||||
* to the University of California by American Telephone and Telegraph
|
||||
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
* the permission of UNIX System Laboratories, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)conf.h 8.3 (Berkeley) 1/21/94
|
||||
* $Id: conf.h,v 1.11 1994/05/05 05:40:05 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* Definitions of device driver entry switches
|
||||
*/
|
||||
|
||||
struct buf;
|
||||
struct proc;
|
||||
struct tty;
|
||||
struct uio;
|
||||
struct vnode;
|
||||
|
||||
struct bdevsw {
|
||||
int (*d_open) __P((dev_t dev, int oflags, int devtype,
|
||||
struct proc *p));
|
||||
int (*d_close) __P((dev_t dev, int fflag, int devtype,
|
||||
struct proc *p));
|
||||
int (*d_strategy) __P((struct buf *bp));
|
||||
int (*d_ioctl) __P((dev_t dev, int cmd, caddr_t data,
|
||||
int fflag, struct proc *p));
|
||||
int (*d_dump) (); /* parameters vary by architecture */
|
||||
int (*d_psize) __P((dev_t dev));
|
||||
int d_flags;
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
extern struct bdevsw bdevsw[];
|
||||
#endif
|
||||
|
||||
struct cdevsw {
|
||||
int (*d_open) __P((dev_t dev, int oflags, int devtype,
|
||||
struct proc *p));
|
||||
int (*d_close) __P((dev_t dev, int fflag, int devtype,
|
||||
struct proc *));
|
||||
int (*d_read) __P((dev_t dev, struct uio *uio, int ioflag));
|
||||
int (*d_write) __P((dev_t dev, struct uio *uio, int ioflag));
|
||||
int (*d_ioctl) __P((dev_t dev, int cmd, caddr_t data,
|
||||
int fflag, struct proc *p));
|
||||
int (*d_stop) __P((struct tty *tp, int rw));
|
||||
int (*d_reset) __P((int uban)); /* XXX */
|
||||
struct tty **d_ttys;
|
||||
int (*d_select) __P((dev_t dev, int which, struct proc *p));
|
||||
int (*d_mmap) __P(());
|
||||
int (*d_strategy) __P((struct buf *bp));
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
extern struct cdevsw cdevsw[];
|
||||
|
||||
/* symbolic sleep message strings */
|
||||
extern char devopn[], devio[], devwait[], devin[], devout[];
|
||||
extern char devioc[], devcls[];
|
||||
#endif
|
||||
|
||||
struct linesw {
|
||||
int (*l_open) __P((dev_t dev, struct tty *tp));
|
||||
int (*l_close) __P((struct tty *tp, int flags));
|
||||
int (*l_read) __P((struct tty *tp, struct uio *uio,
|
||||
int flag));
|
||||
int (*l_write) __P((struct tty *tp, struct uio *uio,
|
||||
int flag));
|
||||
int (*l_ioctl) __P((struct tty *tp, int cmd, caddr_t data,
|
||||
int flag, struct proc *p));
|
||||
int (*l_rint) __P((int c, struct tty *tp));
|
||||
int (*l_start) __P((struct tty *tp));
|
||||
int (*l_modem) __P((struct tty *tp, int flag));
|
||||
};
|
||||
|
||||
#ifdef KERNEL
|
||||
extern struct linesw linesw[];
|
||||
#endif
|
||||
|
||||
struct swdevt {
|
||||
dev_t sw_dev;
|
||||
int sw_flags;
|
||||
int sw_nblks;
|
||||
struct vnode *sw_vp;
|
||||
};
|
||||
#define SW_FREED 0x01
|
||||
#define SW_SEQUENTIAL 0x02
|
||||
#define sw_freed sw_flags /* XXX compat */
|
||||
|
||||
#ifdef KERNEL
|
||||
extern struct swdevt swdevt[];
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,159 @@
|
|||
/*-
|
||||
* Copyright (c) 1982, 1986, 1992, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)gmon.h 8.2 (Berkeley) 1/4/94
|
||||
*/
|
||||
|
||||
#ifndef _SYS_GMON_H_
|
||||
#define _SYS_GMON_H_
|
||||
|
||||
#include <machine/profile.h>
|
||||
|
||||
/*
|
||||
* Structure prepended to gmon.out profiling data file.
|
||||
*/
|
||||
struct gmonhdr {
|
||||
u_long lpc; /* base pc address of sample buffer */
|
||||
u_long hpc; /* max pc address of sampled buffer */
|
||||
int ncnt; /* size of sample buffer (plus this header) */
|
||||
int version; /* version number */
|
||||
int profrate; /* profiling clock rate */
|
||||
int spare[3]; /* reserved */
|
||||
};
|
||||
#define GMONVERSION 0x00051879
|
||||
|
||||
/*
|
||||
* histogram counters are unsigned shorts (according to the kernel).
|
||||
*/
|
||||
#define HISTCOUNTER unsigned short
|
||||
|
||||
/*
|
||||
* fraction of text space to allocate for histogram counters here, 1/2
|
||||
*/
|
||||
#define HISTFRACTION 2
|
||||
|
||||
/*
|
||||
* Fraction of text space to allocate for from hash buckets.
|
||||
* The value of HASHFRACTION is based on the minimum number of bytes
|
||||
* of separation between two subroutine call points in the object code.
|
||||
* Given MIN_SUBR_SEPARATION bytes of separation the value of
|
||||
* HASHFRACTION is calculated as:
|
||||
*
|
||||
* HASHFRACTION = MIN_SUBR_SEPARATION / (2 * sizeof(short) - 1);
|
||||
*
|
||||
* For example, on the VAX, the shortest two call sequence is:
|
||||
*
|
||||
* calls $0,(r0)
|
||||
* calls $0,(r0)
|
||||
*
|
||||
* which is separated by only three bytes, thus HASHFRACTION is
|
||||
* calculated as:
|
||||
*
|
||||
* HASHFRACTION = 3 / (2 * 2 - 1) = 1
|
||||
*
|
||||
* Note that the division above rounds down, thus if MIN_SUBR_FRACTION
|
||||
* is less than three, this algorithm will not work!
|
||||
*
|
||||
* In practice, however, call instructions are rarely at a minimal
|
||||
* distance. Hence, we will define HASHFRACTION to be 2 across all
|
||||
* architectures. This saves a reasonable amount of space for
|
||||
* profiling data structures without (in practice) sacrificing
|
||||
* any granularity.
|
||||
*/
|
||||
#define HASHFRACTION 2
|
||||
|
||||
/*
|
||||
* percent of text space to allocate for tostructs with a minimum.
|
||||
*/
|
||||
#define ARCDENSITY 2
|
||||
#define MINARCS 50
|
||||
#define MAXARCS ((1 << (8 * sizeof(HISTCOUNTER))) - 2)
|
||||
|
||||
struct tostruct {
|
||||
u_long selfpc;
|
||||
long count;
|
||||
u_short link;
|
||||
u_short pad;
|
||||
};
|
||||
|
||||
/*
|
||||
* a raw arc, with pointers to the calling site and
|
||||
* the called site and a count.
|
||||
*/
|
||||
struct rawarc {
|
||||
u_long raw_frompc;
|
||||
u_long raw_selfpc;
|
||||
long raw_count;
|
||||
};
|
||||
|
||||
/*
|
||||
* general rounding functions.
|
||||
*/
|
||||
#define ROUNDDOWN(x,y) (((x)/(y))*(y))
|
||||
#define ROUNDUP(x,y) ((((x)+(y)-1)/(y))*(y))
|
||||
|
||||
/*
|
||||
* The profiling data structures are housed in this structure.
|
||||
*/
|
||||
struct gmonparam {
|
||||
int state;
|
||||
u_short *kcount;
|
||||
u_long kcountsize;
|
||||
u_short *froms;
|
||||
u_long fromssize;
|
||||
struct tostruct *tos;
|
||||
u_long tossize;
|
||||
long tolimit;
|
||||
u_long lowpc;
|
||||
u_long highpc;
|
||||
u_long textsize;
|
||||
u_long hashfraction;
|
||||
};
|
||||
extern struct gmonparam _gmonparam;
|
||||
|
||||
/*
|
||||
* Possible states of profiling.
|
||||
*/
|
||||
#define GMON_PROF_ON 0
|
||||
#define GMON_PROF_BUSY 1
|
||||
#define GMON_PROF_ERROR 2
|
||||
#define GMON_PROF_OFF 3
|
||||
|
||||
/*
|
||||
* Sysctl definitions for extracting profiling information from the kernel.
|
||||
*/
|
||||
#define GPROF_STATE 0 /* int: profiling enabling variable */
|
||||
#define GPROF_COUNT 1 /* struct: profile tick count buffer */
|
||||
#define GPROF_FROMS 2 /* struct: from location hash bucket */
|
||||
#define GPROF_TOS 3 /* struct: destination/count structure */
|
||||
#define GPROF_GMONPARAM 4 /* struct: profiling parameters (see above) */
|
||||
#endif /* !_SYS_GMON_H_ */
|
|
@ -1 +1,62 @@
|
|||
revision 1.6 intentionally removed
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
* (c) UNIX System Laboratories, Inc.
|
||||
* All or some portions of this file are derived from material licensed
|
||||
* to the University of California by American Telephone and Telegraph
|
||||
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
* the permission of UNIX System Laboratories, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)kernel.h 8.3 (Berkeley) 1/21/94
|
||||
* $Id: kernel.h,v 1.7 1994/05/05 05:40:10 cgd Exp $
|
||||
*/
|
||||
|
||||
/* Global variables for the kernel. */
|
||||
|
||||
/* 1.1 */
|
||||
extern long hostid;
|
||||
extern char hostname[MAXHOSTNAMELEN];
|
||||
extern int hostnamelen;
|
||||
extern char domainname[MAXHOSTNAMELEN];
|
||||
extern int domainnamelen;
|
||||
|
||||
/* 1.2 */
|
||||
extern volatile struct timeval mono_time;
|
||||
extern struct timeval boottime;
|
||||
extern struct timeval runtime;
|
||||
extern volatile struct timeval time;
|
||||
extern struct timezone tz; /* XXX */
|
||||
|
||||
extern int tick; /* usec per tick (1000000 / hz) */
|
||||
extern int hz; /* system clock's frequency */
|
||||
extern int stathz; /* statistics clock's frequency */
|
||||
extern int profhz; /* profiling clock's frequency */
|
||||
extern int lbolt; /* once a second sleep address */
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.20 intentionally removed
|
||||
revision 1.21 intentionally removed
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)resourcevar.h 7.1 (Berkeley) 5/9/91
|
||||
* $Id: resourcevar.h,v 1.4 1993/06/22 00:56:37 glass Exp $
|
||||
* $Id: resourcevar.h,v 1.5 1994/05/05 05:40:15 cgd Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_RESOURCEVAR_H_
|
||||
|
@ -51,10 +51,12 @@ struct pstats {
|
|||
struct itimerval p_timer[3]; /* virtual-time timers */
|
||||
|
||||
struct uprof { /* profile arguments */
|
||||
short *pr_base; /* buffer base */
|
||||
unsigned pr_size; /* buffer size */
|
||||
unsigned pr_off; /* pc offset */
|
||||
unsigned pr_scale; /* pc scaling */
|
||||
caddr_t pr_base; /* buffer base */
|
||||
u_long pr_size; /* buffer size */
|
||||
u_long pr_off; /* pc offset */
|
||||
u_long pr_scale; /* pc scaling */
|
||||
u_long pr_addr; /* temp storage for addr until AST */
|
||||
u_long pr_ticks; /* temp storage for ticks until AST */
|
||||
} p_prof;
|
||||
#define pstat_endcopy p_start
|
||||
struct timeval p_start; /* starting time */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 1991 Regents of the University of California.
|
||||
* All rights reserved.
|
||||
* Copyright (c) 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -30,12 +30,12 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)signalvar.h 7.1 (Berkeley) 5/9/91
|
||||
* $Id: signalvar.h,v 1.7 1994/05/04 03:42:35 cgd Exp $
|
||||
* from: @(#)signalvar.h 8.3 (Berkeley) 1/4/94
|
||||
* $Id: signalvar.h,v 1.8 1994/05/05 05:40:18 cgd Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_SIGNALVAR_H_
|
||||
#define _SYS_SIGNALVAR_H_
|
||||
#ifndef _SYS_SIGNALVAR_H_ /* tmp for user.h */
|
||||
#define _SYS_SIGNALVAR_H_
|
||||
|
||||
/*
|
||||
* Kernel signal definitions and data structures,
|
||||
|
@ -53,17 +53,16 @@ struct sigacts {
|
|||
sigset_t ps_sigintr; /* signals that interrupt syscalls */
|
||||
sigset_t ps_oldmask; /* saved mask from before sigpause */
|
||||
int ps_flags; /* signal flags, below */
|
||||
struct sigstack ps_sigstack; /* sp & on stack state variable */
|
||||
struct sigstack ps_sigstk; /* sp & on stack state variable */
|
||||
int ps_sig; /* for core dump/debugger XXX */
|
||||
int ps_code; /* for core dump/debugger XXX */
|
||||
int ps_addr; /* for core dump/debugger XXX */
|
||||
sigset_t ps_usertramp; /* SunOS compat; libc sigtramp XXX */
|
||||
};
|
||||
|
||||
#define ps_onstack ps_sigstack.ss_onstack
|
||||
#define ps_sigsp ps_sigstack.ss_sp
|
||||
|
||||
/* signal flags */
|
||||
#define SA_OLDMASK 0x01 /* need to restore mask before pause */
|
||||
#define SAS_OLDMASK 0x01 /* need to restore mask before pause */
|
||||
#define SAS_ALTSTACK 0x02 /* have alternate signal stack */
|
||||
|
||||
/* additional signal action values, used only temporarily/internally */
|
||||
#define SIG_CATCH (void (*)())2
|
||||
|
@ -75,19 +74,20 @@ struct sigacts {
|
|||
#define SIGACTION(p, sig) (p->p_sigacts->ps_sigact[(sig)])
|
||||
|
||||
/*
|
||||
* Determine signal that should be delivered to process p, the current process,
|
||||
* 0 if none. If there is a pending stop signal with default action,
|
||||
* the process stops in issig().
|
||||
* Determine signal that should be delivered to process p, the current
|
||||
* process, 0 if none. If there is a pending stop signal with default
|
||||
* action, the process stops in issignal().
|
||||
*/
|
||||
#define CURSIG(p) \
|
||||
(((p)->p_sig == 0 || \
|
||||
((p)->p_flag&P_TRACED) == 0 && \
|
||||
((p)->p_sig &~ (p)->p_sigmask) == 0) ? 0 : issig(p))
|
||||
#define CURSIG(p) \
|
||||
(((p)->p_siglist == 0 || \
|
||||
((p)->p_flag & P_TRACED) == 0 && \
|
||||
((p)->p_siglist & ~(p)->p_sigmask) == 0) ? \
|
||||
0 : issignal(p))
|
||||
|
||||
/*
|
||||
* Clear a pending signal from a process.
|
||||
*/
|
||||
#define CLRSIG(p, sig) { (p)->p_sig &= ~sigmask(sig); }
|
||||
#define CLRSIG(p, sig) { (p)->p_siglist &= ~sigmask(sig); }
|
||||
|
||||
/*
|
||||
* Signal properties and actions.
|
||||
|
@ -97,7 +97,7 @@ struct sigacts {
|
|||
#define SA_KILL 0x01 /* terminates process by default */
|
||||
#define SA_CORE 0x02 /* ditto and coredumps */
|
||||
#define SA_STOP 0x04 /* suspend process */
|
||||
#define SA_TTYSTOP (0x08|SA_STOP) /* ditto, from tty */
|
||||
#define SA_TTYSTOP 0x08 /* ditto, from tty */
|
||||
#define SA_IGNORE 0x10 /* ignore by default */
|
||||
#define SA_CONT 0x20 /* continue if suspended */
|
||||
#define SA_CANTMASK 0x40 /* non-maskable, catchable */
|
||||
|
@ -122,11 +122,11 @@ int sigprop[NSIG + 1] = {
|
|||
SA_KILL, /* SIGTERM */
|
||||
SA_IGNORE, /* SIGURG */
|
||||
SA_STOP, /* SIGSTOP */
|
||||
SA_TTYSTOP, /* SIGTSTP */
|
||||
SA_STOP|SA_TTYSTOP, /* SIGTSTP */
|
||||
SA_IGNORE|SA_CONT, /* SIGCONT */
|
||||
SA_IGNORE, /* SIGCHLD */
|
||||
SA_TTYSTOP, /* SIGTTIN */
|
||||
SA_TTYSTOP, /* SIGTTOU */
|
||||
SA_STOP|SA_TTYSTOP, /* SIGTTIN */
|
||||
SA_STOP|SA_TTYSTOP, /* SIGTTOU */
|
||||
SA_IGNORE, /* SIGIO */
|
||||
SA_KILL, /* SIGXCPU */
|
||||
SA_KILL, /* SIGXFSZ */
|
||||
|
@ -137,32 +137,32 @@ int sigprop[NSIG + 1] = {
|
|||
SA_KILL, /* SIGUSR1 */
|
||||
SA_KILL, /* SIGUSR2 */
|
||||
};
|
||||
|
||||
#define contsigmask (sigmask(SIGCONT))
|
||||
#define stopsigmask (sigmask(SIGSTOP) | sigmask(SIGTSTP) | \
|
||||
sigmask(SIGTTIN) | sigmask(SIGTTOU))
|
||||
|
||||
#endif /* SIGPROP */
|
||||
|
||||
#define stopsigmask (sigmask(SIGSTOP)|sigmask(SIGTSTP)|\
|
||||
sigmask(SIGTTIN)|sigmask(SIGTTOU))
|
||||
#define contsigmask (sigmask(SIGCONT))
|
||||
|
||||
#define sigcantmask (sigmask(SIGKILL)|sigmask(SIGSTOP))
|
||||
#define sigcantmask (sigmask(SIGKILL) | sigmask(SIGSTOP))
|
||||
|
||||
#ifdef KERNEL
|
||||
/*
|
||||
* Machine-independent functions:
|
||||
*/
|
||||
void siginit __P((struct proc *p));
|
||||
int coredump __P((struct proc *p));
|
||||
void execsigs __P((struct proc *p));
|
||||
void gsignal __P((int pgid, int sig));
|
||||
int issignal __P((struct proc *p));
|
||||
void pgsignal __P((struct pgrp *pgrp, int sig, int checkctty));
|
||||
void trapsignal __P((struct proc *p, int sig, unsigned code));
|
||||
void postsig __P((int sig));
|
||||
void psignal __P((struct proc *p, int sig));
|
||||
int issig __P((struct proc *p));
|
||||
void psig __P((int sig));
|
||||
int coredump __P((struct proc *p));
|
||||
void siginit __P((struct proc *p));
|
||||
void trapsignal __P((struct proc *p, int sig, unsigned code));
|
||||
|
||||
/*
|
||||
* Machine-dependent functions:
|
||||
*/
|
||||
void sendsig __P((sig_t action, int sig, int returnmask, unsigned code));
|
||||
#endif /* KERNEL */
|
||||
|
||||
#endif /* !_SYS_SIGNALVAR_H_ */
|
||||
#endif /* !_SYS_SIGNALVAR_H_ */
|
||||
|
|
177
sys/sys/systm.h
177
sys/sys/systm.h
|
@ -1 +1,176 @@
|
|||
revision 1.26 intentionally removed
|
||||
/*-
|
||||
* Copyright (c) 1982, 1988, 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
* (c) UNIX System Laboratories, Inc.
|
||||
* All or some portions of this file are derived from material licensed
|
||||
* to the University of California by American Telephone and Telegraph
|
||||
* Co. or Unix System Laboratories, Inc. and are reproduced herein with
|
||||
* the permission of UNIX System Laboratories, Inc.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)systm.h 8.4 (Berkeley) 2/23/94
|
||||
* $Id: systm.h,v 1.27 1994/05/05 05:40:20 cgd Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
* The `securelevel' variable controls the security level of the system.
|
||||
* It can only be decreased by process 1 (/sbin/init).
|
||||
*
|
||||
* Security levels are as follows:
|
||||
* -1 permannently insecure mode - always run system in level 0 mode.
|
||||
* 0 insecure mode - immutable and append-only flags make be turned off.
|
||||
* All devices may be read or written subject to permission modes.
|
||||
* 1 secure mode - immutable and append-only flags may not be changed;
|
||||
* raw disks of mounted filesystems, /dev/mem, and /dev/kmem are
|
||||
* read-only.
|
||||
* 2 highly secure mode - same as (1) plus raw disks are always
|
||||
* read-only whether mounted or not. This level precludes tampering
|
||||
* with filesystems by unmounting them, but also inhibits running
|
||||
* newfs while the system is secured.
|
||||
*
|
||||
* In normal operation, the system runs in level 0 mode while single user
|
||||
* and in level 1 mode while multiuser. If level 2 mode is desired while
|
||||
* running multiuser, it can be set in the multiuser startup script
|
||||
* (/etc/rc.local) using sysctl(1). If it is desired to run the system
|
||||
* in level 0 mode while multiuser, initialize the variable securelevel
|
||||
* in /sys/kern/kern_sysctl.c to -1. Note that it is NOT initialized to
|
||||
* zero as that would allow the vmunix binary to be patched to -1.
|
||||
* Without initialization, securelevel loads in the BSS area which only
|
||||
* comes into existence when the kernel is loaded and hence cannot be
|
||||
* patched by a stalking hacker.
|
||||
*/
|
||||
extern int securelevel; /* system security level */
|
||||
extern const char *panicstr; /* panic message */
|
||||
extern char version[]; /* system version */
|
||||
extern char copyright[]; /* system copyright */
|
||||
|
||||
extern int nblkdev; /* number of entries in bdevsw */
|
||||
extern int nchrdev; /* number of entries in cdevsw */
|
||||
extern int nswdev; /* number of swap devices */
|
||||
extern int nswap; /* size of swap space */
|
||||
|
||||
extern int selwait; /* select timeout address */
|
||||
|
||||
extern u_char curpriority; /* priority of current process */
|
||||
|
||||
extern int maxmem; /* max memory per process */
|
||||
extern int physmem; /* physical memory */
|
||||
|
||||
extern dev_t dumpdev; /* dump device */
|
||||
extern long dumplo; /* offset into dumpdev */
|
||||
|
||||
extern dev_t rootdev; /* root device */
|
||||
extern struct vnode *rootvp; /* vnode equivalent to above */
|
||||
|
||||
extern dev_t swapdev; /* swapping device */
|
||||
extern struct vnode *swapdev_vp;/* vnode equivalent to above */
|
||||
|
||||
struct sysent { /* system call table */
|
||||
int sy_narg; /* number of arguments */
|
||||
int (*sy_call)(); /* implementing function */
|
||||
} sysent[];
|
||||
int nsysent;
|
||||
#ifdef SYSCALL_DEBUG
|
||||
char *syscallnames[];
|
||||
#endif
|
||||
|
||||
extern int boothowto; /* reboot flags, from console subsystem */
|
||||
|
||||
/* casts to keep lint happy */
|
||||
#define insque(q,p) _insque((caddr_t)q,(caddr_t)p)
|
||||
#define remque(q) _remque((caddr_t)q)
|
||||
|
||||
/*
|
||||
* General function declarations.
|
||||
*/
|
||||
int nullop __P((void));
|
||||
int enodev __P((void));
|
||||
int enoioctl __P((void));
|
||||
int enxio __P((void));
|
||||
int eopnotsupp __P((void));
|
||||
int seltrue __P((dev_t dev, int which, struct proc *p));
|
||||
void *hashinit __P((int count, int type, u_long *hashmask));
|
||||
|
||||
#ifdef __GNUC__
|
||||
volatile void panic __P((const char *, ...));
|
||||
#else
|
||||
void panic __P((const char *, ...));
|
||||
#endif
|
||||
void tablefull __P((const char *));
|
||||
void addlog __P((const char *, ...));
|
||||
void log __P((int, const char *, ...));
|
||||
void printf __P((const char *, ...));
|
||||
int sprintf __P((char *buf, const char *, ...));
|
||||
void ttyprintf __P((struct tty *, const char *, ...));
|
||||
|
||||
void bcopy __P((const void *from, void *to, u_int len));
|
||||
void ovbcopy __P((const void *from, void *to, u_int len));
|
||||
void bzero __P((void *buf, u_int len));
|
||||
|
||||
int copystr __P((void *kfaddr, void *kdaddr, u_int len, u_int *done));
|
||||
int copyinstr __P((void *udaddr, void *kaddr, u_int len, u_int *done));
|
||||
int copyoutstr __P((void *kaddr, void *udaddr, u_int len, u_int *done));
|
||||
int copyin __P((void *udaddr, void *kaddr, u_int len));
|
||||
int copyout __P((void *kaddr, void *udaddr, u_int len));
|
||||
|
||||
int fubyte __P((void *base));
|
||||
#ifdef notdef
|
||||
int fuibyte __P((void *base));
|
||||
#endif
|
||||
int subyte __P((void *base, int byte));
|
||||
int suibyte __P((void *base, int byte));
|
||||
int fuword __P((void *base));
|
||||
int fuiword __P((void *base));
|
||||
int suword __P((void *base, int word));
|
||||
int suiword __P((void *base, int word));
|
||||
|
||||
int hzto __P((struct timeval *tv));
|
||||
void timeout __P((void (*func)(void *), void *arg, int ticks));
|
||||
void untimeout __P((void (*func)(void *), void *arg));
|
||||
void realitexpire __P((void *));
|
||||
|
||||
struct clockframe;
|
||||
void hardclock __P((struct clockframe *frame));
|
||||
void softclock __P((void));
|
||||
void statclock __P((struct clockframe *frame));
|
||||
|
||||
void initclocks __P((void));
|
||||
|
||||
void startprofclock __P((struct proc *));
|
||||
void stopprofclock __P((struct proc *));
|
||||
void setstatclockrate __P((int hzrate));
|
||||
|
||||
#include <lib/libkern/libkern.h>
|
||||
|
||||
#ifdef DDB
|
||||
/* debugger entry points */
|
||||
int Debugger __P((void)); /* in DDB only */
|
||||
int read_symtab_from_file __P((struct proc *,struct vnode *,const char *));
|
||||
#endif
|
||||
|
|
|
@ -1 +1 @@
|
|||
revision 1.20 intentionally removed
|
||||
revision 1.21 intentionally removed
|
||||
|
|
Loading…
Reference in New Issue