1*27ea14ccSriastradh /* $NetBSD: kernel.h,v 1.35 2022/10/26 23:27:32 riastradh Exp $ */ 2fccfa11aScgd 3a0a74294Scgd /*- 4a0a74294Scgd * Copyright (c) 1990, 1993 5a0a74294Scgd * The Regents of the University of California. All rights reserved. 6a0a74294Scgd * (c) UNIX System Laboratories, Inc. 7a0a74294Scgd * All or some portions of this file are derived from material licensed 8a0a74294Scgd * to the University of California by American Telephone and Telegraph 9a0a74294Scgd * Co. or Unix System Laboratories, Inc. and are reproduced herein with 10a0a74294Scgd * the permission of UNIX System Laboratories, Inc. 11a0a74294Scgd * 12a0a74294Scgd * Redistribution and use in source and binary forms, with or without 13a0a74294Scgd * modification, are permitted provided that the following conditions 14a0a74294Scgd * are met: 15a0a74294Scgd * 1. Redistributions of source code must retain the above copyright 16a0a74294Scgd * notice, this list of conditions and the following disclaimer. 17a0a74294Scgd * 2. Redistributions in binary form must reproduce the above copyright 18a0a74294Scgd * notice, this list of conditions and the following disclaimer in the 19a0a74294Scgd * documentation and/or other materials provided with the distribution. 20aad01611Sagc * 3. Neither the name of the University nor the names of its contributors 21a0a74294Scgd * may be used to endorse or promote products derived from this software 22a0a74294Scgd * without specific prior written permission. 23a0a74294Scgd * 24a0a74294Scgd * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 25a0a74294Scgd * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 26a0a74294Scgd * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 27a0a74294Scgd * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 28a0a74294Scgd * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29a0a74294Scgd * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30a0a74294Scgd * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31a0a74294Scgd * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32a0a74294Scgd * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33a0a74294Scgd * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34a0a74294Scgd * SUCH DAMAGE. 35a0a74294Scgd * 36f2125498Scgd * @(#)kernel.h 8.3 (Berkeley) 1/21/94 37a0a74294Scgd */ 38a0a74294Scgd 39d39928a2Sperry #ifndef _SYS_KERNEL_H_ 40d39928a2Sperry #define _SYS_KERNEL_H_ 41d39928a2Sperry 42c7d852f6Schristos #if defined(_KERNEL) || defined(_STANDALONE) 437eb45c2cSchristos #include <sys/param.h> 447eb45c2cSchristos 45a0a74294Scgd /* Global variables for the kernel. */ 46a0a74294Scgd 47a0a74294Scgd extern long hostid; 48a0a74294Scgd extern char hostname[MAXHOSTNAMELEN]; 49a0a74294Scgd extern int hostnamelen; 50a0a74294Scgd extern char domainname[MAXHOSTNAMELEN]; 51a0a74294Scgd extern int domainnamelen; 52a0a74294Scgd 53b89a3425Sperry extern int rtc_offset; /* offset of rtc from UTC in minutes */ 54a0a74294Scgd 5511cae425Sthorpej extern int cold; /* still working on startup */ 56*27ea14ccSriastradh extern int start_init_exec; /* init(8) may have started */ 5741065c56Sthorpej extern int shutting_down; /* system is shutting down */ 58a0a74294Scgd extern int tick; /* usec per tick (1000000 / hz) */ 59de4337abSkardel extern int tickadj; /* "standard" clock skew, us./tick */ 60a0a74294Scgd extern int hz; /* system clock's frequency */ 61a0a74294Scgd extern int stathz; /* statistics clock's frequency */ 62a0a74294Scgd extern int profhz; /* profiling clock's frequency */ 63d39928a2Sperry 640b956d0bSbriggs extern int profsrc; /* profiling source */ 6543393cccSmatt extern int psratio; /* ratio: prof / stat */ 6692767d7dSchristos 67b2f81755Smaxv /* Accessors. */ 68b2f81755Smaxv 69b2f81755Smaxv int getticks(void); 70b2f81755Smaxv 710b956d0bSbriggs #define PROFSRC_CLOCK 0 7292767d7dSchristos 730b956d0bSbriggs #endif 740b956d0bSbriggs 75d39928a2Sperry #endif /* _SYS_KERNEL_H_ */ 76