]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/default_pager/diag.h
e197e2aa87f45834fca05a8822c08f6dc97cf0d5
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
20 * @APPLE_LICENSE_HEADER_END@
28 * Revision 1.3 2000/01/26 05:56:23 wsanchez
31 * Revision 1.2 1998/12/01 00:24:42 wsanchez
32 * Merged in CDY_DP1 (chris: default pager)
34 * Revision 1.1.2.2 1998/11/25 21:32:17 youngwor
35 * fix errant comment format
37 * Revision 1.1.2.1 1998/11/24 22:39:59 youngwor
38 * Check-in of support for the in-kernel default pager
40 * Revision 1.1.1.1 1998/03/07 02:26:31 wsanchez
41 * Import of OSF Mach kernel (~mburg)
43 * Revision 1.1.6.3 1995/04/07 18:51:32 barbou
44 * Changed panic messages format.
48 * Revision 1.1.6.2 1995/01/11 19:30:28 devrcs
49 * mk6 CR668 - 1.3b26 merge
50 * [1994/11/10 15:31:34 bolinger]
54 * BEGIN OSC1_3 HISTORY
56 * Revision 1.1.2.2 1994/04/01 18:45:25 jph
57 * CR10550 -- Add stats macros for info interfaces.
58 * [1994/04/01 18:45:06 jph]
60 * Revision 1.1.2.1 1994/02/16 14:22:46 jph
61 * CR10554 -- Simple assert and panic macros for diagnostics.
62 * [1994/02/16 14:22:02 jph]
65 * [1994/11/10 15:30:44 bolinger]
72 #define assert(cond) \
73 if (!(cond)) panic("%sassertion: %s", my_name, # cond)
81 #define Panic(aargh) panic("%s[%d]%s: %s", my_name, dp_thread_id(), here, aargh)
83 #define Panic(aargh) panic("%s[KERNEL]%s: %s", my_name, here, aargh)
86 extern char my_name
[];
88 #define VSTATS_ACTION(l, stmt) \
89 do { VSTATS_LOCK(l); stmt; VSTATS_UNLOCK(l); } while (0)
91 #if !defined(VAGUE_STATS) || (VAGUE_STATS > 0)
92 #define VSTATS_LOCK_DECL(name)
93 #define VSTATS_LOCK(l)
94 #define VSTATS_UNLOCK(l)
95 #define VSTATS_LOCK_INIT(l)
97 #define VSTATS_LOCK_DECL(name) struct mutex name;
98 #define VSTATS_LOCK(l) mutex_lock(l)
99 #define VSTATS_UNLOCK(l) mutex_unlock(l)
100 #define VSTATS_LOCK_INIT(l) mutex_init(l)
101 #endif /* VAGUE_STATS */