Remove yield() until the scheduler supports the sched_yield(2) system
call.
This commit is contained in:
parent
74da856861
commit
a5424a9df1
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_synch.c,v 1.115 2002/11/03 13:59:12 nisimura Exp $ */
|
||||
/* $NetBSD: kern_synch.c,v 1.116 2002/12/20 05:43:09 gmcgarry Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -78,7 +78,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.115 2002/11/03 13:59:12 nisimura Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.116 2002/12/20 05:43:09 gmcgarry Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_ktrace.h"
|
||||
@ -717,26 +717,6 @@ wakeup_one(void *ident)
|
||||
SCHED_UNLOCK(s);
|
||||
}
|
||||
|
||||
/*
|
||||
* General yield call. Puts the current process back on its run queue and
|
||||
* performs a voluntary context switch.
|
||||
*/
|
||||
void
|
||||
yield(void)
|
||||
{
|
||||
struct proc *p = curproc;
|
||||
int s;
|
||||
|
||||
SCHED_LOCK(s);
|
||||
p->p_priority = p->p_usrpri;
|
||||
p->p_stat = SRUN;
|
||||
setrunqueue(p);
|
||||
p->p_stats->p_ru.ru_nvcsw++;
|
||||
mi_switch(p, NULL);
|
||||
SCHED_ASSERT_UNLOCKED();
|
||||
splx(s);
|
||||
}
|
||||
|
||||
/*
|
||||
* General preemption call. Puts the current process back on its run queue
|
||||
* and performs an involuntary context switch. If a process is supplied,
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: proc.h,v 1.149 2002/12/12 20:41:47 jdolecek Exp $ */
|
||||
/* $NetBSD: proc.h,v 1.150 2002/12/20 05:43:10 gmcgarry Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1986, 1989, 1991, 1993
|
||||
@ -436,7 +436,6 @@ int enterpgrp(struct proc *p, pid_t pgid, int mksess);
|
||||
void fixjobc(struct proc *p, struct pgrp *pgrp, int entering);
|
||||
int inferior(struct proc *p, struct proc *q);
|
||||
int leavepgrp(struct proc *p);
|
||||
void yield(void);
|
||||
void preempt(struct proc *);
|
||||
void mi_switch(struct proc *, struct proc *);
|
||||
struct proc *chooseproc(void);
|
||||
|
Loading…
Reference in New Issue
Block a user