1 /*-
2 * Copyright (c) 1997, 1998
3 * Nan Yang Computer Services Limited. All rights reserved.
4 *
5 * This software is distributed under the so-called ``Berkeley
6 * License'':
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed by Nan Yang Computer
19 * Services Limited.
20 * 4. Neither the name of the Company nor the names of its contributors
21 * may be used to endorse or promote products derived from this software
22 * without specific prior written permission.
23 *
24 * This software is provided ``as is'', and any express or implied
25 * warranties, including, but not limited to, the implied warranties of
26 * merchantability and fitness for a particular purpose are disclaimed.
27 * In no event shall the company or contributors be liable for any
28 * direct, indirect, incidental, special, exemplary, or consequential
29 * damages (including, but not limited to, procurement of substitute
30 * goods or services; loss of use, data, or profits; or business
31 * interruption) however caused and on any theory of liability, whether
32 * in contract, strict liability, or tort (including negligence or
33 * otherwise) arising in any way out of the use of this software, even if
34 * advised of the possibility of such damage.
35 */
36
37 /* Header files used by all modules */
38 /*
39 * $Id: vinumhdr.h,v 1.16 1999/12/30 07:02:44 grog Exp grog $
40 * $FreeBSD$
41 */
42
43 #include <sys/param.h>
44 #ifdef KERNEL
45 #include "opt_vinum.h"
46 #include <sys/systm.h>
47 #include <sys/kernel.h>
48 #endif
49 #include <sys/proc.h>
50 #include <sys/errno.h>
51 #include <sys/dkstat.h>
52 #include <sys/buf.h>
53 #include <sys/malloc.h>
54 #include <sys/uio.h>
55 #include <sys/namei.h>
56 #include <sys/conf.h>
57 #include <sys/stat.h>
58 #include <sys/disklabel.h>
59 #include <ufs/ffs/fs.h>
60 #include <sys/mount.h>
61 #include <sys/syslog.h>
62 #include <sys/fcntl.h>
63 #include <sys/vnode.h>
64 #include <sys/queue.h>
65 #ifdef KERNEL
66 #include <machine/setjmp.h>
67 #include <machine/stdarg.h>
68 #else
69 #include <setjmp.h>
70 #include <stdarg.h>
71 #endif
72 #include <vm/vm.h>
73 #include <dev/vinum/vinumvar.h>
74 #include <dev/vinum/vinumio.h>
75 #include <dev/vinum/vinumkw.h>
76 #include <dev/vinum/vinumext.h>
77 #include <machine/cpu.h>
78
79 #undef Free /* defined in some funny net stuff */
80 #ifdef KERNEL
81 #ifdef VINUMDEBUG
82 #define Malloc(x) MMalloc ((x), __FILE__, __LINE__) /* show where we came from */
83 #define Free(x) FFree ((x), __FILE__, __LINE__) /* show where we came from */
84 caddr_t MMalloc (int size, char *, int);
85 void FFree (void *mem, char *, int);
86 #define LOCKDRIVE(d) lockdrive (d, __FILE__, __LINE__)
87 #else
88 #define Malloc(x) malloc((x), M_DEVBUF, intr_nesting_level == 0)
89 #define Free(x) free((x), M_DEVBUF)
90 #define LOCKDRIVE(d) lockdrive (d)
91 #endif
92 #else
93 #define Malloc(x) malloc ((x)) /* just the size */
94 #define Free(x) free ((x)) /* just the address */
95 #endif
96
Cache object: 858f9a3812a953fe308beb0470133460
|