- machine/mutex.h -> sys/mutex.h
- Use MUTEX_DECLARE() and MTX_COLD for Giant and sched_lock.
This commit is contained in:
parent
02660e29a8
commit
557b927eca
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67357
@ -97,7 +97,7 @@
|
||||
#include <sys/systm.h>
|
||||
#include <sys/eventhandler.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <machine/mutex.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/ktr.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -153,8 +153,8 @@ struct bootinfo_kernel bootinfo;
|
||||
|
||||
struct cpuhead cpuhead;
|
||||
|
||||
struct mtx sched_lock;
|
||||
struct mtx Giant;
|
||||
MUTEX_DECLARE( ,sched_lock);
|
||||
MUTEX_DECLARE( ,Giant);
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
@ -1029,8 +1029,8 @@ alpha_init(pfn, ptb, bim, bip, biv)
|
||||
/*
|
||||
* Initialise mutexes.
|
||||
*/
|
||||
mtx_init(&Giant, "Giant", MTX_DEF);
|
||||
mtx_init(&sched_lock, "sched lock", MTX_SPIN);
|
||||
mtx_init(&Giant, "Giant", MTX_DEF | MTX_COLD);
|
||||
mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_COLD);
|
||||
|
||||
/*
|
||||
* Enable interrupts on first release (in switch_trampoline).
|
||||
|
@ -60,6 +60,7 @@
|
||||
#include <sys/ktr.h>
|
||||
#include <sys/linker.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/bio.h>
|
||||
#include <sys/buf.h>
|
||||
@ -98,7 +99,6 @@
|
||||
#include <machine/specialreg.h>
|
||||
#include <machine/bootinfo.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/mutex.h>
|
||||
#include <machine/pc/bios.h>
|
||||
#include <machine/pcb_ext.h> /* pcb.h included via sys/user.h */
|
||||
#include <machine/globaldata.h>
|
||||
@ -247,8 +247,8 @@ static struct trapframe proc0_tf;
|
||||
|
||||
struct cpuhead cpuhead;
|
||||
|
||||
struct mtx sched_lock;
|
||||
struct mtx Giant;
|
||||
MUTEX_DECLARE(,sched_lock);
|
||||
MUTEX_DECLARE(,Giant);
|
||||
|
||||
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
|
||||
|
||||
@ -428,7 +428,7 @@ cpu_startup(dummy)
|
||||
SLIST_INIT(&cpuhead);
|
||||
SLIST_INSERT_HEAD(&cpuhead, GLOBALDATA, gd_allcpu);
|
||||
|
||||
mtx_init(&sched_lock, "sched lock", MTX_SPIN);
|
||||
mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_COLD);
|
||||
|
||||
#ifdef SMP
|
||||
/*
|
||||
@ -1941,7 +1941,7 @@ init386(first)
|
||||
/*
|
||||
* We need this mutex before the console probe.
|
||||
*/
|
||||
mtx_init(&clock_lock, "clk interrupt lock", MTX_SPIN);
|
||||
mtx_init(&clock_lock, "clk", MTX_SPIN | MTX_COLD);
|
||||
|
||||
/*
|
||||
* Initialize the console before we print anything out.
|
||||
@ -1956,7 +1956,7 @@ init386(first)
|
||||
/*
|
||||
* Giant is used early for at least debugger traps and unexpected traps.
|
||||
*/
|
||||
mtx_init(&Giant, "Giant", MTX_DEF);
|
||||
mtx_init(&Giant, "Giant", MTX_DEF | MTX_COLD);
|
||||
|
||||
#ifdef DDB
|
||||
kdb_init();
|
||||
|
@ -60,6 +60,7 @@
|
||||
#include <sys/ktr.h>
|
||||
#include <sys/linker.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/bio.h>
|
||||
#include <sys/buf.h>
|
||||
@ -98,7 +99,6 @@
|
||||
#include <machine/specialreg.h>
|
||||
#include <machine/bootinfo.h>
|
||||
#include <machine/md_var.h>
|
||||
#include <machine/mutex.h>
|
||||
#include <machine/pc/bios.h>
|
||||
#include <machine/pcb_ext.h> /* pcb.h included via sys/user.h */
|
||||
#include <machine/globaldata.h>
|
||||
@ -247,8 +247,8 @@ static struct trapframe proc0_tf;
|
||||
|
||||
struct cpuhead cpuhead;
|
||||
|
||||
struct mtx sched_lock;
|
||||
struct mtx Giant;
|
||||
MUTEX_DECLARE(,sched_lock);
|
||||
MUTEX_DECLARE(,Giant);
|
||||
|
||||
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
|
||||
|
||||
@ -428,7 +428,7 @@ cpu_startup(dummy)
|
||||
SLIST_INIT(&cpuhead);
|
||||
SLIST_INSERT_HEAD(&cpuhead, GLOBALDATA, gd_allcpu);
|
||||
|
||||
mtx_init(&sched_lock, "sched lock", MTX_SPIN);
|
||||
mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_COLD);
|
||||
|
||||
#ifdef SMP
|
||||
/*
|
||||
@ -1941,7 +1941,7 @@ init386(first)
|
||||
/*
|
||||
* We need this mutex before the console probe.
|
||||
*/
|
||||
mtx_init(&clock_lock, "clk interrupt lock", MTX_SPIN);
|
||||
mtx_init(&clock_lock, "clk", MTX_SPIN | MTX_COLD);
|
||||
|
||||
/*
|
||||
* Initialize the console before we print anything out.
|
||||
@ -1956,7 +1956,7 @@ init386(first)
|
||||
/*
|
||||
* Giant is used early for at least debugger traps and unexpected traps.
|
||||
*/
|
||||
mtx_init(&Giant, "Giant", MTX_DEF);
|
||||
mtx_init(&Giant, "Giant", MTX_DEF | MTX_COLD);
|
||||
|
||||
#ifdef DDB
|
||||
kdb_init();
|
||||
|
@ -84,8 +84,8 @@ struct bootinfo_kernel bootinfo;
|
||||
|
||||
struct cpuhead cpuhead;
|
||||
|
||||
struct mtx sched_lock;
|
||||
struct mtx Giant;
|
||||
MUTEX_DECLARE( ,sched_lock);
|
||||
MUTEX_DECLARE( ,Giant);
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
@ -617,8 +617,8 @@ ia64_init()
|
||||
/*
|
||||
* Initialise mutexes.
|
||||
*/
|
||||
mtx_init(&Giant, "Giant", MTX_DEF);
|
||||
mtx_init(&sched_lock, "sched lock", MTX_SPIN);
|
||||
mtx_init(&Giant, "Giant", MTX_DEF | MTX_COLD);
|
||||
mtx_init(&sched_lock, "sched lock", MTX_SPIN | MTX_COLD);
|
||||
|
||||
#if 0
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user