- Wrap sys/cpu.h contents in _LOCORE.
- Add a RESCHED_LAZY flag and use instead of zero.
This commit is contained in:
parent
277ec70b63
commit
7ad98abc71
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kern_runq.c,v 1.22 2008/10/07 09:48:27 rmind Exp $ */
|
||||
/* $NetBSD: kern_runq.c,v 1.23 2008/12/02 17:57:32 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007, 2008 Mindaugas Rasiukevicius <rmind at NetBSD org>
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.22 2008/10/07 09:48:27 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_runq.c,v 1.23 2008/12/02 17:57:32 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -261,7 +261,7 @@ sched_enqueue(struct lwp *l, bool swtch)
|
|||
else if (eprio >= sched_upreempt_pri)
|
||||
type = RESCHED_IMMED;
|
||||
else
|
||||
type = 0;
|
||||
type = RESCHED_LAZY;
|
||||
cpu_need_resched(ci, type);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.h,v 1.24 2008/10/31 00:36:22 rmind Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.25 2008/12/02 17:57:32 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 YAMAMOTO Takashi,
|
||||
|
@ -29,6 +29,8 @@
|
|||
#ifndef _SYS_CPU_H_
|
||||
#define _SYS_CPU_H_
|
||||
|
||||
#ifndef _LOCORE
|
||||
|
||||
#include <machine/cpu.h>
|
||||
|
||||
#include <sys/lwp.h>
|
||||
|
@ -52,10 +54,6 @@ void cpu_need_resched(struct cpu_info *, int);
|
|||
#define cpu_did_resched(l) /* nothing */
|
||||
#endif
|
||||
|
||||
/* flags for cpu_need_resched */
|
||||
#define RESCHED_IMMED 1
|
||||
#define RESCHED_KPREEMPT 2
|
||||
|
||||
#ifndef CPU_INFO_ITERATOR
|
||||
#define CPU_INFO_ITERATOR int
|
||||
#define CPU_INFO_FOREACH(cii, ci) \
|
||||
|
@ -90,4 +88,11 @@ cpu_index(struct cpu_info *ci)
|
|||
return ci->ci_index;
|
||||
}
|
||||
|
||||
#endif /* !_LOCORE */
|
||||
|
||||
/* flags for cpu_need_resched */
|
||||
#define RESCHED_LAZY 0x01
|
||||
#define RESCHED_IMMED 0x02
|
||||
#define RESCHED_KPREEMPT 0x03
|
||||
|
||||
#endif /* !_SYS_CPU_H_ */
|
||||
|
|
Loading…
Reference in New Issue