systm.h (224307) | systm.h (228424) |
---|---|
1/*- 2 * Copyright (c) 1982, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 18 unchanged lines hidden (view full) --- 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)systm.h 8.7 (Berkeley) 3/29/95 | 1/*- 2 * Copyright (c) 1982, 1988, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 18 unchanged lines hidden (view full) --- 27 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 * SUCH DAMAGE. 33 * 34 * @(#)systm.h 8.7 (Berkeley) 3/29/95 |
35 * $FreeBSD: head/sys/sys/systm.h 224307 2011-07-25 09:12:48Z avg $ | 35 * $FreeBSD: head/sys/sys/systm.h 228424 2011-12-11 21:02:01Z avg $ |
36 */ 37 38#ifndef _SYS_SYSTM_H_ 39#define _SYS_SYSTM_H_ 40 41#include <machine/atomic.h> 42#include <machine/cpufunc.h> 43#include <sys/callout.h> 44#include <sys/cdefs.h> 45#include <sys/queue.h> 46#include <sys/stdint.h> /* for people using printf mainly */ 47 48extern int cold; /* nonzero if we are doing a cold boot */ 49extern int rebooting; /* kern_reboot() has been called. */ | 36 */ 37 38#ifndef _SYS_SYSTM_H_ 39#define _SYS_SYSTM_H_ 40 41#include <machine/atomic.h> 42#include <machine/cpufunc.h> 43#include <sys/callout.h> 44#include <sys/cdefs.h> 45#include <sys/queue.h> 46#include <sys/stdint.h> /* for people using printf mainly */ 47 48extern int cold; /* nonzero if we are doing a cold boot */ 49extern int rebooting; /* kern_reboot() has been called. */ |
50extern int stop_scheduler; /* only one thread runs after panic */ |
|
50extern const char *panicstr; /* panic message */ 51extern char version[]; /* system version */ 52extern char copyright[]; /* system copyright */ 53extern int kstack_pages; /* number of kernel stack pages */ 54 55extern u_long pagesizes[]; /* supported page sizes */ 56extern long physmem; /* physical memory */ 57extern long realmem; /* 'real' memory */ --- 46 unchanged lines hidden (view full) --- 104 * on some architectures, atomicity for unaligned loads will depend on 105 * whether or not the load spans multiple cache lines. 106 */ 107#define ASSERT_ATOMIC_LOAD_PTR(var, msg) \ 108 KASSERT(sizeof(var) == sizeof(void *) && \ 109 ((uintptr_t)&(var) & (sizeof(void *) - 1)) == 0, msg) 110 111/* | 51extern const char *panicstr; /* panic message */ 52extern char version[]; /* system version */ 53extern char copyright[]; /* system copyright */ 54extern int kstack_pages; /* number of kernel stack pages */ 55 56extern u_long pagesizes[]; /* supported page sizes */ 57extern long physmem; /* physical memory */ 58extern long realmem; /* 'real' memory */ --- 46 unchanged lines hidden (view full) --- 105 * on some architectures, atomicity for unaligned loads will depend on 106 * whether or not the load spans multiple cache lines. 107 */ 108#define ASSERT_ATOMIC_LOAD_PTR(var, msg) \ 109 KASSERT(sizeof(var) == sizeof(void *) && \ 110 ((uintptr_t)&(var) & (sizeof(void *) - 1)) == 0, msg) 111 112/* |
113 * If we have already panic'd and this is the thread that called 114 * panic(), then don't block on any mutexes but silently succeed. 115 * Otherwise, the kernel will deadlock since the scheduler isn't 116 * going to run the thread that holds any lock we need. 117 */ 118#define SCHEDULER_STOPPED() __predict_false(stop_scheduler) 119 120/* |
|
112 * XXX the hints declarations are even more misplaced than most declarations 113 * in this file, since they are needed in one file (per arch) and only used 114 * in two files. 115 * XXX most of these variables should be const. 116 */ 117extern int osreldate; 118extern int envmode; 119extern int hintmode; /* 0 = off. 1 = config, 2 = fallback */ --- 287 unchanged lines hidden --- | 121 * XXX the hints declarations are even more misplaced than most declarations 122 * in this file, since they are needed in one file (per arch) and only used 123 * in two files. 124 * XXX most of these variables should be const. 125 */ 126extern int osreldate; 127extern int envmode; 128extern int hintmode; /* 0 = off. 1 = config, 2 = fallback */ --- 287 unchanged lines hidden --- |