The function and the argument never change.
-/* $OpenBSD: init_main.c,v 1.51 2000/03/23 10:13:58 art Exp $ */
+/* $OpenBSD: init_main.c,v 1.52 2000/03/23 16:54:44 art Exp $ */
/* $NetBSD: init_main.c,v 1.84.4.1 1996/06/02 09:08:06 mrg Exp $ */
/*
extern struct pdevinit pdevinit[];
extern void scheduler_start __P((void));
extern void disk_init __P((void));
+ extern void endtsleep __P((void *));
+ extern void realitexpire __P((void *));
/*
* Initialize the current process pointer (curproc) before
p->p_emul = &emul_native;
bcopy("swapper", p->p_comm, sizeof ("swapper"));
+ /* Init timeouts. */
+ timeout_set(&p->p_sleep_to, endtsleep, p);
+ timeout_set(&p->p_realit_to, realitexpire, p);
+
/* Create credentials. */
cred0.p_refcnt = 1;
p->p_cred = &cred0;
-/* $OpenBSD: kern_fork.c,v 1.30 2000/03/03 11:46:09 art Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.31 2000/03/23 16:54:44 art Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
size_t stacksize;
register_t *retval;
{
- register struct proc *p2;
- register uid_t uid;
+ struct proc *p2;
+ uid_t uid;
struct proc *newproc;
struct vmspace *vm;
int count;
static int pidchecked = 0;
vaddr_t uaddr;
+ extern void endtsleep __P((void *));
+ extern void realitexpire __P((void *));
/*
* Although process entries are dynamically created, we still keep
bcopy(&p1->p_startcopy, &p2->p_startcopy,
(unsigned) ((caddr_t)&p2->p_endcopy - (caddr_t)&p2->p_startcopy));
+ /*
+ * Initialize the timeouts.
+ */
+ timeout_set(&p2->p_sleep_to, endtsleep, p2);
+ timeout_set(&p2->p_realit_to, realitexpire, p2);
+
/*
* Duplicate sub-structures as needed.
* Increase reference counts on shared objects.
-/* $OpenBSD: kern_synch.c,v 1.22 2000/03/23 14:44:37 art Exp $ */
+/* $OpenBSD: kern_synch.c,v 1.23 2000/03/23 16:54:43 art Exp $ */
/* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */
/*-
else
*qp->sq_tailp = p;
*(qp->sq_tailp = &p->p_forw) = 0;
- if (timo) {
- timeout_set(&p->p_sleep_to, endtsleep, p);
+ if (timo)
timeout_add(&p->p_sleep_to, timo);
- }
/*
* We put ourselves on the sleep queue and start our timeout
* before calling CURSIG, as we could stop there, and a wakeup
-/* $OpenBSD: kern_time.c,v 1.18 2000/03/23 15:55:52 art Exp $ */
+/* $OpenBSD: kern_time.c,v 1.19 2000/03/23 16:54:44 art Exp $ */
/* $NetBSD: kern_time.c,v 1.20 1996/02/18 11:57:06 fvdl Exp $ */
/*
timeout_del(&p->p_realit_to);
if (timerisset(&aitv.it_value)) {
timeradd(&aitv.it_value, &time, &aitv.it_value);
- timeout_set(&p->p_realit_to, realitexpire, p);
timeout_add(&p->p_realit_to, hzto(&aitv.it_value));
}
p->p_realtimer = aitv;