Date: Tue, 22 Oct 1996 18:59:37 -0700 From: Julian Elischer <julian@whistle.com> To: current@freebsd.org Subject: [Fwd: another patch for comment] Message-ID: <326D7C09.794BDF32@whistle.com>
next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format. --------------1CFBAE3959E2B60015FB7483 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit AARG! left out the patch! here it is.. --------------1CFBAE3959E2B60015FB7483 Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-ID: <326D7BB3.446B9B3D@whistle.com> Date: Tue, 22 Oct 1996 18:58:11 -0700 From: Julian Elischer <julian@whistle.com> Organization: Whistle Communications X-Mailer: Mozilla 3.0b6 (X11; I; FreeBSD 2.2-CURRENT i386) MIME-Version: 1.0 To: current@freebsd.org Subject: another patch for comment Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit here's another patch I'd like to add. hopefully I can also eventually add a '/stand/selftest' as well. Of course at this stage we can only test our own hardware etc. but I'd like to add a version that can do basic sanity checks on regular PC hardware as well. It's such a small change that I'd like to add it to the generic sources rather than keep it proprietary. julian --------------1CFBAE3959E2B60015FB7483 Content-Type: text/plain; charset=us-ascii; name="init.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="init.diff" ? 0 Index: init_main.c =================================================================== RCS file: /cvs/freebsd/src/sys/kern/init_main.c,v retrieving revision 1.49 diff -c -r1.49 init_main.c *** 1.49 1996/09/23 04:37:54 --- init_main.c 1996/10/23 01:31:29 *************** *** 533,539 **** * List of paths to try when searching for "init". */ static char *initpaths[] = { ! "/sbin/init", "/sbin/oinit", "/sbin/init.bak", "/stand/sysinstall", --- 533,540 ---- * List of paths to try when searching for "init". */ static char *initpaths[] = { ! "/stand/selftest", /* not default, use with RB_SELFTEST */ ! "/sbin/init", /* Default action */ "/sbin/oinit", "/sbin/init.bak", "/stand/sysinstall", *************** *** 574,580 **** p->p_vmspace->vm_maxsaddr = (caddr_t)addr; p->p_vmspace->vm_ssize = 1; ! for (pathp = &initpaths[0]; (path = *pathp) != NULL; pathp++) { /* * Move out the boot flag argument. */ --- 575,582 ---- p->p_vmspace->vm_maxsaddr = (caddr_t)addr; p->p_vmspace->vm_ssize = 1; ! for (pathp = ((boothowto & RB_SELFTEST)? &initpaths[0] : &initpaths[1]); ! (path = *pathp) != NULL; pathp++) { /* * Move out the boot flag argument. */ Index: kern_exit.c =================================================================== RCS file: /cvs/freebsd/src/sys/kern/kern_exit.c,v retrieving revision 1.39 diff -c -r1.39 kern_exit.c *** 1.39 1996/09/13 09:17:03 --- kern_exit.c 1996/10/23 01:31:29 *************** *** 196,202 **** * drain controlling terminal * and revoke access to controlling terminal. */ ! if (sp->s_ttyp->t_session == sp) { if (sp->s_ttyp->t_pgrp) pgsignal(sp->s_ttyp->t_pgrp, SIGHUP, 1); (void) ttywait(sp->s_ttyp); --- 196,202 ---- * drain controlling terminal * and revoke access to controlling terminal. */ ! if (sp->s_ttyp && (sp->s_ttyp->t_session == sp)) { if (sp->s_ttyp->t_pgrp) pgsignal(sp->s_ttyp->t_pgrp, SIGHUP, 1); (void) ttywait(sp->s_ttyp); Index: kern_time.c =================================================================== RCS file: /cvs/freebsd/src/sys/kern/kern_time.c,v retrieving revision 1.17 diff -c -r1.17 kern_time.c *** 1.17 1996/07/12 07:55:35 --- kern_time.c 1996/10/23 01:31:29 *************** *** 56,61 **** --- 56,62 ---- */ static void timevalfix __P((struct timeval *)); + static void recalc_realtimer(struct timeval); #ifndef _SYS_SYSPROTO_H_ struct gettimeofday_args { *************** *** 114,120 **** (error = copyin((caddr_t)uap->tzp, (caddr_t)&atz, sizeof(atz)))) return (error); if (uap->tv) { - /* WHAT DO WE DO ABOUT PENDING REAL-TIME TIMEOUTS??? */ s = splclock(); /* * Calculate delta directly to minimize clock interrupt --- 115,120 ---- *************** *** 136,141 **** --- 136,142 ---- timevalfix(&delta); timevaladd(&boottime, &delta); timevaladd(&runtime, &delta); + recalc_realtimer(delta); LEASE_UPDATETIME(delta.tv_sec); splx(s); resettodr(); *************** *** 144,149 **** --- 145,164 ---- tz = atz; return (0); } + + + static void + recalc_realtimer(struct timeval delta) + { + struct proc *p; + + for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) { + if (timerisset(&p->p_realtimer.it_value)) { + timevaladd(&p->p_realtimer.it_value, &delta); + timevalfix(&p->p_realtimer.it_value); + } + } + } extern int tickadj; /* "standard" clock skew, us./tick */ int tickdelta; /* current clock skew, us. per tick */ --------------1CFBAE3959E2B60015FB7483--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?326D7C09.794BDF32>