Moving all NetBSD headers back where they belong.

Moving include/sys NetBSD headers to /sys/sys
Moving include/arch/*/ NetBSD headers to /sys/arch/*/include

Change-Id: Ia1a45d4e83ab806c84093ec2b61bdbea9bed65a0
This commit is contained in:
2013-01-14 11:36:25 +01:00
parent be89757ef5
commit f6aac1c3b5
222 changed files with 4556 additions and 5262 deletions
+15
View File
@@ -0,0 +1,15 @@
# $NetBSD: Makefile,v 1.17 2012/08/29 17:13:22 drochner Exp $
INCSDIR=/usr/include/x86
INCS= \
bootinfo.h \
cpu.h \
float.h \
ieee.h ieeefp.h \
math.h mutex.h \
pio.h \
rwlock.h \
.include <bsd.kinc.mk>
+27
View File
@@ -0,0 +1,27 @@
/* $NetBSD: float.h,v 1.5 2003/10/23 23:26:06 kleink Exp $ */
#ifndef _X86_FLOAT_H_
#define _X86_FLOAT_H_
#define LDBL_MANT_DIG 64
#define LDBL_EPSILON 1.0842021724855044340E-19L
#define LDBL_DIG 18
#define LDBL_MIN_EXP (-16381)
#define LDBL_MIN 3.3621031431120935063E-4932L
#define LDBL_MIN_10_EXP (-4931)
#define LDBL_MAX_EXP 16384
#define LDBL_MAX 1.1897314953572317650E+4932L
#define LDBL_MAX_10_EXP 4932
#include <sys/float_ieee754.h>
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE) || \
((__STDC_VERSION__ - 0) >= 199901L) || \
((_POSIX_C_SOURCE - 0) >= 200112L) || \
((_XOPEN_SOURCE - 0) >= 600) || \
defined(_ISOC99_SOURCE) || defined(_NETBSD_SOURCE)
#define DECIMAL_DIG 21
#endif /* !defined(_ANSI_SOURCE) && ... */
#endif /* _X86_FLOAT_H_ */
+117
View File
@@ -0,0 +1,117 @@
/* $NetBSD: ieee.h,v 1.11 2010/09/15 16:11:28 christos Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This software was developed by the Computer Systems Engineering group
* at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
* contributed to Berkeley.
*
* All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Lawrence Berkeley Laboratory.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#)ieee.h 8.1 (Berkeley) 6/11/93
*/
/*
* ieee.h defines the machine-dependent layout of the machine's IEEE
* floating point. It does *not* define (yet?) any of the rounding
* mode bits, exceptions, and so forth.
*/
#include <sys/ieee754.h>
#define EXT_EXPBITS 15
#define EXT_FRACHBITS 32
#define EXT_FRACLBITS 32
#define EXT_FRACBITS (EXT_FRACLBITS + EXT_FRACHBITS)
#define EXT_TO_ARRAY32(u, a) do { \
(a)[0] = (uint32_t)(u).extu_ext.ext_fracl; \
(a)[1] = (uint32_t)(u).extu_ext.ext_frach; \
} while(/*CONSTCOND*/0)
/*
* struct ieee_ext is the raw storage layout of the 80-bit
* extended-precision type as implemented by the FPU. Per the
* respective ABI specifications, it is followed by a tail padding of
*
* amd64: 48 bits,
* i386: 16 bits.
*/
struct ieee_ext {
u_int ext_fracl:EXT_FRACLBITS;
u_int ext_frach:EXT_FRACHBITS;
#if 0
u_int ext_int:1;
#endif
u_int ext_exp:EXT_EXPBITS;
u_int ext_sign:1;
};
/*
* Floats whose exponent is in [1..INFNAN) (of whatever type) are
* `normal'. Floats whose exponent is INFNAN are either Inf or NaN.
* Floats whose exponent is zero are either zero (iff all fraction
* bits are zero) or subnormal values.
*
* A NaN is a `signalling NaN' if its QUIETNAN bit is clear in its
* high fraction; if the bit is set, it is a `quiet NaN'.
*/
#define EXT_EXP_INFNAN 0x7fff
#define EXT_EXP_INF 0x7fff
#define EXT_EXP_NAN 0x7fff
#if 0
#define SNG_QUIETNAN (1 << 22)
#define DBL_QUIETNAN (1 << 19)
#define EXT_QUIETNAN (1 << 30)
#endif
/*
* Exponent biases.
*/
#define EXT_EXP_BIAS 16383
/*
* Convenience data structures.
*/
union ieee_ext_u {
long double extu_ld;
struct ieee_ext extu_ext;
};
#define extu_exp extu_ext.ext_exp
#define extu_sign extu_ext.ext_sign
#define extu_fracl extu_ext.ext_fracl
#define extu_frach extu_ext.ext_frach
#define LDBL_NBIT 0x80000000
#define mask_nbit_l(u) ((u).extu_frach &= ~LDBL_NBIT)
+29
View File
@@ -0,0 +1,29 @@
/* $NetBSD: ieeefp.h,v 1.3 2010/07/31 21:47:54 joerg Exp $ */
/*
* Written by J.T. Conklin, Apr 6, 1995
* Public domain.
*/
#ifndef _X86_IEEEFP_H_
#define _X86_IEEEFP_H_
#include <sys/featuretest.h>
#include <machine/fenv.h>
typedef int fp_except;
#define FP_X_INV FE_INVALID /* invalid operation exception */
#define FP_X_DNML FE_DENORMAL /* denormalization exception */
#define FP_X_DZ FE_DIVBYZERO /* divide-by-zero exception */
#define FP_X_OFL FE_OVERFLOW /* overflow exception */
#define FP_X_UFL FE_UNDERFLOW /* underflow exception */
#define FP_X_IMP FE_INEXACT /* imprecise (loss of precision) */
typedef enum {
FP_RN=FE_TONEAREST, /* round to nearest representable number */
FP_RM=FE_DOWNWARD, /* round toward negative infinity */
FP_RP=FE_UPWARD, /* round toward positive infinity */
FP_RZ=FE_TOWARDZERO /* round to zero (truncate) */
} fp_rnd;
#endif /* _X86_IEEEFP_H_ */
+4
View File
@@ -0,0 +1,4 @@
/* $NetBSD: math.h,v 1.2 2003/10/28 00:55:28 kleink Exp $ */
#define __HAVE_LONG_DOUBLE
#define __HAVE_NANF
+80
View File
@@ -0,0 +1,80 @@
/* $NetBSD: mutex.h,v 1.6 2009/04/24 17:49:51 ad Exp $ */
/*-
* Copyright (c) 2002, 2006, 2009 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Jason R. Thorpe and Andrew Doran.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _X86_MUTEX_H_
#define _X86_MUTEX_H_
struct kmutex {
union {
volatile uintptr_t mtxa_owner;
#ifdef __MUTEX_PRIVATE
struct {
volatile uint8_t mtxs_dummy;
ipl_cookie_t mtxs_ipl;
__cpu_simple_lock_t mtxs_lock;
volatile uint8_t mtxs_unused;
} s;
#endif
} u;
};
#ifdef __MUTEX_PRIVATE
#define mtx_owner u.mtxa_owner
#define mtx_ipl u.s.mtxs_ipl
#define mtx_lock u.s.mtxs_lock
#define __HAVE_MUTEX_STUBS 1
#define __HAVE_SPIN_MUTEX_STUBS 1
#define __HAVE_SIMPLE_MUTEXES 1
/*
* MUTEX_RECEIVE: technically, no memory barrier is required
* as 'ret' implies a load fence. However we need this to
* handle a bug with some Opteron revisions. See patch.c,
* lock_stubs.S.
*/
#define MUTEX_RECEIVE(mtx) membar_consumer()
/*
* MUTEX_GIVE: no memory barrier required, as _lock_cas() will take care of it.
*/
#define MUTEX_GIVE(mtx) /* nothing */
#define MUTEX_CAS(p, o, n) \
(_atomic_cas_ulong((volatile unsigned long *)(p), (o), (n)) == (o))
unsigned long _atomic_cas_ulong(volatile unsigned long *,
unsigned long, unsigned long);
#endif /* __MUTEX_PRIVATE */
#endif /* _X86_MUTEX_H_ */