Put sound into multimedia and rename it to audio because it is "MoreCorrect©"
[reactos.git] / reactos / drivers / lib / oskittcp / include / freebsd / src / sys / sys / kernel.h
1 /*-
2 * Copyright (c) 1990, 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.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the University of
21 * California, Berkeley and its contributors.
22 * 4. Neither the name of the University nor the names of its contributors
23 * may be used to endorse or promote products derived from this software
24 * without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)kernel.h 8.3 (Berkeley) 1/21/94
39 * $\Id: kernel.h,v 1.9 1995/03/20 19:20:26 wollman Exp $
40 */
41
42 #ifndef _SYS_KERNEL_H_
43 #define _SYS_KERNEL_H_
44
45 /* Global variables for the kernel. */
46
47 /* 1.1 */
48 extern long hostid;
49 extern char hostname[MAXHOSTNAMELEN];
50 extern int hostnamelen;
51 extern char domainname[MAXHOSTNAMELEN];
52 extern int domainnamelen;
53 extern char kernelname[MAXPATHLEN];
54
55 /* 1.2 */
56 extern volatile struct timeval mono_time;
57 extern struct timeval boottime;
58 extern struct timeval runtime;
59 #ifdef _MSC_VER /* TODO FIXME - need a library-specific macro for this one */
60 extern volatile struct timeval kern_time;
61 #else/*_MSC_VER*/
62 extern volatile struct timeval time;
63 #endif/*_MSC_VER*/
64 extern struct timezone tz; /* XXX */
65
66 extern int tick; /* usec per tick (1000000 / hz) */
67 extern int hz; /* system clock's frequency */
68 extern int stathz; /* statistics clock's frequency */
69 extern int profhz; /* profiling clock's frequency */
70 extern int ticks;
71 extern int lbolt; /* once a second sleep address */
72 extern int tickdelta;
73 extern long timedelta;
74
75 /*
76 * The following macros are used to declare global sets of objects, which
77 * are collected by the linker into a `struct linker_set' as defined below.
78 *
79 * NB: the constants defined below must match those defined in
80 * ld/ld.h. Since their calculation requires arithmetic, we
81 * can't name them symbolically (e.g., 23 is N_SETT | N_EXT).
82 */
83 #ifdef _MSC_VER
84 #define MAKE_SET(set, sym, type)
85 #else
86 #define MAKE_SET(set, sym, type) \
87 asm(".stabs \"_" #set "\", " #type ", 0, 0, _" #sym)
88 #endif
89 #define TEXT_SET(set, sym) MAKE_SET(set, sym, 23)
90 #define DATA_SET(set, sym) MAKE_SET(set, sym, 25)
91 #define BSS_SET(set, sym) MAKE_SET(set, sym, 27)
92 #define ABS_SET(set, sym) MAKE_SET(set, sym, 21)
93
94 #ifdef PSEUDO_LKM
95 #include <sys/conf.h>
96 #include <sys/exec.h>
97 #include <sys/sysent.h>
98 #include <sys/lkm.h>
99
100 #define PSEUDO_SET(init, name) \
101 extern struct linker_set MODVNOPS; \
102 MOD_MISC(#name); \
103 int name ## _load(struct lkm_table *lkmtp, int cmd) \
104 { init(); return 0; } \
105 int name ## _unload(struct lkm_table *lkmtp, int cmd) \
106 { return EINVAL; } \
107 int \
108 name ## _mod(struct lkm_table *lkmtp, int cmd, int ver) { \
109 DISPATCH(lkmtp, cmd, ver, name ## _load, name ## _unload, \
110 nosys); }
111 #else /* PSEUDO_LKM */
112
113 #define PSEUDO_SET(sym, name) TEXT_SET(pseudo_set, sym)
114
115 #endif /* PSEUDO_LKM */
116
117 struct linker_set {
118 int ls_length;
119 caddr_t ls_items[1]; /* really ls_length of them, trailing NULL */
120 };
121
122 extern const struct linker_set execsw_set;
123
124 #endif