FreeBSD Bugzilla – Attachment 254509 Details for
Bug 280936
cannot build world with ASAN enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
reproducer source from llvm 19
getcontextx-3afcf2.c (text/plain), 318.98 KB, created by
Mark Johnston
on 2024-10-25 13:11:24 UTC
(
hide
)
Description:
reproducer source from llvm 19
Filename:
MIME Type:
Creator:
Mark Johnston
Created:
2024-10-25 13:11:24 UTC
Size:
318.98 KB
patch
obsolete
># 1 "<built-in>" ># 1 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" >/*- > * SPDX-License-Identifier: BSD-2-Clause > * > * Copyright (c) 2011 Konstantin Belousov <kib@FreeBSD.org> > * All rights reserved. > * > * 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 AUTHOR ``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 AUTHOR 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. > */ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* types.h expanded by -frewrite-includes */ >#include <sys/types.h> >#else /* types.h expanded by -frewrite-includes */ ># 29 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1991, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * 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. > */ > >#ifndef _SYS_TYPES_H_ >#define _SYS_TYPES_H_ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cdefs.h expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#else /* cdefs.h expanded by -frewrite-includes */ ># 40 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1991, 1993 > * The Regents of the University of California. All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * Berkeley Software Design, Inc. > * > * 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. > */ > >#ifndef _SYS_CDEFS_H_ >#define _SYS_CDEFS_H_ > >#if 0 /* disabled by -frewrite-includes */ >#if defined(_KERNEL) && defined(_STANDALONE) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 39 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#error "_KERNEL and _STANDALONE are mutually exclusive" >#endif ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Provide clang-compatible testing macros. All supported versions of gcc (10+) > * provide all of these except has_feature and has_extension which are new in > * gcc 14. Keep the older ifndefs, though, for non-gcc compilers that may lack > * them like tcc and pcc. > */ >#ifndef __has_attribute >#define __has_attribute(x) 0 >#endif ># 51 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_extension >#define __has_extension __has_feature >#endif ># 54 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_feature >#define __has_feature(x) 0 >#endif ># 57 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_include >#define __has_include(x) 0 >#endif ># 60 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __has_builtin >#define __has_builtin(x) 0 >#endif ># 63 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 65 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __BEGIN_DECLS extern "C" { >#define __END_DECLS } >#else ># 68 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __BEGIN_DECLS >#define __END_DECLS >#endif ># 71 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * This code has been put in place to help reduce the addition of > * compiler specific defines in FreeBSD code. It helps to aid in > * having a compiler-agnostic source tree. > */ > >/* > * Macro to test if we're using a specific version of gcc or later. > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__GNUC__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 82 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __GNUC_PREREQ__(ma, mi) \ > (__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi)) >#else ># 85 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __GNUC_PREREQ__(ma, mi) 0 >#endif ># 87 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__GNUC__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 89 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler memory barriers, specific to gcc and clang. > */ >#define __compiler_membar() __asm __volatile(" " : : : "memory") > >#define __CC_SUPPORTS___INLINE 1 >#define __CC_SUPPORTS_SYMVER 1 > >#endif /* __GNUC__ */ ># 99 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * TinyC pretends to be gcc 9.3. This is generally good enough to support > * everything FreeBSD... except for the .symver assembler directive. > */ >#ifdef __TINYC__ >#undef __CC_SUPPORTS_SYMVER >#endif ># 107 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * The __CONCAT macro is used to concatenate parts of symbol names, e.g. > * with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo. > * The __CONCAT macro is a bit tricky to use if it must work in non-ANSI > * mode -- there must be no spaces between its arguments, and for nested > * __CONCAT's, all the __CONCAT's must be at the left. __CONCAT can also > * concatenate double-quoted strings produced by the __STRING macro, but > * this only works with ANSI C. > * > * __XSTRING is like __STRING, but it expands any macros in its argument > * first. It is only available with ANSI C. > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__STDC__) || defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 121 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __P(protos) protos /* full-blown ANSI C */ >#define __CONCAT1(x,y) x ## y >#define __CONCAT(x,y) __CONCAT1(x,y) >#define __STRING(x) #x /* stringify without expanding x */ >#define __XSTRING(x) __STRING(x) /* expand x, then stringify */ > >#define __volatile volatile >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 129 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __inline inline /* convert to C++ keyword */ >#else ># 131 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if !(defined(__CC_SUPPORTS___INLINE)) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 132 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __inline /* delete GCC keyword */ >#endif /* ! __CC_SUPPORTS___INLINE */ ># 134 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* !__cplusplus */ ># 135 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#else /* !(__STDC__ || __cplusplus) */ ># 137 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __P(protos) () /* traditional C preprocessor */ >#define __CONCAT(x,y) x/**/y >#define __STRING(x) "x" >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__CC_SUPPORTS___INLINE) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 141 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >/* Just delete these in a K&R environment */ >#define __inline >#define __volatile >#endif /* !__CC_SUPPORTS___INLINE */ ># 145 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* !(__STDC__ || __cplusplus) */ ># 146 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Compiler-dependent macros to help declare dead (non-returning) and pure (no > * side effects) functions, and unused variables. These attributes are supported > * by all current compilers, even pcc. > */ >#define __weak_symbol __attribute__((__weak__)) >#define __dead2 __attribute__((__noreturn__)) >#define __pure2 __attribute__((__const__)) >#define __unused __attribute__((__unused__)) >#define __used __attribute__((__used__)) >#define __deprecated __attribute__((__deprecated__)) >#define __packed __attribute__((__packed__)) >#define __aligned(x) __attribute__((__aligned__(x))) >#define __section(x) __attribute__((__section__(x))) >#define __writeonly __unused >#define __alloc_size(x) __attribute__((__alloc_size__(x))) >#define __alloc_size2(n, x) __attribute__((__alloc_size__(n, x))) >#define __alloc_align(x) __attribute__((__alloc_align__(x))) > >/* > * Keywords added in C11. > */ > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 171 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if !__has_extension(c_alignas) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 173 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_alignas) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 175 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Alignas(x) alignas(x) >#else ># 177 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >/* XXX: Only emulates _Alignas(constant-expression); not _Alignas(type-name). */ >#define _Alignas(x) __aligned(x) >#endif ># 180 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 181 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 183 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Alignof(x) alignof(x) >#else ># 185 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Alignof(x) __alignof(x) >#endif ># 187 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 189 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Noreturn [[noreturn]] >#else ># 191 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Noreturn __dead2 >#endif ># 193 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if !__has_extension(c_static_assert) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 195 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_static_assert) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 197 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Static_assert(x, y) static_assert(x, y) >#endif ># 199 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 200 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if !__has_extension(c_thread_local) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 202 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if (defined(__cplusplus) && __cplusplus >= 201103L) || \ > __has_extension(cxx_thread_local) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 204 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Thread_local thread_local >#else ># 206 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Thread_local __thread >#endif ># 208 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 209 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#endif /* __STDC_VERSION__ || __STDC_VERSION__ < 201112L */ ># 211 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Emulation of C11 _Generic(). Unlike the previously defined C11 > * keywords, it is not possible to implement this using exactly the same > * syntax. Therefore implement something similar under the name > * __generic(). Unlike _Generic(), this macro can only distinguish > * between a single type, so it requires nested invocations to > * distinguish multiple cases. > * > * Note that the comma operator is used to force expr to decay in > * order to match _Generic(). > */ > >#if 0 /* disabled by -frewrite-includes */ >#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \ > __has_extension(c_generic_selections) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 226 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __generic(expr, t, yes, no) \ > _Generic(expr, t: yes, default: no) >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif !defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 229 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __generic(expr, t, yes, no) \ > __builtin_choose_expr(__builtin_types_compatible_p( \ > __typeof(((void)0, (expr))), t), yes, no) >#endif ># 233 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * C99 Static array indices in function parameter declarations. Syntax such as: > * void bar(int myArray[static 10]); > * is allowed in C99 but not in C++. Define __min_size appropriately so > * headers using it can be compiled in either language. Use like this: > * void bar(int myArray[__min_size(10)]); > */ >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__cplusplus) && \ > (!defined(__STDC_VERSION__) || (__STDC_VERSION__ >= 199901)) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 243 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __min_size(x) static (x) >#else ># 245 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __min_size(x) (x) >#endif ># 247 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#define __malloc_like __attribute__((__malloc__)) >#define __pure __attribute__((__pure__)) > >#define __always_inline __inline __attribute__((__always_inline__)) >#define __noinline __attribute__ ((__noinline__)) >#define __fastcall __attribute__((__fastcall__)) >#define __result_use_check __attribute__((__warn_unused_result__)) >#ifdef __clang__ >/* > * clang and gcc have different semantics for __warn_unused_result__: the latter > * does not permit the use of a void cast to suppress the warning. Use > * __result_use_or_ignore_check in places where a void cast is acceptable. > * This can be implemented by [[nodiscard]] from C23. > */ >#define __result_use_or_ignore_check __result_use_check >#else ># 264 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __result_use_or_ignore_check >#endif /* !__clang__ */ ># 266 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#define __returns_twice __attribute__((__returns_twice__)) > >#define __unreachable() __builtin_unreachable() > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 272 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __LONG_LONG_SUPPORTED >#endif ># 274 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* C++11 exposes a load of C99 stuff */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 277 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __LONG_LONG_SUPPORTED >#ifndef __STDC_LIMIT_MACROS >#define __STDC_LIMIT_MACROS >#endif ># 281 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#ifndef __STDC_CONSTANT_MACROS >#define __STDC_CONSTANT_MACROS >#endif ># 284 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 285 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * noexcept keyword added in C++11. > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 290 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __noexcept noexcept >#define __noexcept_if(__c) noexcept(__c) >#else ># 293 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __noexcept >#define __noexcept_if(__c) >#endif ># 296 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * We use `__restrict' as a way to define the `restrict' type qualifier > * without disturbing older software that is unaware of C99 keywords. > * GCC also provides `__restrict' as an extension to support C99-style > * restricted pointers in other language modes. > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 304 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __restrict restrict >#endif ># 306 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * All modern compilers have explicit branch prediction so that the CPU back-end > * can hint to the processor and also so that code blocks can be reordered such > * that the predicted path sees a more linear flow, thus improving cache > * behavior, etc. Use sparingly, except in performance critical code where > * they make things measurably faster. > */ >#define __predict_true(exp) __builtin_expect((exp), 1) >#define __predict_false(exp) __builtin_expect((exp), 0) > >#define __null_sentinel __attribute__((__sentinel__)) >#define __exported __attribute__((__visibility__("default"))) >#define __hidden __attribute__((__visibility__("hidden"))) > >/* > * We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h> > * require it. > */ >#define __offsetof(type, field) __builtin_offsetof(type, field) >#define __rangeof(type, start, end) \ > (__offsetof(type, end) - __offsetof(type, start)) > >/* > * Given the pointer x to the member m of the struct s, return > * a pointer to the containing structure. When using GCC, we first > * assign pointer x to a local variable, to check that its type is > * compatible with member m. > */ >#define __containerof(x, s, m) ({ \ > const volatile __typeof(((s *)0)->m) *__x = (x); \ > __DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\ >}) > >/* > * Compiler-dependent macros to declare that functions take printf-like > * or scanf-like arguments. > */ >#define __printflike(fmtarg, firstvararg) \ > __attribute__((__format__ (__printf__, fmtarg, firstvararg))) >#define __scanflike(fmtarg, firstvararg) \ > __attribute__((__format__ (__scanf__, fmtarg, firstvararg))) >#define __format_arg(fmtarg) __attribute__((__format_arg__ (fmtarg))) >#define __strfmonlike(fmtarg, firstvararg) \ > __attribute__((__format__ (__strfmon__, fmtarg, firstvararg))) >#define __strftimelike(fmtarg, firstvararg) \ > __attribute__((__format__ (__strftime__, fmtarg, firstvararg))) > >/* > * Like __printflike, but allows fmtarg to be NULL. FreeBSD invented 'printf0' > * for this because older versions of gcc issued warnings for NULL first args. > * Clang has always had printf and printf0 as aliases. gcc 11.0 now follows > * clang. So now this is an alias for __printflike, or nothing. In the future > * _Nullable or _Nonnull will replace this. > * XXX Except that doesn't work, so for now revert to printf0 for clang and > * the FreeBSD gcc until I can work this out. > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__clang__) || (defined(__GNUC__) && defined (__FreeBSD_cc_version)) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 364 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __printf0like(fmtarg, firstvararg) \ > __attribute__((__format__ (__printf0__, fmtarg, firstvararg))) >#else ># 367 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __printf0like(fmtarg, firstvararg) >#endif ># 369 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#define __strong_reference(sym,aliassym) \ > extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym))) >#ifdef __STDC__ >#define __weak_reference(sym,alias) \ > __asm__(".weak " #alias); \ > __asm__(".equ " #alias ", " #sym) >#define __warn_references(sym,msg) \ > __asm__(".section .gnu.warning." #sym); \ > __asm__(".asciz \"" msg "\""); \ > __asm__(".previous") >#ifdef __CC_SUPPORTS_SYMVER >#define __sym_compat(sym,impl,verid) \ > __asm__(".symver " #impl ", " #sym "@" #verid) >#define __sym_default(sym,impl,verid) \ > __asm__(".symver " #impl ", " #sym "@@@" #verid) >#endif ># 386 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#else ># 387 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __weak_reference(sym,alias) \ > __asm__(".weak alias"); \ > __asm__(".equ alias, sym") >#define __warn_references(sym,msg) \ > __asm__(".section .gnu.warning.sym"); \ > __asm__(".asciz \"msg\""); \ > __asm__(".previous") >#ifdef __CC_SUPPORTS_SYMVER >#define __sym_compat(sym,impl,verid) \ > __asm__(".symver impl, sym@verid") >#define __sym_default(impl,sym,verid) \ > __asm__(".symver impl, sym@@@verid") >#endif ># 400 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* __STDC__ */ ># 401 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#define __GLOBL(sym) __asm__(".globl " __XSTRING(sym)) >#define __WEAK(sym) __asm__(".weak " __XSTRING(sym)) > >#define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"") > >/* > * Embed the rcs id of a source file in the resulting library. Note that in > * more recent ELF binutils, we use .ident allowing the ID to be stripped. > * Usage: > */ >#ifndef __FBSDID >#if 0 /* disabled by -frewrite-includes */ >#if !defined(STRIP_FBSDID) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 414 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) >#else ># 416 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __FBSDID(s) struct __hack >#endif ># 418 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 419 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __RCSID >#ifndef NO__RCSID >#define __RCSID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s) >#else ># 424 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __RCSID(s) struct __hack >#endif ># 426 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 427 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __RCSID_SOURCE >#ifndef NO__RCSID_SOURCE >#define __RCSID_SOURCE(s) __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s) >#else ># 432 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __RCSID_SOURCE(s) struct __hack >#endif ># 434 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 435 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __SCCSID >#ifndef NO__SCCSID >#define __SCCSID(s) __IDSTRING(__CONCAT(__sccsid_,__LINE__),s) >#else ># 440 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __SCCSID(s) struct __hack >#endif ># 442 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 443 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __COPYRIGHT >#ifndef NO__COPYRIGHT >#define __COPYRIGHT(s) __IDSTRING(__CONCAT(__copyright_,__LINE__),s) >#else ># 448 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __COPYRIGHT(s) struct __hack >#endif ># 450 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 451 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DECONST >#define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var)) >#endif ># 455 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DEVOLATILE >#define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var)) >#endif ># 459 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#ifndef __DEQUALIFY >#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var)) >#endif ># 463 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(_STANDALONE) && !defined(_KERNEL) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 465 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __RENAME(x) __asm(__STRING(x)) >#else /* _STANDALONE || _KERNEL */ ># 467 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __RENAME(x) no renaming in kernel/standalone environment >#endif ># 469 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/*- > * The following definitions are an extension of the behavior originally > * implemented in <sys/_posix.h>, but with a different level of granularity. > * POSIX.1 requires that the macros we test be defined before any standard > * header file is included. > * > * Here's a quick run-down of the versions (and some informal names) > * defined(_POSIX_SOURCE) 1003.1-1988 > * encoded as 198808 below > * _POSIX_C_SOURCE == 1 1003.1-1990 > * encoded as 199009 below > * _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option > * encoded as 199209 below > * _POSIX_C_SOURCE == 199309 1003.1b-1993 > * (1003.1 Issue 4, Single Unix Spec v1, Unix 93) > * _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995, > * and the omnibus ISO/IEC 9945-1: 1996 > * (1003.1 Issue 5, Single Unix Spec v2, Unix 95) > * _POSIX_C_SOURCE == 200112 1003.1-2001 (1003.1 Issue 6, Unix 03) > * with _XOPEN_SOURCE=600 > * _POSIX_C_SOURCE == 200809 1003.1-2008 (1003.1 Issue 7) > * IEEE Std 1003.1-2017 (Rev of 1003.1-2008) is > * 1003.1-2008 with two TCs applied and > * _XOPEN_SOURCE=700 > * _POSIX_C_SOURCE == 202405 1003.1-2004 (1003.1 Issue 8), IEEE Std 1003.1-2024 > * with _XOPEN_SOURCE=800 > * > * In addition, the X/Open Portability Guide, which is now the Single UNIX > * Specification, defines a feature-test macro which indicates the version of > * that specification, and which subsumes _POSIX_C_SOURCE. > * > * Our macros begin with two underscores to avoid namespace screwage. > */ > >/* Deal with IEEE Std. 1003.1-1990, in which _POSIX_C_SOURCE == 1. */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 506 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */ >#define _POSIX_C_SOURCE 199009 >#endif ># 509 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 512 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 199209 >#endif ># 515 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* Deal with various X/Open Portability Guides and Single UNIX Spec. */ >#ifdef _XOPEN_SOURCE >#if 0 /* disabled by -frewrite-includes */ >#if _XOPEN_SOURCE - 0 >= 700 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 519 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __XSI_VISIBLE 700 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 200809 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _XOPEN_SOURCE - 0 >= 600 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 523 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __XSI_VISIBLE 600 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 200112 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _XOPEN_SOURCE - 0 >= 500 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 527 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __XSI_VISIBLE 500 >#undef _POSIX_C_SOURCE >#define _POSIX_C_SOURCE 199506 >#endif ># 531 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 532 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Deal with all versions of POSIX. The ordering relative to the tests above is > * important. > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 538 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define _POSIX_C_SOURCE 198808 >#endif ># 540 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#ifdef _POSIX_C_SOURCE >#if 0 /* disabled by -frewrite-includes */ >#if _POSIX_C_SOURCE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 542 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 200809 >#define __ISO_C_VISIBLE 1999 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _POSIX_C_SOURCE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 545 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 200112 >#define __ISO_C_VISIBLE 1999 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _POSIX_C_SOURCE >= 199506 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 548 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199506 >#define __ISO_C_VISIBLE 1990 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _POSIX_C_SOURCE >= 199309 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 551 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199309 >#define __ISO_C_VISIBLE 1990 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _POSIX_C_SOURCE >= 199209 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 554 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199209 >#define __ISO_C_VISIBLE 1990 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _POSIX_C_SOURCE >= 199009 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 557 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 199009 >#define __ISO_C_VISIBLE 1990 >#else ># 560 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 198808 >#define __ISO_C_VISIBLE 0 >#endif /* _POSIX_C_SOURCE */ ># 563 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >/* > * Both glibc and OpenBSD enable c11 features when _ISOC11_SOURCE is defined, or > * when compiling with -stdc=c11. A strict reading of the standard would suggest > * doing it only for the former. However, a strict reading also requires C99 > * mode only, so building with C11 is already undefined. Follow glibc's and > * OpenBSD's lead for this non-standard configuration for maximum compatibility. > */ >#if 0 /* disabled by -frewrite-includes */ >#if _ISOC11_SOURCE || (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 571 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#undef __ISO_C_VISIBLE >#define __ISO_C_VISIBLE 2011 >#endif ># 574 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#else ># 575 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >/*- > * Deal with _ANSI_SOURCE: > * If it is defined, and no other compilation environment is explicitly > * requested, then define our internal feature-test macros to zero. This > * makes no difference to the preprocessor (undefined symbols in preprocessing > * expressions are defined to have value zero), but makes it more convenient for > * a test program to print out the values. > * > * If a program mistakenly defines _ANSI_SOURCE and some other macro such as > * _POSIX_C_SOURCE, we will assume that it wants the broader compilation > * environment (and in fact we will never get here). > */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(_ANSI_SOURCE) /* Hide almost everything. */ >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 588 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 1990 >#define __EXT1_VISIBLE 0 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */ >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 594 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 1999 >#define __EXT1_VISIBLE 0 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */ >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 600 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 0 >#define __XSI_VISIBLE 0 >#define __BSD_VISIBLE 0 >#define __ISO_C_VISIBLE 2011 >#define __EXT1_VISIBLE 0 >#else /* Default environment: show everything. */ ># 606 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __POSIX_VISIBLE 200809 >#define __XSI_VISIBLE 700 >#define __BSD_VISIBLE 1 >#define __ISO_C_VISIBLE 2011 >#define __EXT1_VISIBLE 1 >#endif ># 612 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif ># 613 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* User override __EXT1_VISIBLE */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__STDC_WANT_LIB_EXT1__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 616 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#undef __EXT1_VISIBLE >#if 0 /* disabled by -frewrite-includes */ >#if __STDC_WANT_LIB_EXT1__ >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 618 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __EXT1_VISIBLE 1 >#else ># 620 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __EXT1_VISIBLE 0 >#endif ># 622 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* __STDC_WANT_LIB_EXT1__ */ ># 623 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Nullability qualifiers: currently only supported by Clang. > */ >#if 0 /* disabled by -frewrite-includes */ >#if !(defined(__clang__) && __has_feature(nullability)) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 628 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define _Nonnull >#define _Nullable >#define _Null_unspecified >#define __NULLABILITY_PRAGMA_PUSH >#define __NULLABILITY_PRAGMA_POP >#else ># 634 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __NULLABILITY_PRAGMA_PUSH _Pragma("clang diagnostic push") \ > _Pragma("clang diagnostic ignored \"-Wnullability-completeness\"") >#define __NULLABILITY_PRAGMA_POP _Pragma("clang diagnostic pop") >#endif ># 638 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Type Safety Checking > * > * Clang provides additional attributes to enable checking type safety > * properties that cannot be enforced by the C type system. > */ > >#if 0 /* disabled by -frewrite-includes */ >#if __has_attribute(__argument_with_type_tag__) && \ > __has_attribute(__type_tag_for_datatype__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 648 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) \ > __attribute__((__argument_with_type_tag__(arg_kind, arg_idx, type_tag_idx))) >#define __datatype_type_tag(kind, type) \ > __attribute__((__type_tag_for_datatype__(kind, type))) >#else ># 653 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __arg_type_tag(arg_kind, arg_idx, type_tag_idx) >#define __datatype_type_tag(kind, type) >#endif ># 656 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Lock annotations. > * > * Clang provides support for doing basic thread-safety tests at > * compile-time, by marking which locks will/should be held when > * entering/leaving a functions. > * > * Furthermore, it is also possible to annotate variables and structure > * members to enforce that they are only accessed when certain locks are > * held. > */ > >#if 0 /* disabled by -frewrite-includes */ >#if __has_extension(c_thread_safety_attributes) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 670 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __lock_annotate(x) __attribute__((x)) >#else ># 672 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __lock_annotate(x) >#endif ># 674 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* Structure implements a lock. */ >#define __lockable __lock_annotate(lockable) > >/* Function acquires an exclusive or shared lock. */ >#define __locks_exclusive(...) \ > __lock_annotate(exclusive_lock_function(__VA_ARGS__)) >#define __locks_shared(...) \ > __lock_annotate(shared_lock_function(__VA_ARGS__)) > >/* Function attempts to acquire an exclusive or shared lock. */ >#define __trylocks_exclusive(...) \ > __lock_annotate(exclusive_trylock_function(__VA_ARGS__)) >#define __trylocks_shared(...) \ > __lock_annotate(shared_trylock_function(__VA_ARGS__)) > >/* Function releases a lock. */ >#define __unlocks(...) __lock_annotate(unlock_function(__VA_ARGS__)) > >/* Function asserts that an exclusive or shared lock is held. */ >#define __asserts_exclusive(...) \ > __lock_annotate(assert_exclusive_lock(__VA_ARGS__)) >#define __asserts_shared(...) \ > __lock_annotate(assert_shared_lock(__VA_ARGS__)) > >/* Function requires that an exclusive or shared lock is or is not held. */ >#define __requires_exclusive(...) \ > __lock_annotate(exclusive_locks_required(__VA_ARGS__)) >#define __requires_shared(...) \ > __lock_annotate(shared_locks_required(__VA_ARGS__)) >#define __requires_unlocked(...) \ > __lock_annotate(locks_excluded(__VA_ARGS__)) > >/* Function should not be analyzed. */ >#define __no_lock_analysis __lock_annotate(no_thread_safety_analysis) > >/* > * Function or variable should not be sanitized, e.g., by AddressSanitizer. > * GCC has the nosanitize attribute, but as a function attribute only, and > * warns on use as a variable attribute. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __has_feature(address_sanitizer) && defined(__clang__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 716 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#ifdef _KERNEL >#define __nosanitizeaddress __attribute__((no_sanitize("kernel-address"))) >#else ># 719 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __nosanitizeaddress __attribute__((no_sanitize("address"))) >#endif ># 721 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#else ># 722 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __nosanitizeaddress >#endif ># 724 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __has_feature(coverage_sanitizer) && defined(__clang__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 725 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __nosanitizecoverage __attribute__((no_sanitize("coverage"))) >#else ># 727 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __nosanitizecoverage >#endif ># 729 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __has_feature(memory_sanitizer) && defined(__clang__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 730 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#ifdef _KERNEL >#define __nosanitizememory __attribute__((no_sanitize("kernel-memory"))) >#else ># 733 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __nosanitizememory __attribute__((no_sanitize("memory"))) >#endif ># 735 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#else ># 736 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __nosanitizememory >#endif ># 738 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __has_feature(thread_sanitizer) && defined(__clang__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 739 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __nosanitizethread __attribute__((no_sanitize("thread"))) >#else ># 741 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __nosanitizethread >#endif ># 743 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* > * Make it possible to opt out of stack smashing protection. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __has_attribute(no_stack_protector) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 748 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __nostackprotector __attribute__((no_stack_protector)) >#else ># 750 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __nostackprotector \ > __attribute__((__optimize__("-fno-stack-protector"))) >#endif ># 753 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >/* Guard variables and structure members by lock. */ >#define __guarded_by(x) __lock_annotate(guarded_by(x)) >#define __pt_guarded_by(x) __lock_annotate(pt_guarded_by(x)) > >/* Alignment builtins for better type checking and improved code generation. */ >/* Provide fallback versions for other compilers (GCC/Clang < 10): */ >#if 0 /* disabled by -frewrite-includes */ >#if !__has_builtin(__builtin_is_aligned) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 761 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __builtin_is_aligned(x, align) \ > (((__uintptr_t)(x) & ((align) - 1)) == 0) >#endif ># 764 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if !__has_builtin(__builtin_align_up) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 765 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __builtin_align_up(x, align) \ > ((__typeof__(x))(((__uintptr_t)(x)+((align)-1))&(~((align)-1)))) >#endif ># 768 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if !__has_builtin(__builtin_align_down) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 769 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#define __builtin_align_down(x, align) \ > ((__typeof__(x))((x)&(~((align)-1)))) >#endif ># 772 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 > >#define __align_up(x, y) __builtin_align_up(x, y) >#define __align_down(x, y) __builtin_align_down(x, y) >#define __is_aligned(x, y) __builtin_is_aligned(x, y) > >#endif /* !_SYS_CDEFS_H_ */ ># 778 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/cdefs.h" 3 4 >#endif /* cdefs.h expanded by -frewrite-includes */ ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 2 3 4 > >/* Machine type dependent parameters. */ >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* endian.h expanded by -frewrite-includes */ >#include <machine/endian.h> >#else /* endian.h expanded by -frewrite-includes */ ># 43 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/endian.h" 1 3 4 >/*- > * This file is in the public domain. > */ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* endian.h expanded by -frewrite-includes */ >#include <x86/endian.h> >#else /* endian.h expanded by -frewrite-includes */ ># 5 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/endian.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/endian.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1987, 1991 Regents of the University of California. > * All rights reserved. > * > * 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. > */ > >#ifndef _MACHINE_ENDIAN_H_ >#define _MACHINE_ENDIAN_H_ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _types.h expanded by -frewrite-includes */ >#include <sys/_types.h> >#else /* _types.h expanded by -frewrite-includes */ ># 35 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/endian.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-2-Clause > * > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * 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 AUTHOR 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 AUTHOR 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 _SYS__TYPES_H_ >#define _SYS__TYPES_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 ># 33 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 > >/* > * Basic types upon which most other types are built. > * > * Note: It would be nice to simply use the compiler-provided __FOO_TYPE__ > * macros. However, in order to do so we have to check that those match the > * previous typedefs exactly (not just that they have the same size) since any > * change would be an ABI break. For example, changing `long` to `long long` > * results in different C++ name mangling. > */ >typedef signed char __int8_t; >typedef unsigned char __uint8_t; >typedef short __int16_t; >typedef unsigned short __uint16_t; >typedef int __int32_t; >typedef unsigned int __uint32_t; >#if 0 /* disabled by -frewrite-includes */ >#if __SIZEOF_LONG__ == 8 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 50 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >typedef long __int64_t; >typedef unsigned long __uint64_t; >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif __SIZEOF_LONG__ == 4 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 53 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >__extension__ >typedef long long __int64_t; >__extension__ >typedef unsigned long long __uint64_t; >#else ># 58 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >#error unsupported long size >#endif ># 60 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 > >typedef __int8_t __int_least8_t; >typedef __int16_t __int_least16_t; >typedef __int32_t __int_least32_t; >typedef __int64_t __int_least64_t; >typedef __int64_t __intmax_t; >typedef __uint8_t __uint_least8_t; >typedef __uint16_t __uint_least16_t; >typedef __uint32_t __uint_least32_t; >typedef __uint64_t __uint_least64_t; >typedef __uint64_t __uintmax_t; > >#if 0 /* disabled by -frewrite-includes */ >#if __SIZEOF_POINTER__ == 8 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 73 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >typedef __int64_t __intptr_t; >typedef __int64_t __intfptr_t; >typedef __uint64_t __uintptr_t; >typedef __uint64_t __uintfptr_t; >typedef __uint64_t __vm_offset_t; >typedef __uint64_t __vm_size_t; >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif __SIZEOF_POINTER__ == 4 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 80 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >typedef __int32_t __intptr_t; >typedef __int32_t __intfptr_t; >typedef __uint32_t __uintptr_t; >typedef __uint32_t __uintfptr_t; >typedef __uint32_t __vm_offset_t; >typedef __uint32_t __vm_size_t; >#else ># 87 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >#error unsupported pointer size >#endif ># 89 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __SIZEOF_SIZE_T__ == 8 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 91 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >typedef __uint64_t __size_t; /* sizeof() */ >typedef __int64_t __ssize_t; /* byte count or error */ >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif __SIZEOF_SIZE_T__ == 4 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 94 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >typedef __uint32_t __size_t; /* sizeof() */ >typedef __int32_t __ssize_t; /* byte count or error */ >#else ># 97 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >#error unsupported size_t size >#endif ># 99 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __SIZEOF_PTRDIFF_T__ == 8 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 101 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >typedef __int64_t __ptrdiff_t; /* ptr1 - ptr2 */ >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif __SIZEOF_PTRDIFF_T__ == 4 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 103 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */ >#else ># 105 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >#error unsupported ptrdiff_t size >#endif ># 107 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 > >/* > * Target-dependent type definitions. > */ >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _types.h expanded by -frewrite-includes */ >#include <machine/_types.h> >#else /* _types.h expanded by -frewrite-includes */ ># 111 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/_types.h" 1 3 4 >/*- > * This file is in the public domain. > */ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _types.h expanded by -frewrite-includes */ >#include <x86/_types.h> >#else /* _types.h expanded by -frewrite-includes */ ># 5 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/_types.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-4-Clause > * > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * 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. 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, Berkeley and its contributors. > * 4. 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. > */ > >#ifndef _MACHINE__TYPES_H_ >#define _MACHINE__TYPES_H_ > >#ifndef _SYS__TYPES_H_ >#error do not include this header, use sys/_types.h >#endif ># 43 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 3 4 > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _limits.h expanded by -frewrite-includes */ >#include <machine/_limits.h> >#else /* _limits.h expanded by -frewrite-includes */ ># 44 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _limits.h expanded by -frewrite-includes */ >#include <x86/_limits.h> >#else /* _limits.h expanded by -frewrite-includes */ ># 5 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/_limits.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_limits.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1988, 1993 > * The Regents of the University of California. All rights reserved. > * > * 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. > */ > >#ifndef _MACHINE__LIMITS_H_ >#define _MACHINE__LIMITS_H_ > >/* > * According to ANSI (section 2.2.4.2), the values below must be usable by > * #if preprocessing directives. Additionally, the expression must have the > * same type as would an expression that is an object of the corresponding > * type converted according to the integral promotions. The subtraction for > * INT_MIN, etc., is so the value is not unsigned; e.g., 0x80000000 is an > * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2). > */ > >#define __CHAR_BIT 8 /* number of bits in a char */ > >#define __SCHAR_MAX 0x7f /* max value for a signed char */ >#define __SCHAR_MIN (-0x7f - 1) /* min value for a signed char */ > >#define __UCHAR_MAX 0xff /* max value for an unsigned char */ > >#define __USHRT_MAX 0xffff /* max value for an unsigned short */ >#define __SHRT_MAX 0x7fff /* max value for a short */ >#define __SHRT_MIN (-0x7fff - 1) /* min value for a short */ > >#define __UINT_MAX 0xffffffff /* max value for an unsigned int */ >#define __INT_MAX 0x7fffffff /* max value for an int */ >#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */ > >#ifdef __LP64__ >#define __ULONG_MAX 0xffffffffffffffff /* max for an unsigned long */ >#define __LONG_MAX 0x7fffffffffffffff /* max for a long */ >#define __LONG_MIN (-0x7fffffffffffffff - 1) /* min for a long */ >#else ># 64 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_limits.h" 3 4 >#define __ULONG_MAX 0xffffffffUL >#define __LONG_MAX 0x7fffffffL >#define __LONG_MIN (-0x7fffffffL - 1) >#endif ># 68 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_limits.h" 3 4 > > /* max value for an unsigned long long */ >#define __ULLONG_MAX 0xffffffffffffffffULL >#define __LLONG_MAX 0x7fffffffffffffffLL /* max value for a long long */ >#define __LLONG_MIN (-0x7fffffffffffffffLL - 1) /* min for a long long */ > >#ifdef __LP64__ >#define __SSIZE_MAX __LONG_MAX /* max value for a ssize_t */ >#define __SIZE_T_MAX __ULONG_MAX /* max value for a size_t */ >#define __OFF_MAX __LONG_MAX /* max value for an off_t */ >#define __OFF_MIN __LONG_MIN /* min value for an off_t */ >/* Quads and longs are the same on the amd64. Ensure they stay in sync. */ >#define __UQUAD_MAX __ULONG_MAX /* max value for a uquad_t */ >#define __QUAD_MAX __LONG_MAX /* max value for a quad_t */ >#define __QUAD_MIN __LONG_MIN /* min value for a quad_t */ >#define __LONG_BIT 64 >#else ># 85 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_limits.h" 3 4 >#define __SSIZE_MAX __INT_MAX >#define __SIZE_T_MAX __UINT_MAX >#define __OFF_MAX __LLONG_MAX >#define __OFF_MIN __LLONG_MIN >#define __UQUAD_MAX __ULLONG_MAX >#define __QUAD_MAX __LLONG_MAX >#define __QUAD_MIN __LLONG_MIN >#define __LONG_BIT 32 >#endif ># 94 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_limits.h" 3 4 > >#define __WORD_BIT 32 > >/* Minimum signal stack size. */ >#define __MINSIGSTKSZ (512 * 4) > >#endif /* !_MACHINE__LIMITS_H_ */ ># 101 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_limits.h" 3 4 >#endif /* _limits.h expanded by -frewrite-includes */ ># 6 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/_limits.h" 2 3 4 >#endif /* _limits.h expanded by -frewrite-includes */ ># 45 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 2 3 4 > >#define __NO_STRICT_ALIGNMENT > >/* > * Standard type definitions. > */ >#ifdef __LP64__ >typedef __int32_t __clock_t; /* clock()... */ >typedef __int64_t __critical_t; >#ifndef _STANDALONE >typedef double __double_t; >typedef float __float_t; >#endif ># 58 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 3 4 >#else ># 59 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 3 4 >typedef unsigned long __clock_t; >typedef __int32_t __critical_t; >#ifndef _STANDALONE >typedef long double __double_t; >typedef long double __float_t; >#endif ># 65 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 3 4 >#endif ># 66 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 3 4 >typedef __int32_t __int_fast8_t; >typedef __int32_t __int_fast16_t; >typedef __int32_t __int_fast32_t; >typedef __int64_t __int_fast64_t; >#ifdef __LP64__ >typedef __int64_t __register_t; >typedef __int64_t __segsz_t; /* segment size (in pages) */ >typedef __int64_t __time_t; /* time()... */ >#else ># 75 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 3 4 >typedef __int32_t __register_t; >typedef __int32_t __segsz_t; >typedef __int32_t __time_t; >#endif ># 79 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __uint_fast8_t; >typedef __uint32_t __uint_fast16_t; >typedef __uint32_t __uint_fast32_t; >typedef __uint64_t __uint_fast64_t; >#ifdef __LP64__ >typedef __uint64_t __u_register_t; >typedef __uint64_t __vm_paddr_t; >#else ># 87 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 3 4 >typedef __uint32_t __u_register_t; >typedef __uint64_t __vm_paddr_t; >#endif ># 90 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 3 4 >typedef int ___wchar_t; > >#define __WCHAR_MIN __INT_MIN /* min value for a wchar_t */ >#define __WCHAR_MAX __INT_MAX /* max value for a wchar_t */ > >#endif /* !_MACHINE__TYPES_H_ */ ># 96 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/_types.h" 3 4 >#endif /* _types.h expanded by -frewrite-includes */ ># 6 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/_types.h" 2 3 4 >#endif /* _types.h expanded by -frewrite-includes */ ># 112 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 2 3 4 > >/* > * Standard type definitions. > */ >typedef __int32_t __blksize_t; /* file block size */ >typedef __int64_t __blkcnt_t; /* file block count */ >typedef __int32_t __clockid_t; /* clock_gettime()... */ >typedef __uint32_t __fflags_t; /* file flags */ >typedef __uint64_t __fsblkcnt_t; >typedef __uint64_t __fsfilcnt_t; >typedef __uint32_t __gid_t; >typedef __int64_t __id_t; /* can hold a gid_t, pid_t, or uid_t */ >typedef __uint64_t __ino_t; /* inode number */ >typedef long __key_t; /* IPC key (for Sys V IPC) */ >typedef __int32_t __lwpid_t; /* Thread ID (a.k.a. LWP) */ >typedef __uint16_t __mode_t; /* permissions */ >typedef int __accmode_t; /* access permissions */ >typedef int __nl_item; >typedef __uint64_t __nlink_t; /* link count */ >typedef __int64_t __off_t; /* file offset */ >typedef __int64_t __off64_t; /* file offset (alias) */ >typedef __int32_t __pid_t; /* process [group] */ >typedef __int64_t __sbintime_t; >typedef __int64_t __rlim_t; /* resource limit - intentionally */ > /* signed, because of legacy code */ > /* that uses -1 for RLIM_INFINITY */ >typedef __uint8_t __sa_family_t; >typedef __uint32_t __socklen_t; >typedef long __suseconds_t; /* microseconds (signed) */ >typedef struct __timer *__timer_t; /* timer_gettime()... */ >typedef struct __mq *__mqd_t; /* mq_open()... */ >typedef __uint32_t __uid_t; >typedef unsigned int __useconds_t; /* microseconds (unsigned) */ >typedef int __cpuwhich_t; /* which parameter for cpuset. */ >typedef int __cpulevel_t; /* level parameter for cpuset. */ >typedef int __cpusetid_t; /* cpuset identifier. */ >typedef __int64_t __daddr_t; /* bwrite(3), FIOBMAP2, etc */ > >/* > * Unusual type definitions. > */ >/* > * rune_t is declared to be an ``int'' instead of the more natural > * ``unsigned long'' or ``long''. Two things are happening here. It is not > * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, > * it looks like 10646 will be a 31 bit standard. This means that if your > * ints cannot hold 32 bits, you will be in trouble. The reason an int was > * chosen over a long is that the is*() and to*() routines take ints (says > * ANSI C), but they use __ct_rune_t instead of int. > * > * NOTE: rune_t is not covered by ANSI nor other standards, and should not > * be instantiated outside of lib/libc/locale. Use wchar_t. wint_t and > * rune_t must be the same type. Also, wint_t should be able to hold all > * members of the largest character set plus one extra value (WEOF), and > * must be at least 16 bits. > */ >typedef int __ct_rune_t; /* arg type for ctype funcs */ >typedef __ct_rune_t __rune_t; /* rune_t (see above) */ >typedef __ct_rune_t __wint_t; /* wint_t (see above) */ > >/* Clang already provides these types as built-ins, but only in C++ mode. */ >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__clang__) || !defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 174 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >typedef __uint_least16_t __char16_t; >typedef __uint_least32_t __char32_t; >#endif ># 177 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >/* In C++11, char16_t and char32_t are built-in types. */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(__cplusplus) && __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 179 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >#define _CHAR16_T_DECLARED >#define _CHAR32_T_DECLARED >#endif ># 182 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 > >typedef struct { > long long __max_align1 __aligned(_Alignof(long long)); >#ifndef _STANDALONE > long double __max_align2 __aligned(_Alignof(long double)); >#endif ># 188 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >} __max_align_t; > >/* Types for sys/acl.h */ >typedef __uint32_t __acl_tag_t; >typedef __uint32_t __acl_perm_t; >typedef __uint16_t __acl_entry_type_t; >typedef __uint16_t __acl_flag_t; >typedef __uint32_t __acl_type_t; >typedef __uint32_t *__acl_permset_t; >typedef __uint16_t *__acl_flagset_t; > >typedef __uint64_t __dev_t; /* device number */ > >typedef __uint32_t __fixpt_t; /* fixed point number */ > >/* > * mbstate_t is an opaque object to keep conversion state during multibyte > * stream conversions. > */ >typedef union { > char __mbstate8[128]; > __int64_t _mbstateL; /* for alignment */ >} __mbstate_t; > >typedef __uintmax_t __rman_res_t; > >/* > * Types for varargs. These are all provided by builtin types these > * days, so centralize their definition. > */ >typedef __builtin_va_list __va_list; /* internally known to gcc */ >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__GNUC_VA_LIST) && !defined(__NO_GNUC_VA_LIST) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 220 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >#define __GNUC_VA_LIST >typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/ >#endif ># 223 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 > >/* > * When the following macro is defined, the system uses 64-bit inode numbers. > * Programs can use this to avoid including <sys/param.h>, with its associated > * namespace pollution. > */ >#define __INO64 > >#endif /* !_SYS__TYPES_H_ */ ># 232 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_types.h" 3 4 >#endif /* _types.h expanded by -frewrite-includes */ ># 36 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/endian.h" 2 3 4 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _endian.h expanded by -frewrite-includes */ >#include <sys/_endian.h> >#else /* _endian.h expanded by -frewrite-includes */ ># 36 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/endian.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1987, 1991 Regents of the University of California. > * All rights reserved. > * > * 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. > */ > >#ifndef _SYS__ENDIAN_H_ >#define _SYS__ENDIAN_H_ > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(_MACHINE_ENDIAN_H_) && !defined(_BYTESWAP_H_) && !defined(_ENDIAN_H_) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 36 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 >#error "sys/_endian.h should not be included directly" >#endif ># 38 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> /* visibility macros */ >#endif /* expanded by -frewrite-includes */ ># 39 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 ># 40 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 > >/* BSD Compatibility */ >#define _BYTE_ORDER __BYTE_ORDER__ > >/* > * Definitions for byte order, according to byte significance from low > * address to high. We undefine any prior definition of them because > * powerpc compilers define _LITTLE_ENDIAN and _BIG_ENDIAN to mean > * something else. > */ >#undef _LITTLE_ENDIAN >#define _LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ /* LSB first: 1234 */ >#undef _BIG_ENDIAN >#define _BIG_ENDIAN __ORDER_BIG_ENDIAN__ /* MSB first: 4321 */ >#define _PDP_ENDIAN __ORDER_PDP_ENDIAN__ /* LSB first in word, > * MSW first in long: 3412 */ > >/* > * Define the order of 32-bit words in 64-bit words. > */ >#if 0 /* disabled by -frewrite-includes */ >#if _BYTE_ORDER == _LITTLE_ENDIAN >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 61 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 >#define _QUAD_HIGHWORD 1 >#define _QUAD_LOWWORD 0 >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _BYTE_ORDER == _BIG_ENDIAN >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 64 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 >#define _QUAD_HIGHWORD 0 >#define _QUAD_LOWWORD 1 >#else ># 67 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 >#error "Unsupported endian" >#endif ># 69 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 > >/* > * POSIX Issue 8 will require these for endian.h. Define them there and in the > * traditional BSD compilation environment. PDP_ENDIAN isn't strictly in Issue > * 8, but is allowed as implementations can define any *_ENDIAN symbol. Since > * issue 8 doesn't yet have an assigned date, use strictly greater than issue > * 7's date. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE || _POSIX_C_SOURCE > 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 78 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 >#define LITTLE_ENDIAN _LITTLE_ENDIAN >#define BIG_ENDIAN _BIG_ENDIAN >#define PDP_ENDIAN _PDP_ENDIAN >#define BYTE_ORDER _BYTE_ORDER >#endif ># 83 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 > >/* bswap primitives, based on compiler builtins */ >#define __bswap16(x) __builtin_bswap16(x) >#define __bswap32(x) __builtin_bswap32(x) >#define __bswap64(x) __builtin_bswap64(x) > >#if 0 /* disabled by -frewrite-includes */ >#if _BYTE_ORDER == _LITTLE_ENDIAN >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 90 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 >#define __ntohl(x) (__bswap32(x)) >#define __ntohs(x) (__bswap16(x)) >#define __htonl(x) (__bswap32(x)) >#define __htons(x) (__bswap16(x)) >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif _BYTE_ORDER == _BIG_ENDIAN >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 95 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 >#define __htonl(x) ((__uint32_t)(x)) >#define __htons(x) ((__uint16_t)(x)) >#define __ntohl(x) ((__uint32_t)(x)) >#define __ntohs(x) ((__uint16_t)(x)) >#endif ># 100 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 > >/* > * Host to big endian, host to little endian, big endian to host, and little > * endian to host byte order functions as detailed in byteorder(9). > */ >#if 0 /* disabled by -frewrite-includes */ >#if _BYTE_ORDER == _LITTLE_ENDIAN >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 106 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 >#define htobe16(x) __bswap16((x)) >#define htobe32(x) __bswap32((x)) >#define htobe64(x) __bswap64((x)) >#define htole16(x) ((uint16_t)(x)) >#define htole32(x) ((uint32_t)(x)) >#define htole64(x) ((uint64_t)(x)) > >#define be16toh(x) __bswap16((x)) >#define be32toh(x) __bswap32((x)) >#define be64toh(x) __bswap64((x)) >#define le16toh(x) ((uint16_t)(x)) >#define le32toh(x) ((uint32_t)(x)) >#define le64toh(x) ((uint64_t)(x)) >#else /* _BYTE_ORDER != _LITTLE_ENDIAN */ ># 120 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 >#define htobe16(x) ((uint16_t)(x)) >#define htobe32(x) ((uint32_t)(x)) >#define htobe64(x) ((uint64_t)(x)) >#define htole16(x) __bswap16((x)) >#define htole32(x) __bswap32((x)) >#define htole64(x) __bswap64((x)) > >#define be16toh(x) ((uint16_t)(x)) >#define be32toh(x) ((uint32_t)(x)) >#define be64toh(x) ((uint64_t)(x)) >#define le16toh(x) __bswap16((x)) >#define le32toh(x) __bswap32((x)) >#define le64toh(x) __bswap64((x)) >#endif /* _BYTE_ORDER == _LITTLE_ENDIAN */ ># 134 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 > >#endif /* _SYS__ENDIAN_H_ */ ># 136 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_endian.h" 3 4 >#endif /* _endian.h expanded by -frewrite-includes */ ># 37 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/endian.h" 2 3 4 > >#endif /* !_MACHINE_ENDIAN_H_ */ ># 39 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/endian.h" 3 4 >#endif /* endian.h expanded by -frewrite-includes */ ># 6 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/endian.h" 2 3 4 >#endif /* endian.h expanded by -frewrite-includes */ ># 44 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 2 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 44 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 ># 45 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _pthreadtypes.h expanded by -frewrite-includes */ >#include <sys/_pthreadtypes.h> >#else /* _pthreadtypes.h expanded by -frewrite-includes */ ># 46 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_pthreadtypes.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1993, 1994 by Chris Provenzano, proven@mit.edu > * Copyright (c) 1995-1998 by John Birrell <jb@cimlogic.com.au> > * All rights reserved. > * > * 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. All advertising materials mentioning features or use of this software > * must display the following acknowledgement: > * This product includes software developed by Chris Provenzano. > * 4. The name of Chris Provenzano may not be used to endorse or promote > * products derived from this software without specific prior written > * permission. > * > * THIS SOFTWARE IS PROVIDED BY CHRIS PROVENZANO ``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 CHRIS PROVENZANO 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 _SYS__PTHREADTYPES_H_ >#define _SYS__PTHREADTYPES_H_ > >/* > * Forward structure definitions. > * > * These are mostly opaque to the user. > */ >struct pthread; >struct pthread_attr; >struct pthread_cond; >struct pthread_cond_attr; >struct pthread_mutex; >struct pthread_mutex_attr; >struct pthread_once; >struct pthread_rwlock; >struct pthread_rwlockattr; >struct pthread_barrier; >struct pthread_barrier_attr; >struct pthread_spinlock; > >/* > * Primitive system data type definitions required by P1003.1c. > * > * Note that P1003.1c specifies that there are no defined comparison > * or assignment operators for the types pthread_attr_t, pthread_cond_t, > * pthread_condattr_t, pthread_mutex_t, pthread_mutexattr_t. > */ >#ifndef _PTHREAD_T_DECLARED >typedef struct pthread *pthread_t; >#define _PTHREAD_T_DECLARED >#endif ># 68 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_pthreadtypes.h" 3 4 >typedef struct pthread_attr *pthread_attr_t; >typedef struct pthread_mutex *pthread_mutex_t; >typedef struct pthread_mutex_attr *pthread_mutexattr_t; >typedef struct pthread_cond *pthread_cond_t; >typedef struct pthread_cond_attr *pthread_condattr_t; >typedef int pthread_key_t; >typedef struct pthread_once pthread_once_t; >typedef struct pthread_rwlock *pthread_rwlock_t; >typedef struct pthread_rwlockattr *pthread_rwlockattr_t; >typedef struct pthread_barrier *pthread_barrier_t; >typedef struct pthread_barrierattr *pthread_barrierattr_t; >typedef struct pthread_spinlock *pthread_spinlock_t; > >/* > * Additional type definitions: > * > * Note that P1003.1c reserves the prefixes pthread_ and PTHREAD_ for > * use in header symbols. > */ >typedef void *pthread_addr_t; >typedef void *(*pthread_startroutine_t)(void *); > >/* > * Once definitions. > */ >struct pthread_once { > int state; > pthread_mutex_t mutex; >}; > >#endif /* ! _SYS__PTHREADTYPES_H_ */ ># 99 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_pthreadtypes.h" 3 4 >#endif /* _pthreadtypes.h expanded by -frewrite-includes */ ># 47 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 2 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 49 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 >typedef unsigned char u_char; >typedef unsigned short u_short; >typedef unsigned int u_int; >typedef unsigned long u_long; >#ifndef _KERNEL >typedef unsigned short ushort; /* Sys V compatibility */ >typedef unsigned int uint; /* Sys V compatibility */ >#endif ># 57 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 >#endif ># 58 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >/* > * XXX POSIX sized integrals that should appear only in <sys/stdint.h>. > */ >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _stdint.h expanded by -frewrite-includes */ >#include <sys/_stdint.h> >#else /* _stdint.h expanded by -frewrite-includes */ ># 62 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-2-Clause > * > * Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> > * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * 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 AUTHOR 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 AUTHOR 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 _SYS__STDINT_H_ >#define _SYS__STDINT_H_ > >#ifndef _INT8_T_DECLARED >typedef __int8_t int8_t; >#define _INT8_T_DECLARED >#endif ># 37 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT16_T_DECLARED >typedef __int16_t int16_t; >#define _INT16_T_DECLARED >#endif ># 42 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT32_T_DECLARED >typedef __int32_t int32_t; >#define _INT32_T_DECLARED >#endif ># 47 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INT64_T_DECLARED >typedef __int64_t int64_t; >#define _INT64_T_DECLARED >#endif ># 52 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT8_T_DECLARED >typedef __uint8_t uint8_t; >#define _UINT8_T_DECLARED >#endif ># 57 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT16_T_DECLARED >typedef __uint16_t uint16_t; >#define _UINT16_T_DECLARED >#endif ># 62 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT32_T_DECLARED >typedef __uint32_t uint32_t; >#define _UINT32_T_DECLARED >#endif ># 67 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _UINT64_T_DECLARED >typedef __uint64_t uint64_t; >#define _UINT64_T_DECLARED >#endif ># 72 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 > >#ifndef _INTPTR_T_DECLARED >typedef __intptr_t intptr_t; >#define _INTPTR_T_DECLARED >#endif ># 77 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 >#ifndef _UINTPTR_T_DECLARED >typedef __uintptr_t uintptr_t; >#define _UINTPTR_T_DECLARED >#endif ># 81 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 >#ifndef _INTMAX_T_DECLARED >typedef __intmax_t intmax_t; >#define _INTMAX_T_DECLARED >#endif ># 85 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 >#ifndef _UINTMAX_T_DECLARED >typedef __uintmax_t uintmax_t; >#define _UINTMAX_T_DECLARED >#endif ># 89 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 > >#endif /* !_SYS__STDINT_H_ */ ># 91 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdint.h" 3 4 >#endif /* _stdint.h expanded by -frewrite-includes */ ># 63 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 2 3 4 > >typedef __uint8_t u_int8_t; /* unsigned integrals (deprecated) */ >typedef __uint16_t u_int16_t; >typedef __uint32_t u_int32_t; >typedef __uint64_t u_int64_t; > >typedef __uint64_t u_quad_t; /* quads (deprecated) */ >typedef __int64_t quad_t; >typedef quad_t * qaddr_t; > >typedef char * caddr_t; /* core address */ >typedef const char * c_caddr_t; /* core address, pointer to const */ > >#ifndef _BLKSIZE_T_DECLARED >typedef __blksize_t blksize_t; >#define _BLKSIZE_T_DECLARED >#endif ># 80 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >typedef __cpuwhich_t cpuwhich_t; >typedef __cpulevel_t cpulevel_t; >typedef __cpusetid_t cpusetid_t; > >#ifndef _BLKCNT_T_DECLARED >typedef __blkcnt_t blkcnt_t; >#define _BLKCNT_T_DECLARED >#endif ># 89 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _CLOCK_T_DECLARED >typedef __clock_t clock_t; >#define _CLOCK_T_DECLARED >#endif ># 94 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _CLOCKID_T_DECLARED >typedef __clockid_t clockid_t; >#define _CLOCKID_T_DECLARED >#endif ># 99 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >typedef __critical_t critical_t; /* Critical section value */ >typedef __daddr_t daddr_t; /* disk address */ > >#ifndef _DEV_T_DECLARED >typedef __dev_t dev_t; /* device number or struct cdev */ >#define _DEV_T_DECLARED >#endif ># 107 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _FFLAGS_T_DECLARED >typedef __fflags_t fflags_t; /* file flags */ >#define _FFLAGS_T_DECLARED >#endif ># 112 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >typedef __fixpt_t fixpt_t; /* fixed point number */ > >#ifndef _FSBLKCNT_T_DECLARED /* for statvfs() */ >typedef __fsblkcnt_t fsblkcnt_t; >typedef __fsfilcnt_t fsfilcnt_t; >#define _FSBLKCNT_T_DECLARED >#endif ># 120 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _GID_T_DECLARED >typedef __gid_t gid_t; /* group id */ >#define _GID_T_DECLARED >#endif ># 125 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _IN_ADDR_T_DECLARED >typedef __uint32_t in_addr_t; /* base type for internet address */ >#define _IN_ADDR_T_DECLARED >#endif ># 130 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _IN_PORT_T_DECLARED >typedef __uint16_t in_port_t; >#define _IN_PORT_T_DECLARED >#endif ># 135 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _ID_T_DECLARED >typedef __id_t id_t; /* can hold a uid_t or pid_t */ >#define _ID_T_DECLARED >#endif ># 140 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _INO_T_DECLARED >typedef __ino_t ino_t; /* inode number */ >#define _INO_T_DECLARED >#endif ># 145 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _KEY_T_DECLARED >typedef __key_t key_t; /* IPC key (for Sys V IPC) */ >#define _KEY_T_DECLARED >#endif ># 150 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _LWPID_T_DECLARED >typedef __lwpid_t lwpid_t; /* Thread ID (a.k.a. LWP) */ >#define _LWPID_T_DECLARED >#endif ># 155 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _MODE_T_DECLARED >typedef __mode_t mode_t; /* permissions */ >#define _MODE_T_DECLARED >#endif ># 160 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _ACCMODE_T_DECLARED >typedef __accmode_t accmode_t; /* access permissions */ >#define _ACCMODE_T_DECLARED >#endif ># 165 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _NLINK_T_DECLARED >typedef __nlink_t nlink_t; /* link count */ >#define _NLINK_T_DECLARED >#endif ># 170 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _OFF_T_DECLARED >typedef __off_t off_t; /* file offset */ >#define _OFF_T_DECLARED >#endif ># 175 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _OFF64_T_DECLARED >typedef __off64_t off64_t; /* file offset (alias) */ >#define _OFF64_T_DECLARED >#endif ># 180 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _PID_T_DECLARED >typedef __pid_t pid_t; /* process id */ >#define _PID_T_DECLARED >#endif ># 185 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >typedef __register_t register_t; > >#ifndef _RLIM_T_DECLARED >typedef __rlim_t rlim_t; /* resource limit */ >#define _RLIM_T_DECLARED >#endif ># 192 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >typedef __sbintime_t sbintime_t; > >typedef __segsz_t segsz_t; /* segment size (in pages) */ > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 201 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _SSIZE_T_DECLARED >typedef __ssize_t ssize_t; >#define _SSIZE_T_DECLARED >#endif ># 206 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _SUSECONDS_T_DECLARED >typedef __suseconds_t suseconds_t; /* microseconds (signed) */ >#define _SUSECONDS_T_DECLARED >#endif ># 211 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 216 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _TIMER_T_DECLARED >typedef __timer_t timer_t; >#define _TIMER_T_DECLARED >#endif ># 221 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _MQD_T_DECLARED >typedef __mqd_t mqd_t; >#define _MQD_T_DECLARED >#endif ># 226 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >typedef __u_register_t u_register_t; > >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; /* user id */ >#define _UID_T_DECLARED >#endif ># 233 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _USECONDS_T_DECLARED >typedef __useconds_t useconds_t; /* microseconds (unsigned) */ >#define _USECONDS_T_DECLARED >#endif ># 238 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _CAP_IOCTL_T_DECLARED >#define _CAP_IOCTL_T_DECLARED >typedef unsigned long cap_ioctl_t; >#endif ># 243 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#ifndef _CAP_RIGHTS_T_DECLARED >#define _CAP_RIGHTS_T_DECLARED >struct cap_rights; > >typedef struct cap_rights cap_rights_t; >#endif ># 250 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >/* > * Types suitable for exporting physical addresses, virtual addresses > * (pointers), and memory object sizes from the kernel independent of native > * word size. These should be used in place of vm_paddr_t, (u)intptr_t, and > * size_t in structs which contain such types that are shared with userspace. > */ >typedef __uint64_t kpaddr_t; >typedef __uint64_t kvaddr_t; >typedef __uint64_t ksize_t; >typedef __int64_t kssize_t; > >typedef __vm_offset_t vm_offset_t; >typedef __uint64_t vm_ooffset_t; >typedef __vm_paddr_t vm_paddr_t; >typedef __uint64_t vm_pindex_t; >typedef __vm_size_t vm_size_t; > >typedef __rman_res_t rman_res_t; > >typedef __register_t syscallarg_t; > >#ifdef _KERNEL >typedef unsigned int boolean_t; >typedef struct _device *device_t; >typedef __intfptr_t intfptr_t; > >/* > * XXX this is fixed width for historical reasons. It should have had type > * __int_fast32_t. Fixed-width types should not be used unless binary > * compatibility is essential. Least-width types should be used even less > * since they provide smaller benefits. > * > * XXX should be MD. > * > * XXX this is bogus in -current, but still used for spl*(). > */ >typedef __uint32_t intrmask_t; /* Interrupt mask (spl, xxx_imask...) */ > >typedef __uintfptr_t uintfptr_t; >typedef __uint64_t uoff_t; >typedef char vm_memattr_t; /* memory attribute codes */ >typedef struct vm_page *vm_page_t; > >#define offsetof(type, field) __offsetof(type, field) >#endif /* _KERNEL */ ># 296 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(_KERNEL) || defined(_STANDALONE) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 298 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__bool_true_false_are_defined) && !defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 299 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 >#define __bool_true_false_are_defined 1 >#define false 0 >#define true 1 >typedef _Bool bool; >#endif /* !__bool_true_false_are_defined && !__cplusplus */ ># 304 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 >#endif /* KERNEL || _STANDALONE */ ># 305 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >/* > * The following are all things that really shouldn't exist in this header, > * since its purpose is to provide typedefs, not miscellaneous doodads. > */ >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* bitcount.h expanded by -frewrite-includes */ >#include <sys/bitcount.h> >#else /* bitcount.h expanded by -frewrite-includes */ ># 310 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/bitcount.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1991, 1993, 1994 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * 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. > */ > >#ifndef _SYS_BITCOUNT_H_ >#define _SYS_BITCOUNT_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/bitcount.h" 3 4 ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/bitcount.h" 3 4 > >#ifdef __POPCNT__ >#define __bitcount64(x) __builtin_popcountll((__uint64_t)(x)) >#define __bitcount32(x) __builtin_popcount((__uint32_t)(x)) >#define __bitcount16(x) __builtin_popcount((__uint16_t)(x)) >#define __bitcountl(x) __builtin_popcountl((unsigned long)(x)) >#define __bitcount(x) __builtin_popcount((unsigned int)(x)) >#else ># 49 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/bitcount.h" 3 4 >/* > * Population count algorithm using SWAR approach > * - "SIMD Within A Register". > */ >static __inline __uint16_t >__bitcount16(__uint16_t _x) >{ > > _x = (_x & 0x5555) + ((_x & 0xaaaa) >> 1); > _x = (_x & 0x3333) + ((_x & 0xcccc) >> 2); > _x = (_x + (_x >> 4)) & 0x0f0f; > _x = (_x + (_x >> 8)) & 0x00ff; > return (_x); >} > >static __inline __uint32_t >__bitcount32(__uint32_t _x) >{ > > _x = (_x & 0x55555555) + ((_x & 0xaaaaaaaa) >> 1); > _x = (_x & 0x33333333) + ((_x & 0xcccccccc) >> 2); > _x = (_x + (_x >> 4)) & 0x0f0f0f0f; > _x = (_x + (_x >> 8)); > _x = (_x + (_x >> 16)) & 0x000000ff; > return (_x); >} > >#ifdef __LP64__ >static __inline __uint64_t >__bitcount64(__uint64_t _x) >{ > > _x = (_x & 0x5555555555555555) + ((_x & 0xaaaaaaaaaaaaaaaa) >> 1); > _x = (_x & 0x3333333333333333) + ((_x & 0xcccccccccccccccc) >> 2); > _x = (_x + (_x >> 4)) & 0x0f0f0f0f0f0f0f0f; > _x = (_x + (_x >> 8)); > _x = (_x + (_x >> 16)); > _x = (_x + (_x >> 32)) & 0x000000ff; > return (_x); >} > >#define __bitcountl(x) __bitcount64((unsigned long)(x)) >#else ># 92 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/bitcount.h" 3 4 >static __inline __uint64_t >__bitcount64(__uint64_t _x) >{ > > return (__bitcount32(_x >> 32) + __bitcount32(_x)); >} > >#define __bitcountl(x) __bitcount32((unsigned long)(x)) >#endif ># 101 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/bitcount.h" 3 4 >#define __bitcount(x) __bitcount32((unsigned int)(x)) >#endif ># 103 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/bitcount.h" 3 4 > >#endif /* !_SYS_BITCOUNT_H_ */ ># 105 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/bitcount.h" 3 4 >#endif /* bitcount.h expanded by -frewrite-includes */ ># 311 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 2 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 313 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* select.h expanded by -frewrite-includes */ >#include <sys/select.h> >#else /* select.h expanded by -frewrite-includes */ ># 314 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1992, 1993 > * The Regents of the University of California. All rights reserved. > * > * 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. > */ > >#ifndef _SYS_SELECT_H_ >#define _SYS_SELECT_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 ># 36 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 36 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 ># 37 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _sigset.h expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#else /* _sigset.h expanded by -frewrite-includes */ ># 38 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigset.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * 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. > */ > >#ifndef _SYS__SIGSET_H_ >#define _SYS__SIGSET_H_ > >/* > * sigset_t macros. > */ >#define _SIG_WORDS 4 >#define _SIG_MAXSIG 128 >#define _SIG_IDX(sig) ((sig) - 1) >#define _SIG_WORD(sig) (_SIG_IDX(sig) >> 5) >#define _SIG_BIT(sig) (1U << (_SIG_IDX(sig) & 31)) >#define _SIG_VALID(sig) ((sig) <= _SIG_MAXSIG && (sig) > 0) > >typedef struct __sigset { > __uint32_t __bits[_SIG_WORDS]; >} __sigset_t; > >#if 0 /* disabled by -frewrite-includes */ >#if defined(_KERNEL) && defined(COMPAT_43) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 55 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigset.h" 3 4 >typedef unsigned int osigset_t; >#endif ># 57 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigset.h" 3 4 > >#endif /* !_SYS__SIGSET_H_ */ ># 59 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigset.h" 3 4 >#endif /* _sigset.h expanded by -frewrite-includes */ ># 39 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 2 3 4 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _timeval.h expanded by -frewrite-includes */ >#include <sys/_timeval.h> >#else /* _timeval.h expanded by -frewrite-includes */ ># 39 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_timeval.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-2-Clause > * > * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org> > * All rights reserved. > * > * 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 AUTHOR 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 AUTHOR 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 _SYS__TIMEVAL_H_ >#define _SYS__TIMEVAL_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 32 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_timeval.h" 3 4 ># 33 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_timeval.h" 3 4 > >#ifndef _SUSECONDS_T_DECLARED >typedef __suseconds_t suseconds_t; >#define _SUSECONDS_T_DECLARED >#endif ># 38 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_timeval.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 43 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_timeval.h" 3 4 > >/* > * Structure returned by gettimeofday(2) system call, and used in other calls. > */ >struct timeval { > time_t tv_sec; /* seconds */ > suseconds_t tv_usec; /* and microseconds */ >}; > >#endif /* !_SYS__TIMEVAL_H_ */ ># 53 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_timeval.h" 3 4 >#endif /* _timeval.h expanded by -frewrite-includes */ ># 40 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 2 3 4 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* timespec.h expanded by -frewrite-includes */ >#include <sys/timespec.h> >#else /* timespec.h expanded by -frewrite-includes */ ># 40 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/timespec.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * > * 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. > */ > >#ifndef _SYS_TIMESPEC_H_ >#define _SYS_TIMESPEC_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/timespec.h" 3 4 ># 36 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/timespec.h" 3 4 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _timespec.h expanded by -frewrite-includes */ >#include <sys/_timespec.h> >#else /* _timespec.h expanded by -frewrite-includes */ ># 36 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/timespec.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_timespec.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1993 > * The Regents of the University of California. All rights reserved. > * > * 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. > */ > >#ifndef _SYS__TIMESPEC_H_ >#define _SYS__TIMESPEC_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_timespec.h" 3 4 ># 36 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_timespec.h" 3 4 > >#ifndef _TIME_T_DECLARED >typedef __time_t time_t; >#define _TIME_T_DECLARED >#endif ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_timespec.h" 3 4 > >struct timespec { > time_t tv_sec; /* seconds */ > long tv_nsec; /* and nanoseconds */ >}; > >#endif /* !_SYS__TIMESPEC_H_ */ ># 48 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_timespec.h" 3 4 >#endif /* _timespec.h expanded by -frewrite-includes */ ># 37 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/timespec.h" 2 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 39 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/timespec.h" 3 4 >#define TIMEVAL_TO_TIMESPEC(tv, ts) \ > do { \ > (ts)->tv_sec = (tv)->tv_sec; \ > (ts)->tv_nsec = (tv)->tv_usec * 1000; \ > } while (0) >#define TIMESPEC_TO_TIMEVAL(tv, ts) \ > do { \ > (tv)->tv_sec = (ts)->tv_sec; \ > (tv)->tv_usec = (ts)->tv_nsec / 1000; \ > } while (0) > >#endif /* __BSD_VISIBLE */ ># 51 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/timespec.h" 3 4 > >/* > * Structure defined by POSIX.1b to be like a itimerval, but with > * timespecs. Used in the timer_*() system calls. > */ >struct itimerspec { > struct timespec it_interval; > struct timespec it_value; >}; > >#endif /* _SYS_TIMESPEC_H_ */ ># 62 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/timespec.h" 3 4 >#endif /* timespec.h expanded by -frewrite-includes */ ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 2 3 4 > >typedef unsigned long __fd_mask; >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 44 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >typedef __fd_mask fd_mask; >#endif ># 46 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 > >#ifndef _SIGSET_T_DECLARED >#define _SIGSET_T_DECLARED >typedef __sigset_t sigset_t; >#endif ># 51 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 53 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <ssp/ssp.h> >#endif /* expanded by -frewrite-includes */ ># 53 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 ># 54 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >#else ># 55 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >#define __SSP_FORTIFY_LEVEL 0 >#endif ># 57 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 > >/* > * Select uses bit masks of file descriptors in longs. These macros > * manipulate such bit fields (the filesystem macros use chars). > * FD_SETSIZE may be defined by the user, but the default here should > * be enough for most uses. > */ >#ifndef FD_SETSIZE >#define FD_SETSIZE 1024 >#endif ># 67 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 > >#define _NFDBITS (sizeof(__fd_mask) * 8) /* bits per mask */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 70 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >#define NFDBITS _NFDBITS >#endif ># 72 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 > >#ifndef _howmany >#define _howmany(x, y) (((x) + ((y) - 1)) / (y)) >#endif ># 76 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 > >typedef struct fd_set { > __fd_mask __fds_bits[_howmany(FD_SETSIZE, _NFDBITS)]; >} fd_set; >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 81 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >#define fds_bits __fds_bits >#endif ># 83 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 > >#define __fdset_idx_(p, n) ((n) / _NFDBITS) >#if 0 /* disabled by -frewrite-includes */ >#if __SSP_FORTIFY_LEVEL == 0 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 86 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >#define __fdset_idx(p, n) __fdset_idx_(p, n) >#else ># 88 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >__ssp_inline unsigned long >__fdset_idx(const fd_set *p, unsigned long idx) >{ > __size_t psz = __ssp_bos0(p); > unsigned long sidx = __fdset_idx_(p, idx); > > if (idx >= FD_SETSIZE) > __chk_fail(); > if (psz / sizeof(__fd_mask) < (sidx + 1)) > __chk_fail(); > > return (sidx); >} >#endif ># 102 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 > >#define __fdset_mask(n) ((__fd_mask)1 << ((n) % _NFDBITS)) >#define FD_CLR(n, p) ((p)->__fds_bits[__fdset_idx(p, n)] &= ~__fdset_mask(n)) >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 106 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >#define FD_COPY(f, t) (void)(*(t) = *(f)) >#endif ># 108 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >#define FD_ISSET(n, p) \ > (((p)->__fds_bits[__fdset_idx(p, n)] & __fdset_mask(n)) != 0) >#define FD_SET(n, p) ((p)->__fds_bits[__fdset_idx(p, n)] |= __fdset_mask(n)) >#define FD_ZERO(p) do { \ > fd_set *_p; \ > __size_t _n; \ > \ > _p = (p); \ > _n = _howmany(FD_SETSIZE, _NFDBITS); \ > while (_n > 0) \ > _p->__fds_bits[--_n] = 0; \ >} while (0) > >#ifndef _KERNEL > >__BEGIN_DECLS >int pselect(int, fd_set *__restrict, fd_set *__restrict, fd_set *__restrict, > const struct timespec *__restrict, const sigset_t *__restrict); >#ifndef _SELECT_DECLARED >#define _SELECT_DECLARED >/* XXX missing restrict type-qualifier */ >int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); >#endif ># 131 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >__END_DECLS >#endif /* !_KERNEL */ ># 133 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 > >#endif /* _SYS_SELECT_H_ */ ># 135 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/select.h" 3 4 >#endif /* select.h expanded by -frewrite-includes */ ># 315 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 2 3 4 > >/* > * The major and minor numbers are encoded in dev_t as MMMmmmMm (where > * letters correspond to bytes). The encoding of the lower 4 bytes is > * constrained by compatibility with 16-bit and 32-bit dev_t's. The > * encoding of the upper 4 bytes is the least unnatural one consistent > * with this and other constraints. Also, the decoding of the m bytes by > * minor() is unnatural to maximize compatibility subject to not discarding > * bits. The upper m byte is shifted into the position of the lower M byte > * instead of shifting 3 upper m bytes to close the gap. Compatibility for > * minor() is achieved iff the upper m byte is 0. > */ >#define major(d) __major(d) >static __inline int >__major(dev_t _d) >{ > return (((_d >> 32) & 0xffffff00) | ((_d >> 8) & 0xff)); >} >#define minor(d) __minor(d) >static __inline int >__minor(dev_t _d) >{ > return (((_d >> 24) & 0xff00) | (_d & 0xffff00ff)); >} >#define makedev(M, m) __makedev((M), (m)) >static __inline dev_t >__makedev(int _Major, int _Minor) >{ > return (((dev_t)(_Major & 0xffffff00) << 32) | ((_Major & 0xff) << 8) | > ((dev_t)(_Minor & 0xff00) << 24) | (_Minor & 0xffff00ff)); >} > >#if 0 /* disabled by -frewrite-includes */ >#if (defined(__clang__) || (defined(__GNUC__) && __GNUC__ >= 13)) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 348 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 >#define __enum_uint8_decl(name) enum enum_ ## name ## _uint8 : uint8_t >#define __enum_uint8(name) enum enum_ ## name ## _uint8 >#else ># 351 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 >/* > * Note: there is no real size checking here, but the code below can be > * removed once we require GCC 13. > */ >#define __enum_uint8_decl(name) enum __attribute__((packed)) enum_ ## name ## _uint8 >#define __enum_uint8(name) enum __attribute__((packed)) enum_ ## name ## _uint8 >#endif ># 358 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >/* > * These declarations belong elsewhere, but are repeated here and in > * <stdio.h> to give broken programs a better chance of working with > * 64-bit off_t's. > */ >#ifndef _KERNEL >__BEGIN_DECLS >#ifndef _FTRUNCATE_DECLARED >#define _FTRUNCATE_DECLARED >int ftruncate(int, off_t); >#endif ># 370 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 >#ifndef _LSEEK_DECLARED >#define _LSEEK_DECLARED >off_t lseek(int, off_t, int); >#endif ># 374 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 >#ifndef _MMAP_DECLARED >#define _MMAP_DECLARED >void * mmap(void *, size_t, int, int, int, off_t); >#endif ># 378 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 >#ifndef _TRUNCATE_DECLARED >#define _TRUNCATE_DECLARED >int truncate(const char *, off_t); >#endif ># 382 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 >__END_DECLS >#endif /* !_KERNEL */ ># 384 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#endif /* __BSD_VISIBLE */ ># 386 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 > >#endif /* !_SYS_TYPES_H_ */ ># 388 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/types.h" 3 4 >#endif /* types.h expanded by -frewrite-includes */ ># 30 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" 2 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ucontext.h expanded by -frewrite-includes */ >#include <sys/ucontext.h> >#else /* ucontext.h expanded by -frewrite-includes */ ># 30 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/ucontext.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1999 Marcel Moolenaar > * All rights reserved. > * > * 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 > * in this position and unchanged. > * 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. The name of the author may not be used to endorse or promote products > * derived from this software without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 _SYS_UCONTEXT_H_ >#define _SYS_UCONTEXT_H_ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* signal.h expanded by -frewrite-includes */ >#include <sys/signal.h> >#else /* signal.h expanded by -frewrite-includes */ ># 34 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/ucontext.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * 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. > */ > >#ifndef _SYS_SIGNAL_H_ >#define _SYS_SIGNAL_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 ># 42 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 42 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 ># 43 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _sigaltstack.h expanded by -frewrite-includes */ >#include <sys/_sigaltstack.h> >#else /* _sigaltstack.h expanded by -frewrite-includes */ ># 43 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigaltstack.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * 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. > */ > >#ifndef _SYS__SIGALTSTACK_H_ >#define _SYS__SIGALTSTACK_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigaltstack.h" 3 4 ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigaltstack.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 43 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigaltstack.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 44 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigaltstack.h" 3 4 >#define __stack_t sigaltstack >#endif ># 46 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigaltstack.h" 3 4 >typedef struct __stack_t stack_t; > >#define SS_ONSTACK 0x0001 /* take signal on alternate stack */ >#define SS_DISABLE 0x0004 /* disable taking signals on alternate stack */ >#define MINSIGSTKSZ __MINSIGSTKSZ /* minimum stack size */ >#define SIGSTKSZ (MINSIGSTKSZ + 32768) /* recommended stack size */ >#endif ># 53 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigaltstack.h" 3 4 > >/* > * Structure used in sigaltstack call. Its definition is always > * needed for __ucontext. If __BSD_VISIBLE is defined, the structure > * tag is actually sigaltstack. > */ >struct __stack_t { > void *ss_sp; /* signal stack base */ > __size_t ss_size; /* signal stack length */ > int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ >}; > >#endif /* !_SYS__SIGALTSTACK_H_ */ ># 66 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigaltstack.h" 3 4 >#endif /* _sigaltstack.h expanded by -frewrite-includes */ ># 44 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 2 3 4 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _sigval.h expanded by -frewrite-includes */ >#include <sys/_sigval.h> >#else /* _sigval.h expanded by -frewrite-includes */ ># 44 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigval.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * 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. > */ > >#ifndef __SYS__SIGVAL_H >#define __SYS__SIGVAL_H > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >= 500 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigval.h" 3 4 >union sigval { > /* Members as suggested by Annex C of POSIX 1003.1b. */ > int sival_int; > void *sival_ptr; > /* 6.0 compatibility */ > int sigval_int; > void *sigval_ptr; >}; > >#if 0 /* disabled by -frewrite-includes */ >#if defined(_WANT_LWPINFO32) || (defined(_KERNEL) && defined(__LP64__)) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 51 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigval.h" 3 4 >union sigval32 { > int sival_int; > __uint32_t sival_ptr; > /* 6.0 compatibility */ > int sigval_int; > __uint32_t sigval_ptr; >}; >#endif ># 59 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigval.h" 3 4 >#endif ># 60 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigval.h" 3 4 > >#endif /* __SYS__SIGVAL_H */ ># 62 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_sigval.h" 3 4 >#endif /* _sigval.h expanded by -frewrite-includes */ ># 45 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 2 3 4 > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _limits.h expanded by -frewrite-includes */ >#include <machine/_limits.h> /* __MINSIGSTKSZ */ >#else /* _limits.h expanded by -frewrite-includes */ ># 46 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/_limits.h" 1 3 4 >/*- > * This file is in the public domain. > */ > >#if 0 /* expanded by -frewrite-includes */ >#include <x86/_limits.h> >#endif /* expanded by -frewrite-includes */ ># 5 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/_limits.h" 3 4 ># 6 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/_limits.h" 3 4 >#endif /* _limits.h expanded by -frewrite-includes */ ># 47 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 2 3 4 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* signal.h expanded by -frewrite-includes */ >#include <machine/signal.h> /* sig_atomic_t; trap codes; sigcontext */ >#else /* signal.h expanded by -frewrite-includes */ ># 47 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/signal.h" 1 3 4 >/*- > * This file is in the public domain. > */ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* signal.h expanded by -frewrite-includes */ >#include <x86/signal.h> >#else /* signal.h expanded by -frewrite-includes */ ># 5 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/signal.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/signal.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1986, 1989, 1991, 1993 > * The Regents of the University of California. All rights reserved. > * Copyright (c) 2003 Peter Wemm. > * > * 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. > */ > >#ifndef _X86_SIGNAL_H >#define _X86_SIGNAL_H 1 > >/* > * Machine-dependent signal definitions > */ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/signal.h" 3 4 ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_sigset.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/signal.h" 3 4 ># 42 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/signal.h" 3 4 > >#ifdef __i386__ >typedef int sig_atomic_t; > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 47 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/signal.h" 3 4 >struct sigcontext { > struct __sigset sc_mask; /* signal mask to restore */ > int sc_onstack; /* sigstack state to restore */ > int sc_gs; /* machine state (struct trapframe) */ > int sc_fs; > int sc_es; > int sc_ds; > int sc_edi; > int sc_esi; > int sc_ebp; > int sc_isp; > int sc_ebx; > int sc_edx; > int sc_ecx; > int sc_eax; > int sc_trapno; > int sc_err; > int sc_eip; > int sc_cs; > int sc_efl; > int sc_esp; > int sc_ss; > int sc_len; /* sizeof(mcontext_t) */ > /* > * See <machine/ucontext.h> and <machine/npx.h> for > * the following fields. > */ > int sc_fpformat; > int sc_ownedfp; > int sc_flags; > int sc_fpstate[128] __aligned(16); > > int sc_fsbase; > int sc_gsbase; > > int sc_xfpustate; > int sc_xfpustate_len; > > int sc_spare2[4]; >}; > >#define sc_sp sc_esp >#define sc_fp sc_ebp >#define sc_pc sc_eip >#define sc_ps sc_efl >#define sc_eflags sc_efl > >#endif /* __BSD_VISIBLE */ ># 95 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/signal.h" 3 4 >#endif /* __i386__ */ ># 96 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/signal.h" 3 4 > >#ifdef __amd64__ >typedef long sig_atomic_t; > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 101 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/signal.h" 3 4 >/* > * Information pushed on stack when a signal is delivered. > * This is used by the kernel to restore state following > * execution of the signal handler. It is also made available > * to the handler to allow it to restore state properly if > * a non-standard exit is performed. > * > * The sequence of the fields/registers after sc_mask in struct > * sigcontext must match those in mcontext_t and struct trapframe. > */ >struct sigcontext { > struct __sigset sc_mask; /* signal mask to restore */ > long sc_onstack; /* sigstack state to restore */ > long sc_rdi; /* machine state (struct trapframe) */ > long sc_rsi; > long sc_rdx; > long sc_rcx; > long sc_r8; > long sc_r9; > long sc_rax; > long sc_rbx; > long sc_rbp; > long sc_r10; > long sc_r11; > long sc_r12; > long sc_r13; > long sc_r14; > long sc_r15; > int sc_trapno; > short sc_fs; > short sc_gs; > long sc_addr; > int sc_flags; > short sc_es; > short sc_ds; > long sc_err; > long sc_rip; > long sc_cs; > long sc_rflags; > long sc_rsp; > long sc_ss; > long sc_len; /* sizeof(mcontext_t) */ > /* > * See <machine/ucontext.h> and <machine/fpu.h> for the following > * fields. > */ > long sc_fpformat; > long sc_ownedfp; > long sc_fpstate[64] __aligned(16); > > long sc_fsbase; > long sc_gsbase; > > long sc_xfpustate; > long sc_xfpustate_len; > > long sc_spare[4]; >}; >#endif /* __BSD_VISIBLE */ ># 160 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/signal.h" 3 4 >#endif /* __amd64__ */ ># 161 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/signal.h" 3 4 > >#endif ># 163 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/signal.h" 3 4 >#endif /* signal.h expanded by -frewrite-includes */ ># 6 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/signal.h" 2 3 4 >#endif /* signal.h expanded by -frewrite-includes */ ># 48 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 2 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 50 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_pthreadtypes.h> >#endif /* expanded by -frewrite-includes */ ># 51 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 ># 52 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_timespec.h> >#endif /* expanded by -frewrite-includes */ ># 52 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 ># 53 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 58 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#ifndef _UID_T_DECLARED >typedef __uid_t uid_t; >#define _UID_T_DECLARED >#endif ># 63 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#endif /* __POSIX_VISIBLE >= 200809 */ ># 65 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >/* > * System defined signals. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 70 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGHUP 1 /* hangup */ >#endif ># 72 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGINT 2 /* interrupt */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 74 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGQUIT 3 /* quit */ >#endif ># 76 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGILL 4 /* illegal instr. (not reset when caught) */ >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 78 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGTRAP 5 /* trace trap (not reset when caught) */ >#endif ># 80 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGABRT 6 /* abort() */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 82 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGIOT SIGABRT /* compatibility */ >#define SIGEMT 7 /* EMT instruction */ >#endif ># 85 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGFPE 8 /* floating point exception */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 87 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGKILL 9 /* kill (cannot be caught or ignored) */ >#endif ># 89 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 90 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGBUS 10 /* bus error */ >#endif ># 92 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGSEGV 11 /* segmentation violation */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 94 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGSYS 12 /* non-existent system call invoked */ >#endif ># 96 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 97 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGPIPE 13 /* write on a pipe with no one to read it */ >#define SIGALRM 14 /* alarm clock */ >#endif ># 100 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGTERM 15 /* software termination signal from kill */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 102 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGURG 16 /* urgent condition on IO channel */ >#endif ># 104 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 105 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGSTOP 17 /* sendable stop signal not from tty */ >#define SIGTSTP 18 /* stop signal from tty */ >#define SIGCONT 19 /* continue a stopped process */ >#define SIGCHLD 20 /* to parent on child stop or exit */ >#define SIGTTIN 21 /* to readers pgrp upon background tty read */ >#define SIGTTOU 22 /* like TTIN if (tp->t_local<OSTOP) */ >#endif ># 112 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 113 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGIO 23 /* input/output possible signal */ >#endif ># 115 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 116 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGXCPU 24 /* exceeded CPU time limit */ >#define SIGXFSZ 25 /* exceeded file size limit */ >#define SIGVTALRM 26 /* virtual time alarm */ >#define SIGPROF 27 /* profiling time alarm */ >#endif ># 121 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 122 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGWINCH 28 /* window size changes */ >#define SIGINFO 29 /* information request */ >#endif ># 125 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 126 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGUSR1 30 /* user defined signal 1 */ >#define SIGUSR2 31 /* user defined signal 2 */ >#endif ># 129 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 130 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGTHR 32 /* reserved by thread library. */ >#define SIGLWP SIGTHR >#define SIGLIBRT 33 /* reserved by real-time library. */ >#endif ># 134 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#define SIGRTMIN 65 >#define SIGRTMAX 126 > >#define SIG_DFL ((__sighandler_t *)0) >#define SIG_IGN ((__sighandler_t *)1) >#define SIG_ERR ((__sighandler_t *)-1) >/* #define SIG_CATCH ((__sighandler_t *)2) See signalvar.h */ >#define SIG_HOLD ((__sighandler_t *)3) > >/* > * Type of a signal handling function. > * > * Language spec sez signal handlers take exactly one arg, even though we > * actually supply three. Ugh! > * > * We don't try to hide the difference by leaving out the args because > * that would cause warnings about conformant programs. Nonconformant > * programs can avoid the warnings by casting to (__sighandler_t *) or > * sig_t before calling signal() or assigning to sa_handler or sv_handler. > * > * The kernel should reverse the cast before calling the function. It > * has no way to do this, but on most machines 1-arg and 3-arg functions > * have the same calling protocol so there is no problem in practice. > * A bit in sa_flags could be used to specify the number of args. > */ >typedef void __sighandler_t(int); > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 163 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#ifndef _SIGSET_T_DECLARED >#define _SIGSET_T_DECLARED >typedef __sigset_t sigset_t; >#endif ># 167 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#endif ># 168 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199309 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 170 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >struct pthread_attr; > >struct sigevent { > int sigev_notify; /* Notification type */ > int sigev_signo; /* Signal number */ > union sigval sigev_value; /* Signal value */ > union { > __lwpid_t _threadid; > struct { > void (*_function)(union sigval); > struct pthread_attr **_attribute; > } _sigev_thread; > unsigned short _kevent_flags; > long __spare__[8]; > } _sigev_un; >}; > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 189 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define sigev_notify_kqueue sigev_signo >#define sigev_notify_kevent_flags _sigev_un._kevent_flags >#define sigev_notify_thread_id _sigev_un._threadid >#endif ># 193 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define sigev_notify_function _sigev_un._sigev_thread._function >#define sigev_notify_attributes _sigev_un._sigev_thread._attribute > >#define SIGEV_NONE 0 /* No async notification. */ >#define SIGEV_SIGNAL 1 /* Generate a queued signal. */ >#define SIGEV_THREAD 2 /* Call back from another pthread. */ >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 200 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SIGEV_KEVENT 3 /* Generate a kevent. */ >#define SIGEV_THREAD_ID 4 /* Send signal to a kernel thread. */ >#endif ># 203 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#endif /* __POSIX_VISIBLE >= 199309 */ ># 205 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 207 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >typedef struct __siginfo { > int si_signo; /* signal number */ > int si_errno; /* errno association */ > /* > * Cause of signal, one of the SI_ macros or signal-specific > * values, i.e. one of the FPE_... values for SIGFPE. This > * value is equivalent to the second argument to an old-style > * FreeBSD signal handler. > */ > int si_code; /* signal code */ > __pid_t si_pid; /* sending process */ > __uid_t si_uid; /* sender's ruid */ > int si_status; /* exit value */ > void *si_addr; /* faulting instruction */ > union sigval si_value; /* signal value */ > union { > struct { > int _trapno;/* machine specific trap code */ > } _fault; > struct { > int _timerid; > int _overrun; > } _timer; > struct { > int _mqd; > } _mesgq; > struct { > long _band; /* band event for SIGPOLL */ > } _poll; /* was this ever used ? */ > struct { > int _syscall; /* Syscall number for signals > * delivered as a result of > * system calls denied by > * Capsicum. */ > } _capsicum; > struct { > long __spare1__; > int __spare2__[7]; > } __spare__; > } _reason; >} siginfo_t; > >#define si_trapno _reason._fault._trapno >#define si_timerid _reason._timer._timerid >#define si_overrun _reason._timer._overrun >#define si_mqd _reason._mesgq._mqd >#define si_band _reason._poll._band >#define si_syscall _reason._capsicum._syscall > >#if 0 /* disabled by -frewrite-includes */ >#if defined(_WANT_LWPINFO32) || (defined(_KERNEL) && defined(__LP64__)) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 257 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >struct __siginfo32 { > int si_signo; /* signal number */ > int si_errno; /* errno association */ > int si_code; /* signal code */ > __pid_t si_pid; /* sending process */ > __uid_t si_uid; /* sender's ruid */ > int si_status; /* exit value */ > uint32_t si_addr; /* faulting instruction */ > union sigval32 si_value; /* signal value */ > union { > struct { > int _trapno;/* machine specific trap code */ > } _fault; > struct { > int _timerid; > int _overrun; > } _timer; > struct { > int _mqd; > } _mesgq; > struct { > int32_t _band; /* band event for SIGPOLL */ > } _poll; /* was this ever used ? */ > struct { > int32_t __spare1__; > int __spare2__[7]; > } __spare__; > } _reason; >}; >#endif ># 287 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >/** si_code **/ >/* codes for SIGILL */ >#define ILL_ILLOPC 1 /* Illegal opcode. */ >#define ILL_ILLOPN 2 /* Illegal operand. */ >#define ILL_ILLADR 3 /* Illegal addressing mode. */ >#define ILL_ILLTRP 4 /* Illegal trap. */ >#define ILL_PRVOPC 5 /* Privileged opcode. */ >#define ILL_PRVREG 6 /* Privileged register. */ >#define ILL_COPROC 7 /* Coprocessor error. */ >#define ILL_BADSTK 8 /* Internal stack error. */ > >/* codes for SIGBUS */ >#define BUS_ADRALN 1 /* Invalid address alignment. */ >#define BUS_ADRERR 2 /* Nonexistent physical address. */ >#define BUS_OBJERR 3 /* Object-specific hardware error. */ >#define BUS_OOMERR 100 /* Non-standard: No memory. */ > >/* codes for SIGSEGV */ >#define SEGV_MAPERR 1 /* Address not mapped to object. */ >#define SEGV_ACCERR 2 /* Invalid permissions for mapped */ > /* object. */ >#define SEGV_PKUERR 100 /* x86: PKU violation */ > >/* codes for SIGFPE */ >#define FPE_INTOVF 1 /* Integer overflow. */ >#define FPE_INTDIV 2 /* Integer divide by zero. */ >#define FPE_FLTDIV 3 /* Floating point divide by zero. */ >#define FPE_FLTOVF 4 /* Floating point overflow. */ >#define FPE_FLTUND 5 /* Floating point underflow. */ >#define FPE_FLTRES 6 /* Floating point inexact result. */ >#define FPE_FLTINV 7 /* Invalid floating point operation. */ >#define FPE_FLTSUB 8 /* Subscript out of range. */ >#define FPE_FLTIDO 9 /* Input denormal operation */ > >/* codes for SIGTRAP */ >#define TRAP_BRKPT 1 /* Process breakpoint. */ >#define TRAP_TRACE 2 /* Process trace trap. */ >#define TRAP_DTRACE 3 /* DTrace induced trap. */ >#define TRAP_CAP 4 /* Capabilities protective trap. */ > >/* codes for SIGCHLD */ >#define CLD_EXITED 1 /* Child has exited */ >#define CLD_KILLED 2 /* Child has terminated abnormally but */ > /* did not create a core file */ >#define CLD_DUMPED 3 /* Child has terminated abnormally and */ > /* created a core file */ >#define CLD_TRAPPED 4 /* Traced child has trapped */ >#define CLD_STOPPED 5 /* Child has stopped */ >#define CLD_CONTINUED 6 /* Stopped child has continued */ > >/* codes for SIGPOLL */ >#define POLL_IN 1 /* Data input available */ >#define POLL_OUT 2 /* Output buffers available */ >#define POLL_MSG 3 /* Input message available */ >#define POLL_ERR 4 /* I/O Error */ >#define POLL_PRI 5 /* High priority input available */ >#define POLL_HUP 6 /* Device disconnected */ > >#endif ># 347 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 349 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >struct __siginfo; > >/* > * Signal vector "template" used in sigaction call. > */ >struct sigaction { > union { > void (*__sa_handler)(int); > void (*__sa_sigaction)(int, struct __siginfo *, void *); > } __sigaction_u; /* signal handler */ > int sa_flags; /* see signal options below */ > sigset_t sa_mask; /* signal mask to apply */ >}; > >#define sa_handler __sigaction_u.__sa_handler >#endif ># 365 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 367 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >/* If SA_SIGINFO is set, sa_sigaction must be used instead of sa_handler. */ >#define sa_sigaction __sigaction_u.__sa_sigaction >#endif ># 370 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 372 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */ >#endif /* __POSIX_VISIBLE || __XSI_VISIBLE */ ># 374 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 376 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SA_ONSTACK 0x0001 /* take signal on signal stack */ >#define SA_RESTART 0x0002 /* restart system call on signal return */ >#define SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */ >#define SA_NODEFER 0x0010 /* don't mask the signal we're delivering */ >#define SA_NOCLDWAIT 0x0020 /* don't keep zombies around */ >#define SA_SIGINFO 0x0040 /* signal handler with SA_SIGINFO args */ >#endif ># 383 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 385 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define NSIG 32 /* number of old signals (counting 0) */ >#endif ># 387 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 389 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SI_NOINFO 0 /* No signal info besides si_signo. */ >#define SI_USER 0x10001 /* Signal sent by kill(). */ >#define SI_QUEUE 0x10002 /* Signal sent by the sigqueue(). */ >#define SI_TIMER 0x10003 /* Signal generated by expiration of */ > /* a timer set by timer_settime(). */ >#define SI_ASYNCIO 0x10004 /* Signal generated by completion of */ > /* an asynchronous I/O request.*/ >#define SI_MESGQ 0x10005 /* Signal generated by arrival of a */ > /* message on an empty message queue. */ >#define SI_KERNEL 0x10006 >#define SI_LWP 0x10007 /* Signal sent by thr_kill */ >#endif ># 401 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 402 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define SI_UNDEFINED 0 >#endif ># 404 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 406 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >typedef __sighandler_t *sig_t; /* type of pointer to a signal function */ >typedef void __siginfohandler_t(int, struct __siginfo *, void *); >#endif ># 409 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 411 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >/* > * 4.3 compatibility: > * Signal vector "template" used in sigvec call. > */ >struct sigvec { > __sighandler_t *sv_handler; /* signal handler */ > int sv_mask; /* signal mask to apply */ > int sv_flags; /* see signal options below */ >}; > >#define SV_ONSTACK SA_ONSTACK >#define SV_INTERRUPT SA_RESTART /* same bit, opposite sense */ >#define SV_RESETHAND SA_RESETHAND >#define SV_NODEFER SA_NODEFER >#define SV_NOCLDSTOP SA_NOCLDSTOP >#define SV_SIGINFO SA_SIGINFO >#define sv_onstack sv_flags /* isn't compatibility wonderful! */ >#endif ># 429 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >/* Keep this in one place only */ >#if 0 /* disabled by -frewrite-includes */ >#if defined(_KERNEL) && defined(COMPAT_43) && \ > !defined(__i386__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 433 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >struct osigcontext { > int _not_used; >}; >#endif ># 437 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 439 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >/* > * Structure used in sigstack call. > */ >struct sigstack { > void *ss_sp; /* signal stack pointer */ > int ss_onstack; /* current status */ >}; >#endif ># 447 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE || __POSIX_VISIBLE > 0 && __POSIX_VISIBLE <= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 449 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >/* > * Macro for converting signal number to a mask suitable for > * sigblock(). > */ >#define sigmask(m) (1 << ((m)-1)) >#endif ># 455 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 457 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#define BADSIG SIG_ERR > >/* sigqueue(2) signo high-bits flags */ >#define __SIGQUEUE_TID 0x80000000 /* queue for tid, instead of pid */ >#define __SIGQUEUE_RSRV 0x40000000 /* reserved */ >#endif ># 463 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 465 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >/* > * Flags for sigprocmask: > */ >#define SIG_BLOCK 1 /* block specified signal set */ >#define SIG_UNBLOCK 2 /* unblock specified signal set */ >#define SIG_SETMASK 3 /* set specified signal set */ >#endif ># 472 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 > >/* > * For historical reasons; programs expect signal's return value to be > * defined by <sys/signal.h>. > */ >__BEGIN_DECLS >__sighandler_t *signal(int, __sighandler_t *); >__END_DECLS > >#endif /* !_SYS_SIGNAL_H_ */ ># 482 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/signal.h" 3 4 >#endif /* signal.h expanded by -frewrite-includes */ ># 35 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/ucontext.h" 2 3 4 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ucontext.h expanded by -frewrite-includes */ >#include <machine/ucontext.h> >#else /* ucontext.h expanded by -frewrite-includes */ ># 35 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/ucontext.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/ucontext.h" 1 3 4 >/*- > * This file is in the public domain. > */ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ucontext.h expanded by -frewrite-includes */ >#include <x86/ucontext.h> >#else /* ucontext.h expanded by -frewrite-includes */ ># 5 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/ucontext.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/ucontext.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 2003 Peter Wemm > * Copyright (c) 1999 Marcel Moolenaar > * All rights reserved. > * > * 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 > * in this position and unchanged. > * 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. The name of the author may not be used to endorse or promote products > * derived from this software without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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_UCONTEXT_H_ >#define _X86_UCONTEXT_H_ > >#ifdef __i386__ >/* Keep _MC_* values similar to amd64 */ >#define _MC_HASSEGS 0x1 >#define _MC_HASBASES 0x2 >#define _MC_HASFPXSTATE 0x4 >#define _MC_FLAG_MASK (_MC_HASSEGS | _MC_HASBASES | _MC_HASFPXSTATE) > >typedef struct __mcontext { > /* > * The definition of mcontext_t must match the layout of > * struct sigcontext after the sc_mask member. This is so > * that we can support sigcontext and ucontext_t at the same > * time. > */ > __register_t mc_onstack; /* XXX - sigcontext compat. */ > __register_t mc_gs; /* machine state (struct trapframe) */ > __register_t mc_fs; > __register_t mc_es; > __register_t mc_ds; > __register_t mc_edi; > __register_t mc_esi; > __register_t mc_ebp; > __register_t mc_isp; > __register_t mc_ebx; > __register_t mc_edx; > __register_t mc_ecx; > __register_t mc_eax; > __register_t mc_trapno; > __register_t mc_err; > __register_t mc_eip; > __register_t mc_cs; > __register_t mc_eflags; > __register_t mc_esp; > __register_t mc_ss; > > int mc_len; /* sizeof(mcontext_t) */ >#define _MC_FPFMT_NODEV 0x10000 /* device not present or configured */ >#define _MC_FPFMT_387 0x10001 >#define _MC_FPFMT_XMM 0x10002 > int mc_fpformat; >#define _MC_FPOWNED_NONE 0x20000 /* FP state not used */ >#define _MC_FPOWNED_FPU 0x20001 /* FP state came from FPU */ >#define _MC_FPOWNED_PCB 0x20002 /* FP state came from PCB */ > int mc_ownedfp; > __register_t mc_flags; > /* > * See <machine/npx.h> for the internals of mc_fpstate[]. > */ > int mc_fpstate[128] __aligned(16); > > __register_t mc_fsbase; > __register_t mc_gsbase; > > __register_t mc_xfpustate; > __register_t mc_xfpustate_len; > > int mc_spare2[4]; >} mcontext_t; >#endif /* __i386__ */ ># 94 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/ucontext.h" 3 4 > >#ifdef __amd64__ >/* > * mc_flags bits. Shall be in sync with TF_XXX. > */ >#define _MC_HASSEGS 0x1 >#define _MC_HASBASES 0x2 >#define _MC_HASFPXSTATE 0x4 >#define _MC_FLAG_MASK (_MC_HASSEGS | _MC_HASBASES | _MC_HASFPXSTATE) > >typedef struct __mcontext { > /* > * The definition of mcontext_t must match the layout of > * struct sigcontext after the sc_mask member. This is so > * that we can support sigcontext and ucontext_t at the same > * time. > */ > __register_t mc_onstack; /* XXX - sigcontext compat. */ > __register_t mc_rdi; /* machine state (struct trapframe) */ > __register_t mc_rsi; > __register_t mc_rdx; > __register_t mc_rcx; > __register_t mc_r8; > __register_t mc_r9; > __register_t mc_rax; > __register_t mc_rbx; > __register_t mc_rbp; > __register_t mc_r10; > __register_t mc_r11; > __register_t mc_r12; > __register_t mc_r13; > __register_t mc_r14; > __register_t mc_r15; > __uint32_t mc_trapno; > __uint16_t mc_fs; > __uint16_t mc_gs; > __register_t mc_addr; > __uint32_t mc_flags; > __uint16_t mc_es; > __uint16_t mc_ds; > __register_t mc_err; > __register_t mc_rip; > __register_t mc_cs; > __register_t mc_rflags; > __register_t mc_rsp; > __register_t mc_ss; > > long mc_len; /* sizeof(mcontext_t) */ > >#define _MC_FPFMT_NODEV 0x10000 /* device not present or configured */ >#define _MC_FPFMT_XMM 0x10002 > long mc_fpformat; >#define _MC_FPOWNED_NONE 0x20000 /* FP state not used */ >#define _MC_FPOWNED_FPU 0x20001 /* FP state came from FPU */ >#define _MC_FPOWNED_PCB 0x20002 /* FP state came from PCB */ > long mc_ownedfp; > /* > * See <machine/fpu.h> for the internals of mc_fpstate[]. > */ > long mc_fpstate[64] __aligned(16); > > __register_t mc_fsbase; > __register_t mc_gsbase; > > __register_t mc_xfpustate; > __register_t mc_xfpustate_len; > > long mc_spare[4]; >} mcontext_t; >#endif /* __amd64__ */ ># 164 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/ucontext.h" 3 4 > >#endif /* !_X86_UCONTEXT_H_ */ ># 166 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/ucontext.h" 3 4 >#endif /* ucontext.h expanded by -frewrite-includes */ ># 6 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/ucontext.h" 2 3 4 >#endif /* ucontext.h expanded by -frewrite-includes */ ># 36 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/ucontext.h" 2 3 4 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _ucontext.h expanded by -frewrite-includes */ >#include <sys/_ucontext.h> >#else /* _ucontext.h expanded by -frewrite-includes */ ># 36 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/ucontext.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_ucontext.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1999 Marcel Moolenaar > * All rights reserved. > * > * 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 > * in this position and unchanged. > * 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. The name of the author may not be used to endorse or promote products > * derived from this software without specific prior written permission. > * > * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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 _SYS__UCONTEXT_H_ >#define _SYS__UCONTEXT_H_ > >typedef struct __ucontext { > /* > * Keep the order of the first two fields. Also, > * keep them the first two fields in the structure. > * This way we can have a union with struct > * sigcontext and ucontext_t. This allows us to > * support them both at the same time. > * note: the union is not defined, though. > */ > __sigset_t uc_sigmask; > mcontext_t uc_mcontext; > > struct __ucontext *uc_link; > struct __stack_t uc_stack; > int uc_flags; > int __spare__[4]; >} ucontext_t; > >#endif /* _SYS__UCONTEXT_H */ ># 53 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_ucontext.h" 3 4 >#endif /* _ucontext.h expanded by -frewrite-includes */ ># 37 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/ucontext.h" 2 3 4 > >#define UCF_SWAPPED 0x00000001 /* Used by swapcontext(3). */ > >#ifndef _KERNEL > >__BEGIN_DECLS > >int getcontext(ucontext_t *) __returns_twice; >ucontext_t *getcontextx(void); >int setcontext(const ucontext_t *); >void makecontext(ucontext_t *, void (*)(void), int, ...); >int signalcontext(ucontext_t *, int, __sighandler_t *); >int swapcontext(ucontext_t *, const ucontext_t *); > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 52 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/ucontext.h" 3 4 >int __getcontextx_size(void); >int __fillcontextx(char *ctx) __returns_twice; >int __fillcontextx2(char *ctx); >#endif ># 56 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/ucontext.h" 3 4 > >__END_DECLS > >#else /* _KERNEL */ ># 60 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/ucontext.h" 3 4 > >struct thread; > >/* > * Flags for get_mcontext(). The low order 4 bits (i.e a mask of 0x0f) are > * reserved for use by machine independent code. All other bits are for use > * by machine dependent code. > */ >#define GET_MC_CLEAR_RET 1 > >/* Machine-dependent functions: */ >int get_mcontext(struct thread *, mcontext_t *, int); >int set_mcontext(struct thread *, mcontext_t *); > >#endif /* !_KERNEL */ ># 75 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/ucontext.h" 3 4 > >#endif /* !_SYS_UCONTEXT_H_ */ ># 77 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/ucontext.h" 3 4 >#endif /* ucontext.h expanded by -frewrite-includes */ ># 31 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" 2 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* errno.h expanded by -frewrite-includes */ >#include <errno.h> >#else /* errno.h expanded by -frewrite-includes */ ># 31 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1982, 1986, 1989, 1993 > * The Regents of the University of California. All rights reserved. > * (c) UNIX System Laboratories, Inc. > * All or some portions of this file are derived from material licensed > * to the University of California by American Telephone and Telegraph > * Co. or Unix System Laboratories, Inc. and are reproduced herein with > * the permission of UNIX System Laboratories, Inc. > * > * 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. > */ > >#ifndef _SYS_ERRNO_H_ >#define _SYS_ERRNO_H_ > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(_KERNEL) && !defined(_STANDALONE) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 ># 42 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 >__BEGIN_DECLS >int * __error(void); >__END_DECLS >#define errno (* __error()) >#endif ># 47 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 > >#define EPERM 1 /* Operation not permitted */ >#define ENOENT 2 /* No such file or directory */ >#define ESRCH 3 /* No such process */ >#define EINTR 4 /* Interrupted system call */ >#define EIO 5 /* Input/output error */ >#define ENXIO 6 /* Device not configured */ >#define E2BIG 7 /* Argument list too long */ >#define ENOEXEC 8 /* Exec format error */ >#define EBADF 9 /* Bad file descriptor */ >#define ECHILD 10 /* No child processes */ >#define EDEADLK 11 /* Resource deadlock avoided */ > /* 11 was EAGAIN */ >#define ENOMEM 12 /* Cannot allocate memory */ >#define EACCES 13 /* Permission denied */ >#define EFAULT 14 /* Bad address */ >#ifndef _POSIX_SOURCE >#define ENOTBLK 15 /* Block device required */ >#endif ># 66 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 >#define EBUSY 16 /* Device busy */ >#define EEXIST 17 /* File exists */ >#define EXDEV 18 /* Cross-device link */ >#define ENODEV 19 /* Operation not supported by device */ >#define ENOTDIR 20 /* Not a directory */ >#define EISDIR 21 /* Is a directory */ >#define EINVAL 22 /* Invalid argument */ >#define ENFILE 23 /* Too many open files in system */ >#define EMFILE 24 /* Too many open files */ >#define ENOTTY 25 /* Inappropriate ioctl for device */ >#ifndef _POSIX_SOURCE >#define ETXTBSY 26 /* Text file busy */ >#endif ># 79 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 >#define EFBIG 27 /* File too large */ >#define ENOSPC 28 /* No space left on device */ >#define ESPIPE 29 /* Illegal seek */ >#define EROFS 30 /* Read-only filesystem */ >#define EMLINK 31 /* Too many links */ >#define EPIPE 32 /* Broken pipe */ > >/* math software */ >#define EDOM 33 /* Numerical argument out of domain */ >#define ERANGE 34 /* Result too large */ > >/* non-blocking and interrupt i/o */ >#define EAGAIN 35 /* Resource temporarily unavailable */ >#ifndef _POSIX_SOURCE >#define EWOULDBLOCK EAGAIN /* Operation would block */ >#define EINPROGRESS 36 /* Operation now in progress */ >#define EALREADY 37 /* Operation already in progress */ > >/* ipc/network software -- argument errors */ >#define ENOTSOCK 38 /* Socket operation on non-socket */ >#define EDESTADDRREQ 39 /* Destination address required */ >#define EMSGSIZE 40 /* Message too long */ >#define EPROTOTYPE 41 /* Protocol wrong type for socket */ >#define ENOPROTOOPT 42 /* Protocol not available */ >#define EPROTONOSUPPORT 43 /* Protocol not supported */ >#define ESOCKTNOSUPPORT 44 /* Socket type not supported */ >#define EOPNOTSUPP 45 /* Operation not supported */ >#define ENOTSUP EOPNOTSUPP /* Operation not supported */ >#define EPFNOSUPPORT 46 /* Protocol family not supported */ >#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */ >#define EADDRINUSE 48 /* Address already in use */ >#define EADDRNOTAVAIL 49 /* Can't assign requested address */ > >/* ipc/network software -- operational errors */ >#define ENETDOWN 50 /* Network is down */ >#define ENETUNREACH 51 /* Network is unreachable */ >#define ENETRESET 52 /* Network dropped connection on reset */ >#define ECONNABORTED 53 /* Software caused connection abort */ >#define ECONNRESET 54 /* Connection reset by peer */ >#define ENOBUFS 55 /* No buffer space available */ >#define EISCONN 56 /* Socket is already connected */ >#define ENOTCONN 57 /* Socket is not connected */ >#define ESHUTDOWN 58 /* Can't send after socket shutdown */ >#define ETOOMANYREFS 59 /* Too many references: can't splice */ >#define ETIMEDOUT 60 /* Operation timed out */ >#define ECONNREFUSED 61 /* Connection refused */ > >#define ELOOP 62 /* Too many levels of symbolic links */ >#endif /* _POSIX_SOURCE */ ># 128 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 >#define ENAMETOOLONG 63 /* File name too long */ > >/* should be rearranged */ >#ifndef _POSIX_SOURCE >#define EHOSTDOWN 64 /* Host is down */ >#define EHOSTUNREACH 65 /* No route to host */ >#endif /* _POSIX_SOURCE */ ># 135 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 >#define ENOTEMPTY 66 /* Directory not empty */ > >/* quotas & mush */ >#ifndef _POSIX_SOURCE >#define EPROCLIM 67 /* Too many processes */ >#define EUSERS 68 /* Too many users */ >#define EDQUOT 69 /* Disc quota exceeded */ > >/* Network File System */ >#define ESTALE 70 /* Stale NFS file handle */ >#define EREMOTE 71 /* Too many levels of remote in path */ >#define EBADRPC 72 /* RPC struct is bad */ >#define ERPCMISMATCH 73 /* RPC version wrong */ >#define EPROGUNAVAIL 74 /* RPC prog. not avail */ >#define EPROGMISMATCH 75 /* Program version wrong */ >#define EPROCUNAVAIL 76 /* Bad procedure for program */ >#endif /* _POSIX_SOURCE */ ># 152 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 > >#define ENOLCK 77 /* No locks available */ >#define ENOSYS 78 /* Function not implemented */ > >#ifndef _POSIX_SOURCE >#define EFTYPE 79 /* Inappropriate file type or format */ >#define EAUTH 80 /* Authentication error */ >#define ENEEDAUTH 81 /* Need authenticator */ >#define EIDRM 82 /* Identifier removed */ >#define ENOMSG 83 /* No message of desired type */ >#define EOVERFLOW 84 /* Value too large to be stored in data type */ >#define ECANCELED 85 /* Operation canceled */ >#define EILSEQ 86 /* Illegal byte sequence */ >#define ENOATTR 87 /* Attribute not found */ > >#define EDOOFUS 88 /* Programming error */ >#endif /* _POSIX_SOURCE */ ># 169 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 > >#define EBADMSG 89 /* Bad message */ >#define EMULTIHOP 90 /* Multihop attempted */ >#define ENOLINK 91 /* Link has been severed */ >#define EPROTO 92 /* Protocol error */ > >#ifndef _POSIX_SOURCE >#define ENOTCAPABLE 93 /* Capabilities insufficient */ >#define ECAPMODE 94 /* Not permitted in capability mode */ >#define ENOTRECOVERABLE 95 /* State not recoverable */ >#define EOWNERDEAD 96 /* Previous owner died */ >#define EINTEGRITY 97 /* Integrity check failed */ >#endif /* _POSIX_SOURCE */ ># 182 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 > >#ifndef _POSIX_SOURCE >#define ELAST 97 /* Must be equal largest errno */ >#endif /* _POSIX_SOURCE */ ># 186 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 > >#if 0 /* disabled by -frewrite-includes */ >#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) || defined(_STANDALONE) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 188 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 >/* pseudo-errors returned inside kernel to modify return to process */ >#define ERESTART (-1) /* restart syscall */ >#define EJUSTRETURN (-2) /* don't modify regs, just return */ >#define ENOIOCTL (-3) /* ioctl not handled by this layer */ >#define EDIRIOCTL (-4) /* do direct ioctl in GEOM */ >#define ERELOOKUP (-5) /* retry the directory lookup */ >#endif ># 195 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 > >#ifndef _KERNEL >#if 0 /* disabled by -frewrite-includes */ >#if __EXT1_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 198 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 >/* ISO/IEC 9899:2011 K.3.2.2 */ >#ifndef _ERRNO_T_DEFINED >#define _ERRNO_T_DEFINED >typedef int errno_t; >#endif ># 203 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 >#endif /* __EXT1_VISIBLE */ ># 204 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 >#endif ># 205 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 > >#endif ># 207 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/errno.h" 3 4 >#endif /* errno.h expanded by -frewrite-includes */ ># 32 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" 2 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdarg.h expanded by -frewrite-includes */ >#include <stdarg.h> >#else /* stdarg.h expanded by -frewrite-includes */ ># 32 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/stdarg.h" 1 3 4 >/*- > * This file is in the public domain. > */ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* stdarg.h expanded by -frewrite-includes */ >#include <x86/stdarg.h> >#else /* stdarg.h expanded by -frewrite-includes */ ># 5 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/stdarg.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/stdarg.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-2-Clause > * > * Copyright (c) 2017 Poul-Henning Kamp. All rights reserved. > * > * 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 AUTHOR 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 AUTHOR 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 _MACHINE_STDARG_H_ >#define _MACHINE_STDARG_H_ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _stdarg.h expanded by -frewrite-includes */ >#include <sys/_stdarg.h> >#else /* _stdarg.h expanded by -frewrite-includes */ ># 31 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/stdarg.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdarg.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 2002 David E. O'Brien. All rights reserved. > * > * 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 AUTHOR 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 AUTHOR 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 _SYS__STDARG_H_ >#define _SYS__STDARG_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 34 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdarg.h" 3 4 ># 35 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdarg.h" 3 4 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdarg.h" 3 4 ># 36 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdarg.h" 3 4 > >#ifndef _VA_LIST_DECLARED > #define _VA_LIST_DECLARED > typedef __va_list va_list; >#endif ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdarg.h" 3 4 > >#define va_start(ap, last) __builtin_va_start((ap), (last)) >#define va_arg(ap, type) __builtin_va_arg((ap), type) >#define __va_copy(dest, src) __builtin_va_copy((dest), (src)) >#if 0 /* disabled by -frewrite-includes */ >#if __ISO_C_VISIBLE >= 1999 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 46 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdarg.h" 3 4 > #define va_copy(dest, src) __va_copy(dest, src) >#endif ># 48 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdarg.h" 3 4 >#define va_end(ap) __builtin_va_end(ap) > >#endif /* ! _SYS__STDARG_H_ */ ># 51 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_stdarg.h" 3 4 >#endif /* _stdarg.h expanded by -frewrite-includes */ ># 32 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/stdarg.h" 2 3 4 > >#ifndef va_start > #error this file needs to be ported to your compiler >#endif ># 36 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/stdarg.h" 3 4 > >#endif /* !_MACHINE_STDARG_H_ */ ># 38 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/stdarg.h" 3 4 >#endif /* stdarg.h expanded by -frewrite-includes */ ># 6 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/stdarg.h" 2 3 4 >#endif /* stdarg.h expanded by -frewrite-includes */ ># 33 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" 2 >#if defined(__CLANG_REWRITTEN_INCLUDES) /* stdlib.h expanded by -frewrite-includes */ >#include <stdlib.h> >#else /* stdlib.h expanded by -frewrite-includes */ ># 33 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" ># 1 "/home/markj/sb/main/src/include/stdlib.h" 1 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1990, 1993 > * The Regents of the University of California. All rights reserved. > * > * 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. > */ > >#ifndef _STDLIB_H_ >#define _STDLIB_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 35 "/home/markj/sb/main/src/include/stdlib.h" ># 36 "/home/markj/sb/main/src/include/stdlib.h" >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* _null.h expanded by -frewrite-includes */ >#include <sys/_null.h> >#else /* _null.h expanded by -frewrite-includes */ ># 36 "/home/markj/sb/main/src/include/stdlib.h" ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_null.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-2-Clause > * > * Copyright (c) 2003 Marcel Moolenaar > * All rights reserved. > * > * 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 AUTHOR ``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 AUTHOR 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 NULL > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 32 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_null.h" 3 4 >#define NULL ((void *)0) >#else ># 34 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_null.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 35 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_null.h" 3 4 >#define NULL nullptr >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4 >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 37 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_null.h" 3 4 >#define NULL __null >#else ># 39 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_null.h" 3 4 >#if 0 /* disabled by -frewrite-includes */ >#if defined(__LP64__) >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 40 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_null.h" 3 4 >#define NULL (0L) >#else ># 42 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_null.h" 3 4 >#define NULL 0 >#endif /* __LP64__ */ ># 44 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_null.h" 3 4 >#endif /* __GNUG__ */ ># 45 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_null.h" 3 4 >#endif /* !__cplusplus */ ># 46 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_null.h" 3 4 > >#endif ># 48 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/sys/_null.h" 3 4 >#endif /* _null.h expanded by -frewrite-includes */ ># 37 "/home/markj/sb/main/src/include/stdlib.h" 2 >#if 0 /* expanded by -frewrite-includes */ >#include <sys/_types.h> >#endif /* expanded by -frewrite-includes */ ># 37 "/home/markj/sb/main/src/include/stdlib.h" ># 38 "/home/markj/sb/main/src/include/stdlib.h" > >__NULLABILITY_PRAGMA_PUSH > >#ifndef _SIZE_T_DECLARED >typedef __size_t size_t; >#define _SIZE_T_DECLARED >#endif ># 45 "/home/markj/sb/main/src/include/stdlib.h" > >#ifndef __cplusplus >#ifndef _WCHAR_T_DECLARED >typedef ___wchar_t wchar_t; >#define _WCHAR_T_DECLARED >#endif ># 51 "/home/markj/sb/main/src/include/stdlib.h" >#endif ># 52 "/home/markj/sb/main/src/include/stdlib.h" > >typedef struct { > int quot; /* quotient */ > int rem; /* remainder */ >} div_t; > >typedef struct { > long quot; > long rem; >} ldiv_t; > >#define EXIT_FAILURE 1 >#define EXIT_SUCCESS 0 > >/* > * I.e., INT_MAX; rand(3) returns a signed integer but must produce output in > * the range [0, RAND_MAX], so half of the possible output range is unused. > */ >#define RAND_MAX 0x7fffffff > >#if 0 /* disabled by -frewrite-includes */ >#if !defined(_STANDALONE) && defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 73 "/home/markj/sb/main/src/include/stdlib.h" >#if 0 /* expanded by -frewrite-includes */ >#include <ssp/stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 73 "/home/markj/sb/main/src/include/stdlib.h" ># 74 "/home/markj/sb/main/src/include/stdlib.h" >#endif ># 75 "/home/markj/sb/main/src/include/stdlib.h" > >__BEGIN_DECLS >#ifdef _XLOCALE_H_ >#if 0 /* expanded by -frewrite-includes */ >#include <xlocale/_stdlib.h> >#endif /* expanded by -frewrite-includes */ ># 78 "/home/markj/sb/main/src/include/stdlib.h" ># 79 "/home/markj/sb/main/src/include/stdlib.h" >#endif ># 80 "/home/markj/sb/main/src/include/stdlib.h" >extern int __mb_cur_max; >extern int ___mb_cur_max(void); >#define MB_CUR_MAX ((size_t)___mb_cur_max()) > >_Noreturn void abort(void) __noexcept; >int abs(int) __pure2; >int atexit(void (* _Nonnull)(void)) __noexcept; >double atof(const char *); >int atoi(const char *); >long atol(const char *); >void *bsearch(const void *, const void *, size_t, > size_t, int (*)(const void * _Nonnull, const void *)); >void *calloc(size_t, size_t) __malloc_like __result_use_check > __alloc_size2(1, 2); >div_t div(int, int) __pure2; >_Noreturn void exit(int); >void free(void *); >char *getenv(const char *); >long labs(long) __pure2; >ldiv_t ldiv(long, long) __pure2; >void *malloc(size_t) __malloc_like __result_use_check __alloc_size(1); >int mblen(const char *, size_t); >size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); >int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); >void qsort(void *, size_t, size_t, > int (* _Nonnull)(const void *, const void *)); >int rand(void); >void *realloc(void *, size_t) __result_use_check __alloc_size(2); >void srand(unsigned); >double strtod(const char * __restrict, char ** __restrict); >float strtof(const char * __restrict, char ** __restrict); >long strtol(const char * __restrict, char ** __restrict, int); >long double > strtold(const char * __restrict, char ** __restrict); >unsigned long > strtoul(const char * __restrict, char ** __restrict, int); >int system(const char *); >int wctomb(char *, wchar_t); >size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); > >/* > * Functions added in C99 which we make conditionally available in the > * BSD^C89 namespace if the compiler supports `long long'. > * The #if test is more complicated than it ought to be because > * __BSD_VISIBLE implies __ISO_C_VISIBLE == 1999 *even if* `long long' > * is not supported in the compilation environment (which therefore means > * that it can't really be ISO C99). > * > * (The only other extension made by C99 in this header is _Exit().) > */ >#if 0 /* disabled by -frewrite-includes */ >#if __ISO_C_VISIBLE >= 1999 || defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 131 "/home/markj/sb/main/src/include/stdlib.h" >#ifdef __LONG_LONG_SUPPORTED >/* LONGLONG */ >typedef struct { > long long quot; > long long rem; >} lldiv_t; > >/* LONGLONG */ >long long > atoll(const char *); >/* LONGLONG */ >long long > llabs(long long) __pure2; >/* LONGLONG */ >lldiv_t lldiv(long long, long long) __pure2; >/* LONGLONG */ >long long > strtoll(const char * __restrict, char ** __restrict, int); >/* LONGLONG */ >unsigned long long > strtoull(const char * __restrict, char ** __restrict, int); >#endif /* __LONG_LONG_SUPPORTED */ ># 153 "/home/markj/sb/main/src/include/stdlib.h" > >_Noreturn void _Exit(int) __noexcept; >#endif /* __ISO_C_VISIBLE >= 1999 */ ># 156 "/home/markj/sb/main/src/include/stdlib.h" > >/* > * If we're in a mode greater than C99, expose C11 functions. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 161 "/home/markj/sb/main/src/include/stdlib.h" >void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1) > __alloc_size(2); >int at_quick_exit(void (*)(void)) __noexcept; >_Noreturn void > quick_exit(int) /* __noexcept -- not ready ABI issues? */; >#endif /* __ISO_C_VISIBLE >= 2011 */ ># 167 "/home/markj/sb/main/src/include/stdlib.h" >/* > * Extensions made by POSIX relative to C. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 171 "/home/markj/sb/main/src/include/stdlib.h" >char *realpath(const char * __restrict, char * __restrict); >#endif ># 173 "/home/markj/sb/main/src/include/stdlib.h" >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 199506 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 174 "/home/markj/sb/main/src/include/stdlib.h" >int rand_r(unsigned *); /* (TSF) */ >#endif ># 176 "/home/markj/sb/main/src/include/stdlib.h" >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200112 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 177 "/home/markj/sb/main/src/include/stdlib.h" >int posix_memalign(void **, size_t, size_t); /* (ADV) */ >int setenv(const char *, const char *, int); >int unsetenv(const char *); >#endif ># 181 "/home/markj/sb/main/src/include/stdlib.h" > >#if 0 /* disabled by -frewrite-includes */ >#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 183 "/home/markj/sb/main/src/include/stdlib.h" >int getsubopt(char **, char *const *, char **); >#ifndef _MKDTEMP_DECLARED >char *mkdtemp(char *); >#define _MKDTEMP_DECLARED >#endif ># 188 "/home/markj/sb/main/src/include/stdlib.h" >#ifndef _MKSTEMP_DECLARED >int mkstemp(char *); >#define _MKSTEMP_DECLARED >#endif ># 192 "/home/markj/sb/main/src/include/stdlib.h" >#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */ ># 193 "/home/markj/sb/main/src/include/stdlib.h" > >/* > * The only changes to the XSI namespace in revision 6 were the deletion > * of the ttyslot() and valloc() functions, which FreeBSD never declared > * in this header. For revision 7, ecvt(), fcvt(), and gcvt(), which > * FreeBSD also does not have, and mktemp(), are to be deleted. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 201 "/home/markj/sb/main/src/include/stdlib.h" >/* XXX XSI requires pollution from <sys/wait.h> here. We'd rather not. */ >long a64l(const char *); >double drand48(void); >/* char *ecvt(double, int, int * __restrict, int * __restrict); */ >double erand48(unsigned short[3]); >/* char *fcvt(double, int, int * __restrict, int * __restrict); */ >/* char *gcvt(double, int, int * __restrict, int * __restrict); */ >char *initstate(unsigned int, char *, size_t); >long jrand48(unsigned short[3]); >char *l64a(long); >void lcong48(unsigned short[7]); >long lrand48(void); >#if 0 /* disabled by -frewrite-includes */ >#if !defined(_MKTEMP_DECLARED) && (__BSD_VISIBLE || __XSI_VISIBLE <= 600) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 214 "/home/markj/sb/main/src/include/stdlib.h" >char *mktemp(char *); >#define _MKTEMP_DECLARED >#endif ># 217 "/home/markj/sb/main/src/include/stdlib.h" >long mrand48(void); >long nrand48(unsigned short[3]); >int putenv(char *); >long random(void); >unsigned short > *seed48(unsigned short[3]); >char *setstate(/* const */ char *); >void srand48(long); >void srandom(unsigned int); >#endif /* __XSI_VISIBLE */ ># 227 "/home/markj/sb/main/src/include/stdlib.h" > >#if 0 /* disabled by -frewrite-includes */ >#if __XSI_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 229 "/home/markj/sb/main/src/include/stdlib.h" >int grantpt(int); >int posix_openpt(int); >char *ptsname(int); >int unlockpt(int); >#endif /* __XSI_VISIBLE */ ># 234 "/home/markj/sb/main/src/include/stdlib.h" >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 235 "/home/markj/sb/main/src/include/stdlib.h" >/* ptsname_r will be included in POSIX issue 8 */ >int ptsname_r(int, char *, size_t); >#endif ># 238 "/home/markj/sb/main/src/include/stdlib.h" > >#if 0 /* disabled by -frewrite-includes */ >#if __BSD_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 240 "/home/markj/sb/main/src/include/stdlib.h" >extern const char *malloc_conf; >extern void (*malloc_message)(void *, const char *); > >/* > * The alloca() function can't be implemented in C, and on some > * platforms it can't be implemented at all as a callable function. > * The GNU C compiler provides a built-in alloca() which we can use. > * On platforms where alloca() is not in libc, programs which use it > * will fail to link when compiled with non-GNU compilers. > */ >#if 0 /* disabled by -frewrite-includes */ >#if __GNUC__ >= 2 >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 251 "/home/markj/sb/main/src/include/stdlib.h" >#undef alloca /* some GNU bits try to get cute and define this on their own */ >#define alloca(sz) __builtin_alloca(sz) >#endif ># 254 "/home/markj/sb/main/src/include/stdlib.h" > >void abort2(const char *, int, void **) __dead2; >__uint32_t > arc4random(void); >void arc4random_buf(void *, size_t); >__uint32_t > arc4random_uniform(__uint32_t); > >#ifdef __BLOCKS__ >int atexit_b(void (^ _Nonnull)(void)); >void *bsearch_b(const void *, const void *, size_t, > size_t, int (^ _Nonnull)(const void *, const void *)); >#endif ># 267 "/home/markj/sb/main/src/include/stdlib.h" >char *getbsize(int *, long *); > /* getcap(3) functions */ >char *cgetcap(char *, const char *, int); >int cgetclose(void); >int cgetent(char **, char **, const char *); >int cgetfirst(char **, char **); >int cgetmatch(const char *, const char *); >int cgetnext(char **, char **); >int cgetnum(char *, const char *, long *); >int cgetset(const char *); >int cgetstr(char *, const char *, char **); >int cgetustr(char *, const char *, char **); > >int clearenv(void); > >int daemon(int, int); >int daemonfd(int, int); >char *devname(__dev_t, __mode_t); >char *devname_r(__dev_t, __mode_t, char *, int); >char *fdevname(int); >char *fdevname_r(int, char *, int); >int getloadavg(double [], int); >const char * > getprogname(void); > >int heapsort(void *, size_t, size_t, > int (* _Nonnull)(const void *, const void *)); >#ifdef __BLOCKS__ >int heapsort_b(void *, size_t, size_t, > int (^ _Nonnull)(const void *, const void *)); >void qsort_b(void *, size_t, size_t, > int (^ _Nonnull)(const void *, const void *)); >#endif ># 300 "/home/markj/sb/main/src/include/stdlib.h" >int l64a_r(long, char *, int); >int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); >#ifdef __BLOCKS__ >int mergesort_b(void *, size_t, size_t, int (^)(const void *, const void *)); >#endif ># 305 "/home/markj/sb/main/src/include/stdlib.h" >int mkostemp(char *, int); >int mkostemps(char *, int, int); >int mkostempsat(int, char *, int, int); >void qsort_r(void *, size_t, size_t, > int (*)(const void *, const void *, void *), void *); >int radixsort(const unsigned char **, int, const unsigned char *, > unsigned); >void *reallocarray(void *, size_t, size_t) __result_use_check > __alloc_size2(2, 3); >void *reallocf(void *, size_t) __result_use_check __alloc_size(2); >int rpmatch(const char *); >char *secure_getenv(const char *); >void setprogname(const char *); >int sradixsort(const unsigned char **, int, const unsigned char *, > unsigned); >void srandomdev(void); >long long > strtonum(const char *, long long, long long, const char **); > >/* Deprecated interfaces, to be removed. */ >__int64_t > strtoq(const char *, char **, int); >__uint64_t > strtouq(const char *, char **, int); > >/* > * In FreeBSD 14, the prototype of qsort_r() was modified to comply with > * POSIX. The standardized qsort_r()'s order of last two parameters was > * changed, and the comparator function is now taking thunk as its last > * parameter, and both are different from the ones expected by the historical > * FreeBSD qsort_r() interface. > * > * Apply a workaround where we explicitly link against the historical interface, > * qsort_r@FBSD_1.0, in case when qsort_r() is called with the last parameter > * with a function pointer that exactly matches the historical FreeBSD qsort_r() > * comparator signature, so applications written for the historical interface > * can continue to work without modification. Toolchains that don't support > * symbol versioning don't define __sym_compat, so only provide this symbol in > * supported environments. > */ >#ifdef __sym_compat >#if 0 /* disabled by -frewrite-includes */ >#if defined(__generic) || defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 347 "/home/markj/sb/main/src/include/stdlib.h" >void __qsort_r_compat(void *, size_t, size_t, void *, > int (*)(void *, const void *, const void *)); >__sym_compat(qsort_r, __qsort_r_compat, FBSD_1.0); >#endif ># 351 "/home/markj/sb/main/src/include/stdlib.h" >#endif ># 352 "/home/markj/sb/main/src/include/stdlib.h" >#if 0 /* disabled by -frewrite-includes */ >#if defined(__generic) && !defined(__cplusplus) >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 353 "/home/markj/sb/main/src/include/stdlib.h" >#define qsort_r(base, nel, width, arg4, arg5) \ > __generic(arg5, int (*)(void *, const void *, const void *), \ > __qsort_r_compat, qsort_r)(base, nel, width, arg4, arg5) >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif defined(__cplusplus) && defined(__sym_compat) >#endif >#endif /* disabled by -frewrite-includes */ >#elif 0 /* evaluated by -frewrite-includes */ ># 357 "/home/markj/sb/main/src/include/stdlib.h" >__END_DECLS >extern "C++" { >static inline void qsort_r(void *base, size_t nmemb, size_t size, > void *thunk, int (*compar)(void *, const void *, const void *)) { > __qsort_r_compat(base, nmemb, size, thunk, compar); >} >} >__BEGIN_DECLS >#endif ># 366 "/home/markj/sb/main/src/include/stdlib.h" > >extern char *suboptarg; /* getsubopt(3) external variable */ >#endif /* __BSD_VISIBLE */ ># 369 "/home/markj/sb/main/src/include/stdlib.h" > >#if 0 /* disabled by -frewrite-includes */ >#if __EXT1_VISIBLE >#endif >#endif /* disabled by -frewrite-includes */ >#if 1 /* evaluated by -frewrite-includes */ ># 371 "/home/markj/sb/main/src/include/stdlib.h" > >#ifndef _RSIZE_T_DEFINED >#define _RSIZE_T_DEFINED >typedef size_t rsize_t; >#endif ># 376 "/home/markj/sb/main/src/include/stdlib.h" > >#ifndef _ERRNO_T_DEFINED >#define _ERRNO_T_DEFINED >typedef int errno_t; >#endif ># 381 "/home/markj/sb/main/src/include/stdlib.h" > >/* K.3.6 */ >typedef void (*constraint_handler_t)(const char * __restrict, > void * __restrict, errno_t); >/* K.3.6.1.1 */ >constraint_handler_t set_constraint_handler_s(constraint_handler_t handler); >/* K.3.6.1.2 */ >_Noreturn void abort_handler_s(const char * __restrict, void * __restrict, > errno_t); >/* K3.6.1.3 */ >void ignore_handler_s(const char * __restrict, void * __restrict, errno_t); >/* K.3.6.3.2 */ >errno_t qsort_s(void *, rsize_t, rsize_t, > int (*)(const void *, const void *, void *), void *); >#endif /* __EXT1_VISIBLE */ ># 396 "/home/markj/sb/main/src/include/stdlib.h" > >__END_DECLS >__NULLABILITY_PRAGMA_POP > >#endif /* !_STDLIB_H_ */ ># 401 "/home/markj/sb/main/src/include/stdlib.h" >#endif /* stdlib.h expanded by -frewrite-includes */ ># 34 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" 2 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* cpufunc.h expanded by -frewrite-includes */ >#include <machine/cpufunc.h> >#else /* cpufunc.h expanded by -frewrite-includes */ ># 34 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/cpufunc.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 2003 Peter Wemm. > * Copyright (c) 1993 The Regents of the University of California. > * All rights reserved. > * > * 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. > */ > >/* > * Functions to provide access to special i386 instructions. > * This in included in sys/systm.h, and that file should be > * used in preference to this. > */ > >#ifdef __i386__ >#if 0 /* expanded by -frewrite-includes */ >#include <i386/cpufunc.h> >#endif /* expanded by -frewrite-includes */ ># 40 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/cpufunc.h" 3 4 ># 41 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/cpufunc.h" 3 4 >#else /* !__i386__ */ ># 42 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/cpufunc.h" 3 4 > >#ifndef _MACHINE_CPUFUNC_H_ >#define _MACHINE_CPUFUNC_H_ > >struct region_descriptor; > >#define readb(va) (*(volatile uint8_t *) (va)) >#define readw(va) (*(volatile uint16_t *) (va)) >#define readl(va) (*(volatile uint32_t *) (va)) >#define readq(va) (*(volatile uint64_t *) (va)) > >#define writeb(va, d) (*(volatile uint8_t *) (va) = (d)) >#define writew(va, d) (*(volatile uint16_t *) (va) = (d)) >#define writel(va, d) (*(volatile uint32_t *) (va) = (d)) >#define writeq(va, d) (*(volatile uint64_t *) (va) = (d)) > >static __inline void >breakpoint(void) >{ > __asm __volatile("int $3"); >} > >#define bsfl(mask) __builtin_ctz(mask) > >#define bsfq(mask) __builtin_ctzl(mask) > >static __inline void >clflush(u_long addr) >{ > > __asm __volatile("clflush %0" : : "m" (*(char *)addr)); >} > >static __inline void >clflushopt(u_long addr) >{ > > __asm __volatile(".byte 0x66;clflush %0" : : "m" (*(char *)addr)); >} > >static __inline void >clwb(u_long addr) >{ > > __asm __volatile("clwb %0" : : "m" (*(char *)addr)); >} > >static __inline void >clts(void) >{ > > __asm __volatile("clts"); >} > >static __inline void >disable_intr(void) >{ > __asm __volatile("cli" : : : "memory"); >} > >static __inline void >do_cpuid(u_int ax, u_int *p) >{ > __asm __volatile("cpuid" > : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) > : "0" (ax)); >} > >static __inline void >cpuid_count(u_int ax, u_int cx, u_int *p) >{ > __asm __volatile("cpuid" > : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) > : "0" (ax), "c" (cx)); >} > >static __inline void >enable_intr(void) >{ > __asm __volatile("sti"); >} > >static __inline void >halt(void) >{ > __asm __volatile("hlt"); >} > >static __inline u_char >inb(u_int port) >{ > u_char data; > > __asm __volatile("inb %w1, %0" : "=a" (data) : "Nd" (port)); > return (data); >} > >static __inline u_int >inl(u_int port) >{ > u_int data; > > __asm __volatile("inl %w1, %0" : "=a" (data) : "Nd" (port)); > return (data); >} > >static __inline void >insb(u_int port, void *addr, size_t count) >{ > __asm __volatile("rep; insb" > : "+D" (addr), "+c" (count) > : "d" (port) > : "memory"); >} > >static __inline void >insw(u_int port, void *addr, size_t count) >{ > __asm __volatile("rep; insw" > : "+D" (addr), "+c" (count) > : "d" (port) > : "memory"); >} > >static __inline void >insl(u_int port, void *addr, size_t count) >{ > __asm __volatile("rep; insl" > : "+D" (addr), "+c" (count) > : "d" (port) > : "memory"); >} > >static __inline void >invd(void) >{ > __asm __volatile("invd"); >} > >static __inline u_short >inw(u_int port) >{ > u_short data; > > __asm __volatile("inw %w1, %0" : "=a" (data) : "Nd" (port)); > return (data); >} > >static __inline void >outb(u_int port, u_char data) >{ > __asm __volatile("outb %0, %w1" : : "a" (data), "Nd" (port)); >} > >static __inline void >outl(u_int port, u_int data) >{ > __asm __volatile("outl %0, %w1" : : "a" (data), "Nd" (port)); >} > >static __inline void >outsb(u_int port, const void *addr, size_t count) >{ > __asm __volatile("rep; outsb" > : "+S" (addr), "+c" (count) > : "d" (port)); >} > >static __inline void >outsw(u_int port, const void *addr, size_t count) >{ > __asm __volatile("rep; outsw" > : "+S" (addr), "+c" (count) > : "d" (port)); >} > >static __inline void >outsl(u_int port, const void *addr, size_t count) >{ > __asm __volatile("rep; outsl" > : "+S" (addr), "+c" (count) > : "d" (port)); >} > >static __inline void >outw(u_int port, u_short data) >{ > __asm __volatile("outw %0, %w1" : : "a" (data), "Nd" (port)); >} > >static __inline u_long >popcntq(u_long mask) >{ > u_long result; > > __asm __volatile("popcntq %1,%0" : "=r" (result) : "rm" (mask)); > return (result); >} > >static __inline void >lfence(void) >{ > > __asm __volatile("lfence" : : : "memory"); >} > >static __inline void >mfence(void) >{ > > __asm __volatile("mfence" : : : "memory"); >} > >static __inline void >sfence(void) >{ > > __asm __volatile("sfence" : : : "memory"); >} > >static __inline void >ia32_pause(void) >{ > __asm __volatile("pause"); >} > >static __inline u_long >read_rflags(void) >{ > u_long rf; > > __asm __volatile("pushfq; popq %0" : "=r" (rf)); > return (rf); >} > >static __inline uint64_t >rdmsr(u_int msr) >{ > uint32_t low, high; > > __asm __volatile("rdmsr" : "=a" (low), "=d" (high) : "c" (msr)); > return (low | ((uint64_t)high << 32)); >} > >static __inline uint32_t >rdmsr32(u_int msr) >{ > uint32_t low; > > __asm __volatile("rdmsr" : "=a" (low) : "c" (msr) : "rdx"); > return (low); >} > >static __inline uint64_t >rdpmc(u_int pmc) >{ > uint32_t low, high; > > __asm __volatile("rdpmc" : "=a" (low), "=d" (high) : "c" (pmc)); > return (low | ((uint64_t)high << 32)); >} > >static __inline uint64_t >rdtsc(void) >{ > uint32_t low, high; > > __asm __volatile("rdtsc" : "=a" (low), "=d" (high)); > return (low | ((uint64_t)high << 32)); >} > >static __inline uint64_t >rdtsc_ordered_lfence(void) >{ > lfence(); > return (rdtsc()); >} > >static __inline uint64_t >rdtsc_ordered_mfence(void) >{ > mfence(); > return (rdtsc()); >} > >static __inline uint64_t >rdtscp(void) >{ > uint32_t low, high; > > __asm __volatile("rdtscp" : "=a" (low), "=d" (high) : : "ecx"); > return (low | ((uint64_t)high << 32)); >} > >static __inline uint64_t >rdtscp_aux(uint32_t *aux) >{ > uint32_t low, high; > > __asm __volatile("rdtscp" : "=a" (low), "=d" (high), "=c" (*aux)); > return (low | ((uint64_t)high << 32)); >} > >static __inline uint32_t >rdtsc32(void) >{ > uint32_t rv; > > __asm __volatile("rdtsc" : "=a" (rv) : : "edx"); > return (rv); >} > >static __inline uint32_t >rdtscp32(void) >{ > uint32_t rv; > > __asm __volatile("rdtscp" : "=a" (rv) : : "ecx", "edx"); > return (rv); >} > >static __inline void >wbinvd(void) >{ > __asm __volatile("wbinvd"); >} > >static __inline void >write_rflags(u_long rf) >{ > __asm __volatile("pushq %0; popfq" : : "r" (rf)); >} > >static __inline void >wrmsr(u_int msr, uint64_t newval) >{ > uint32_t low, high; > > low = newval; > high = newval >> 32; > __asm __volatile("wrmsr" : : "a" (low), "d" (high), "c" (msr)); >} > >static __inline void >load_cr0(u_long data) >{ > > __asm __volatile("movq %0,%%cr0" : : "r" (data)); >} > >static __inline u_long >rcr0(void) >{ > u_long data; > > __asm __volatile("movq %%cr0,%0" : "=r" (data)); > return (data); >} > >static __inline u_long >rcr2(void) >{ > u_long data; > > __asm __volatile("movq %%cr2,%0" : "=r" (data)); > return (data); >} > >static __inline void >load_cr3(u_long data) >{ > > __asm __volatile("movq %0,%%cr3" : : "r" (data) : "memory"); >} > >static __inline u_long >rcr3(void) >{ > u_long data; > > __asm __volatile("movq %%cr3,%0" : "=r" (data)); > return (data); >} > >static __inline void >load_cr4(u_long data) >{ > __asm __volatile("movq %0,%%cr4" : : "r" (data)); >} > >static __inline u_long >rcr4(void) >{ > u_long data; > > __asm __volatile("movq %%cr4,%0" : "=r" (data)); > return (data); >} > >static __inline u_long >rxcr(u_int reg) >{ > u_int low, high; > > __asm __volatile("xgetbv" : "=a" (low), "=d" (high) : "c" (reg)); > return (low | ((uint64_t)high << 32)); >} > >static __inline void >load_xcr(u_int reg, u_long val) >{ > u_int low, high; > > low = val; > high = val >> 32; > __asm __volatile("xsetbv" : : "c" (reg), "a" (low), "d" (high)); >} > >/* > * Global TLB flush (except for thise for pages marked PG_G) > */ >static __inline void >invltlb(void) >{ > > load_cr3(rcr3()); >} > >#ifndef CR4_PGE >#define CR4_PGE 0x00000080 /* Page global enable */ >#endif ># 473 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/cpufunc.h" 3 4 > >/* > * Perform the guaranteed invalidation of all TLB entries. This > * includes the global entries, and entries in all PCIDs, not only the > * current context. The function works both on non-PCID CPUs and CPUs > * with the PCID turned off or on. See IA-32 SDM Vol. 3a 4.10.4.1 > * Operations that Invalidate TLBs and Paging-Structure Caches. > */ >static __inline void >invltlb_glob(void) >{ > uint64_t cr4; > > cr4 = rcr4(); > load_cr4(cr4 & ~CR4_PGE); > /* > * Although preemption at this point could be detrimental to > * performance, it would not lead to an error. PG_G is simply > * ignored if CR4.PGE is clear. Moreover, in case this block > * is re-entered, the load_cr4() either above or below will > * modify CR4.PGE flushing the TLB. > */ > load_cr4(cr4 | CR4_PGE); >} > >/* > * TLB flush for an individual page (even if it has PG_G). > * Only works on 486+ CPUs (i386 does not have PG_G). > */ >static __inline void >invlpg(u_long addr) >{ > > __asm __volatile("invlpg %0" : : "m" (*(char *)addr) : "memory"); >} > >#define INVPCID_ADDR 0 >#define INVPCID_CTX 1 >#define INVPCID_CTXGLOB 2 >#define INVPCID_ALLCTX 3 > >struct invpcid_descr { > uint64_t pcid:12 __packed; > uint64_t pad:52 __packed; > uint64_t addr; >} __packed; > >static __inline void >invpcid(struct invpcid_descr *d, int type) >{ > > __asm __volatile("invpcid (%0),%1" > : : "r" (d), "r" ((u_long)type) : "memory"); >} > >#define INVLPGB_VA 0x0001 >#define INVLPGB_PCID 0x0002 >#define INVLPGB_ASID 0x0004 >#define INVLPGB_GLOB 0x0008 >#define INVLPGB_FIN 0x0010 >#define INVLPGB_NEST 0x0020 > >#define INVLPGB_DESCR(asid, pcid) (((pcid) << 16) | (asid)) > >#define INVLPGB_2M_CNT (1u << 31) > >static __inline void >invlpgb(uint64_t rax, uint32_t edx, uint32_t ecx) >{ > __asm __volatile("invlpgb" : : "a" (rax), "d" (edx), "c" (ecx)); >} > >static __inline void >tlbsync(void) >{ > __asm __volatile("tlbsync"); >} > >static __inline u_short >rfs(void) >{ > u_short sel; > __asm __volatile("movw %%fs,%0" : "=rm" (sel)); > return (sel); >} > >static __inline u_short >rgs(void) >{ > u_short sel; > __asm __volatile("movw %%gs,%0" : "=rm" (sel)); > return (sel); >} > >static __inline u_short >rss(void) >{ > u_short sel; > __asm __volatile("movw %%ss,%0" : "=rm" (sel)); > return (sel); >} > >static __inline void >load_ds(u_short sel) >{ > __asm __volatile("movw %0,%%ds" : : "rm" (sel)); >} > >static __inline void >load_es(u_short sel) >{ > __asm __volatile("movw %0,%%es" : : "rm" (sel)); >} > >static __inline void >cpu_monitor(const void *addr, u_long extensions, u_int hints) >{ > > __asm __volatile("monitor" > : : "a" (addr), "c" (extensions), "d" (hints)); >} > >static __inline void >cpu_mwait(u_long extensions, u_int hints) >{ > > __asm __volatile("mwait" : : "a" (hints), "c" (extensions)); >} > >static __inline uint32_t >rdpkru(void) >{ > uint32_t res; > > __asm __volatile("rdpkru" : "=a" (res) : "c" (0) : "edx"); > return (res); >} > >static __inline void >wrpkru(uint32_t mask) >{ > > __asm __volatile("wrpkru" : : "a" (mask), "c" (0), "d" (0)); >} > >#ifdef _KERNEL >/* This is defined in <machine/specialreg.h> but is too painful to get to */ >#ifndef MSR_FSBASE >#define MSR_FSBASE 0xc0000100 >#endif ># 623 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/cpufunc.h" 3 4 >static __inline void >load_fs(u_short sel) >{ > /* Preserve the fsbase value across the selector load */ > __asm __volatile("rdmsr; movw %0,%%fs; wrmsr" > : : "rm" (sel), "c" (MSR_FSBASE) : "eax", "edx"); >} > >#ifndef MSR_GSBASE >#define MSR_GSBASE 0xc0000101 >#endif ># 634 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/cpufunc.h" 3 4 >static __inline void >load_gs(u_short sel) >{ > /* > * Preserve the gsbase value across the selector load. > * Note that we have to disable interrupts because the gsbase > * being trashed happens to be the kernel gsbase at the time. > */ > __asm __volatile("pushfq; cli; rdmsr; movw %0,%%gs; wrmsr; popfq" > : : "rm" (sel), "c" (MSR_GSBASE) : "eax", "edx"); >} >#else ># 646 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/cpufunc.h" 3 4 >/* Usable by userland */ >static __inline void >load_fs(u_short sel) >{ > __asm __volatile("movw %0,%%fs" : : "rm" (sel)); >} > >static __inline void >load_gs(u_short sel) >{ > __asm __volatile("movw %0,%%gs" : : "rm" (sel)); >} >#endif ># 659 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/cpufunc.h" 3 4 > >static __inline uint64_t >rdfsbase(void) >{ > uint64_t x; > > __asm __volatile("rdfsbase %0" : "=r" (x)); > return (x); >} > >static __inline void >wrfsbase(uint64_t x) >{ > > __asm __volatile("wrfsbase %0" : : "r" (x)); >} > >static __inline uint64_t >rdgsbase(void) >{ > uint64_t x; > > __asm __volatile("rdgsbase %0" : "=r" (x)); > return (x); >} > >static __inline void >wrgsbase(uint64_t x) >{ > > __asm __volatile("wrgsbase %0" : : "r" (x)); >} > >static __inline void >bare_lgdt(struct region_descriptor *addr) >{ > __asm __volatile("lgdt (%0)" : : "r" (addr)); >} > >static __inline void >sgdt(struct region_descriptor *addr) >{ > char *loc; > > loc = (char *)addr; > __asm __volatile("sgdt %0" : "=m" (*loc) : : "memory"); >} > >static __inline void >lidt(struct region_descriptor *addr) >{ > __asm __volatile("lidt (%0)" : : "r" (addr)); >} > >static __inline void >sidt(struct region_descriptor *addr) >{ > char *loc; > > loc = (char *)addr; > __asm __volatile("sidt %0" : "=m" (*loc) : : "memory"); >} > >static __inline void >lldt(u_short sel) >{ > __asm __volatile("lldt %0" : : "r" (sel)); >} > >static __inline u_short >sldt(void) >{ > u_short sel; > > __asm __volatile("sldt %0" : "=r" (sel)); > return (sel); >} > >static __inline void >ltr(u_short sel) >{ > __asm __volatile("ltr %0" : : "r" (sel)); >} > >static __inline uint32_t >read_tr(void) >{ > u_short sel; > > __asm __volatile("str %0" : "=r" (sel)); > return (sel); >} > >static __inline uint64_t >rdr0(void) >{ > uint64_t data; > __asm __volatile("movq %%dr0,%0" : "=r" (data)); > return (data); >} > >static __inline void >load_dr0(uint64_t dr0) >{ > __asm __volatile("movq %0,%%dr0" : : "r" (dr0)); >} > >static __inline uint64_t >rdr1(void) >{ > uint64_t data; > __asm __volatile("movq %%dr1,%0" : "=r" (data)); > return (data); >} > >static __inline void >load_dr1(uint64_t dr1) >{ > __asm __volatile("movq %0,%%dr1" : : "r" (dr1)); >} > >static __inline uint64_t >rdr2(void) >{ > uint64_t data; > __asm __volatile("movq %%dr2,%0" : "=r" (data)); > return (data); >} > >static __inline void >load_dr2(uint64_t dr2) >{ > __asm __volatile("movq %0,%%dr2" : : "r" (dr2)); >} > >static __inline uint64_t >rdr3(void) >{ > uint64_t data; > __asm __volatile("movq %%dr3,%0" : "=r" (data)); > return (data); >} > >static __inline void >load_dr3(uint64_t dr3) >{ > __asm __volatile("movq %0,%%dr3" : : "r" (dr3)); >} > >static __inline uint64_t >rdr6(void) >{ > uint64_t data; > __asm __volatile("movq %%dr6,%0" : "=r" (data)); > return (data); >} > >static __inline void >load_dr6(uint64_t dr6) >{ > __asm __volatile("movq %0,%%dr6" : : "r" (dr6)); >} > >static __inline uint64_t >rdr7(void) >{ > uint64_t data; > __asm __volatile("movq %%dr7,%0" : "=r" (data)); > return (data); >} > >static __inline void >load_dr7(uint64_t dr7) >{ > __asm __volatile("movq %0,%%dr7" : : "r" (dr7)); >} > >static __inline register_t >intr_disable(void) >{ > register_t rflags; > > rflags = read_rflags(); > disable_intr(); > return (rflags); >} > >static __inline void >intr_restore(register_t rflags) >{ > write_rflags(rflags); >} > >static __inline void >stac(void) >{ > > __asm __volatile("stac" : : : "cc"); >} > >static __inline void >clac(void) >{ > > __asm __volatile("clac" : : : "cc"); >} > >enum { > SGX_ECREATE = 0x0, > SGX_EADD = 0x1, > SGX_EINIT = 0x2, > SGX_EREMOVE = 0x3, > SGX_EDGBRD = 0x4, > SGX_EDGBWR = 0x5, > SGX_EEXTEND = 0x6, > SGX_ELDU = 0x8, > SGX_EBLOCK = 0x9, > SGX_EPA = 0xA, > SGX_EWB = 0xB, > SGX_ETRACK = 0xC, >}; > >enum { > SGX_PT_SECS = 0x00, > SGX_PT_TCS = 0x01, > SGX_PT_REG = 0x02, > SGX_PT_VA = 0x03, > SGX_PT_TRIM = 0x04, >}; > >int sgx_encls(uint32_t eax, uint64_t rbx, uint64_t rcx, uint64_t rdx); > >static __inline int >sgx_ecreate(void *pginfo, void *secs) >{ > > return (sgx_encls(SGX_ECREATE, (uint64_t)pginfo, > (uint64_t)secs, 0)); >} > >static __inline int >sgx_eadd(void *pginfo, void *epc) >{ > > return (sgx_encls(SGX_EADD, (uint64_t)pginfo, > (uint64_t)epc, 0)); >} > >static __inline int >sgx_einit(void *sigstruct, void *secs, void *einittoken) >{ > > return (sgx_encls(SGX_EINIT, (uint64_t)sigstruct, > (uint64_t)secs, (uint64_t)einittoken)); >} > >static __inline int >sgx_eextend(void *secs, void *epc) >{ > > return (sgx_encls(SGX_EEXTEND, (uint64_t)secs, > (uint64_t)epc, 0)); >} > >static __inline int >sgx_epa(void *epc) >{ > > return (sgx_encls(SGX_EPA, SGX_PT_VA, (uint64_t)epc, 0)); >} > >static __inline int >sgx_eldu(uint64_t rbx, uint64_t rcx, > uint64_t rdx) >{ > > return (sgx_encls(SGX_ELDU, rbx, rcx, rdx)); >} > >static __inline int >sgx_eremove(void *epc) >{ > > return (sgx_encls(SGX_EREMOVE, 0, (uint64_t)epc, 0)); >} > >void reset_dbregs(void); > >#ifdef _KERNEL >int rdmsr_safe(u_int msr, uint64_t *val); >int wrmsr_safe(u_int msr, uint64_t newval); >#endif ># 951 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/cpufunc.h" 3 4 > >#endif /* !_MACHINE_CPUFUNC_H_ */ ># 953 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/cpufunc.h" 3 4 > >#endif /* __i386__ */ ># 955 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/cpufunc.h" 3 4 >#endif /* cpufunc.h expanded by -frewrite-includes */ ># 35 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" 2 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* specialreg.h expanded by -frewrite-includes */ >#include <machine/specialreg.h> >#else /* specialreg.h expanded by -frewrite-includes */ ># 35 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/specialreg.h" 1 3 4 >/*- > * This file is in the public domain. > */ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* specialreg.h expanded by -frewrite-includes */ >#include <x86/specialreg.h> >#else /* specialreg.h expanded by -frewrite-includes */ ># 5 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/specialreg.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/specialreg.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1991 The Regents of the University of California. > * All rights reserved. > * > * 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. > */ > >#ifndef _MACHINE_SPECIALREG_H_ >#define _MACHINE_SPECIALREG_H_ > >/* > * Bits in 386 special registers: > */ >#define CR0_PE 0x00000001 /* Protected mode Enable */ >#define CR0_MP 0x00000002 /* "Math" (fpu) Present */ >#define CR0_EM 0x00000004 /* EMulate FPU instructions. (trap ESC only) */ >#define CR0_TS 0x00000008 /* Task Switched (if MP, trap ESC and WAIT) */ >#define CR0_PG 0x80000000 /* PaGing enable */ > >/* > * Bits in 486 special registers: > */ >#define CR0_NE 0x00000020 /* Numeric Error enable (EX16 vs IRQ13) */ >#define CR0_WP 0x00010000 /* Write Protect (honor page protect in > all modes) */ >#define CR0_AM 0x00040000 /* Alignment Mask (set to enable AC flag) */ >#define CR0_NW 0x20000000 /* Not Write-through */ >#define CR0_CD 0x40000000 /* Cache Disable */ > >#define CR3_PCID_MASK 0x0000000000000fff >#define CR3_LAM_U57 0x2000000000000000 >#define CR3_LAM_U48 0x4000000000000000 >#define CR3_PCID_SAVE 0x8000000000000000 > >/* > * Bits in PPro special registers > */ >#define CR4_VME 0x00000001 /* Virtual 8086 mode extensions */ >#define CR4_PVI 0x00000002 /* Protected-mode virtual interrupts */ >#define CR4_TSD 0x00000004 /* Time stamp disable */ >#define CR4_DE 0x00000008 /* Debugging extensions */ >#define CR4_PSE 0x00000010 /* Page size extensions */ >#define CR4_PAE 0x00000020 /* Physical address extension */ >#define CR4_MCE 0x00000040 /* Machine check enable */ >#define CR4_PGE 0x00000080 /* Page global enable */ >#define CR4_PCE 0x00000100 /* Performance monitoring counter > enable */ >#define CR4_FXSR 0x00000200 /* Fast FPU save/restore used by OS */ >#define CR4_XMM 0x00000400 /* enable SIMD/MMX2 to use except 16 */ >#define CR4_UMIP 0x00000800 /* User Mode Instruction Prevention */ >#define CR4_LA57 0x00001000 /* Enable 5-level paging */ >#define CR4_VMXE 0x00002000 /* enable VMX operation > (Intel-specific) */ >#define CR4_FSGSBASE 0x00010000 /* Enable FS/GS BASE access > instructions */ >#define CR4_PCIDE 0x00020000 /* Enable Context ID */ >#define CR4_XSAVE 0x00040000 /* XSETBV/XGETBV */ >#define CR4_SMEP 0x00100000 /* Supervisor-Mode Execution > Prevention */ >#define CR4_SMAP 0x00200000 /* Supervisor-Mode Access > Prevention */ >#define CR4_PKE 0x00400000 /* Protection Keys Enable */ >#define CR4_CET 0x00800000 /* Control-flow Enforcement > Technology */ >#define CR4_PKS 0x01000000 /* Protection Keys for Supervisor */ >#define CR4_UINTR 0x02000000 /* User Interrupts Enable */ >#define CR4_LASS 0x08000000 /* Linear Address Space Separation */ >#define CR4_LAM_SUP 0x10000000 /* Linear-Address Masking for > Supervisor */ > >/* > * Bits in AMD64 special registers. EFER is 64 bits wide. > */ >#define EFER_SCE 0x000000001 /* System Call Extensions (R/W) */ >#define EFER_LME 0x000000100 /* Long mode enable (R/W) */ >#define EFER_LMA 0x000000400 /* Long mode active (R) */ >#define EFER_NXE 0x000000800 /* PTE No-Execute bit enable (R/W) */ >#define EFER_SVM 0x000001000 /* SVM enable bit for AMD, reserved > for Intel */ >#define EFER_LMSLE 0x000002000 /* Long Mode Segment Limit Enable */ >#define EFER_FFXSR 0x000004000 /* Fast FXSAVE/FSRSTOR */ >#define EFER_TCE 0x000008000 /* Translation Cache Extension */ >#define EFER_MCOMMIT 0x000020000 /* Enable MCOMMIT (AMD) */ >#define EFER_INTWB 0x000040000 /* Interruptible WBINVD */ >#define EFER_UAIE 0x000100000 /* Upper Address Ignore */ >#define EFER_AIBRSE 0x000200000 /* Automatic IBRS */ > >/* > * Intel Extended Features registers > */ >#define XCR0 0 /* XFEATURE_ENABLED_MASK register */ > >#define XFEATURE_ENABLED_X87 0x00000001 >#define XFEATURE_ENABLED_SSE 0x00000002 >#define XFEATURE_ENABLED_YMM_HI128 0x00000004 >#define XFEATURE_ENABLED_AVX XFEATURE_ENABLED_YMM_HI128 >#define XFEATURE_ENABLED_BNDREGS 0x00000008 >#define XFEATURE_ENABLED_BNDCSR 0x00000010 >#define XFEATURE_ENABLED_OPMASK 0x00000020 >#define XFEATURE_ENABLED_ZMM_HI256 0x00000040 >#define XFEATURE_ENABLED_HI16_ZMM 0x00000080 >#define XFEATURE_ENABLED_PKRU 0x00000200 >#define XFEATURE_ENABLED_TILECONFIG 0x00020000 >#define XFEATURE_ENABLED_TILEDATA 0x00040000 > >#define XFEATURE_AVX \ > (XFEATURE_ENABLED_X87 | XFEATURE_ENABLED_SSE | XFEATURE_ENABLED_AVX) >#define XFEATURE_AVX512 \ > (XFEATURE_ENABLED_OPMASK | XFEATURE_ENABLED_ZMM_HI256 | \ > XFEATURE_ENABLED_HI16_ZMM) >#define XFEATURE_MPX \ > (XFEATURE_ENABLED_BNDREGS | XFEATURE_ENABLED_BNDCSR) > >/* > * CPUID instruction features register > */ >#define CPUID_FPU 0x00000001 >#define CPUID_VME 0x00000002 >#define CPUID_DE 0x00000004 >#define CPUID_PSE 0x00000008 >#define CPUID_TSC 0x00000010 >#define CPUID_MSR 0x00000020 >#define CPUID_PAE 0x00000040 >#define CPUID_MCE 0x00000080 >#define CPUID_CX8 0x00000100 >#define CPUID_APIC 0x00000200 >#define CPUID_B10 0x00000400 >#define CPUID_SEP 0x00000800 >#define CPUID_MTRR 0x00001000 >#define CPUID_PGE 0x00002000 >#define CPUID_MCA 0x00004000 >#define CPUID_CMOV 0x00008000 >#define CPUID_PAT 0x00010000 >#define CPUID_PSE36 0x00020000 >#define CPUID_PSN 0x00040000 >#define CPUID_CLFSH 0x00080000 >#define CPUID_B20 0x00100000 >#define CPUID_DS 0x00200000 >#define CPUID_ACPI 0x00400000 >#define CPUID_MMX 0x00800000 >#define CPUID_FXSR 0x01000000 >#define CPUID_SSE 0x02000000 >#define CPUID_XMM 0x02000000 >#define CPUID_SSE2 0x04000000 >#define CPUID_SS 0x08000000 >#define CPUID_HTT 0x10000000 >#define CPUID_TM 0x20000000 >#define CPUID_IA64 0x40000000 >#define CPUID_PBE 0x80000000 > >#define CPUID2_SSE3 0x00000001 >#define CPUID2_PCLMULQDQ 0x00000002 >#define CPUID2_DTES64 0x00000004 >#define CPUID2_MON 0x00000008 >#define CPUID2_DS_CPL 0x00000010 >#define CPUID2_VMX 0x00000020 >#define CPUID2_SMX 0x00000040 >#define CPUID2_EST 0x00000080 >#define CPUID2_TM2 0x00000100 >#define CPUID2_SSSE3 0x00000200 >#define CPUID2_CNXTID 0x00000400 >#define CPUID2_SDBG 0x00000800 >#define CPUID2_FMA 0x00001000 >#define CPUID2_CX16 0x00002000 >#define CPUID2_XTPR 0x00004000 >#define CPUID2_PDCM 0x00008000 >#define CPUID2_PCID 0x00020000 >#define CPUID2_DCA 0x00040000 >#define CPUID2_SSE41 0x00080000 >#define CPUID2_SSE42 0x00100000 >#define CPUID2_X2APIC 0x00200000 >#define CPUID2_MOVBE 0x00400000 >#define CPUID2_POPCNT 0x00800000 >#define CPUID2_TSCDLT 0x01000000 >#define CPUID2_AESNI 0x02000000 >#define CPUID2_XSAVE 0x04000000 >#define CPUID2_OSXSAVE 0x08000000 >#define CPUID2_AVX 0x10000000 >#define CPUID2_F16C 0x20000000 >#define CPUID2_RDRAND 0x40000000 >#define CPUID2_HV 0x80000000 > >/* Intel Processor Trace CPUID. */ > >/* Leaf 0 ebx. */ >#define CPUPT_CR3 (1 << 0) /* CR3 Filtering Support */ >#define CPUPT_PSB (1 << 1) /* Configurable PSB and Cycle-Accurate Mode Supported */ >#define CPUPT_IPF (1 << 2) /* IP Filtering and TraceStop supported */ >#define CPUPT_MTC (1 << 3) /* MTC Supported */ >#define CPUPT_PRW (1 << 4) /* PTWRITE Supported */ >#define CPUPT_PWR (1 << 5) /* Power Event Trace Supported */ > >/* Leaf 0 ecx. */ >#define CPUPT_TOPA (1 << 0) /* ToPA Output Supported */ >#define CPUPT_TOPA_MULTI (1 << 1) /* ToPA Tables Allow Multiple Output Entries */ >#define CPUPT_SINGLE (1 << 2) /* Single-Range Output Supported */ >#define CPUPT_TT_OUT (1 << 3) /* Output to Trace Transport Subsystem Supported */ >#define CPUPT_LINEAR_IP (1 << 31) /* IP Payloads are Linear IP, otherwise IP is effective */ > >/* Leaf 1 eax. */ >#define CPUPT_NADDR_S 0 /* Number of Address Ranges */ >#define CPUPT_NADDR_M (0x7 << CPUPT_NADDR_S) >#define CPUPT_MTC_BITMAP_S 16 /* Bitmap of supported MTC Period Encodings */ >#define CPUPT_MTC_BITMAP_M (0xffff << CPUPT_MTC_BITMAP_S) > >/* Leaf 1 ebx. */ >#define CPUPT_CT_BITMAP_S 0 /* Bitmap of supported Cycle Threshold values */ >#define CPUPT_CT_BITMAP_M (0xffff << CPUPT_CT_BITMAP_S) >#define CPUPT_PFE_BITMAP_S 16 /* Bitmap of supported Configurable PSB Frequency encoding */ >#define CPUPT_PFE_BITMAP_M (0xffff << CPUPT_PFE_BITMAP_S) > >/* > * Important bits in the AMD extended cpuid flags > */ >#define AMDID_SYSCALL 0x00000800 >#define AMDID_MP 0x00080000 >#define AMDID_NX 0x00100000 >#define AMDID_EXT_MMX 0x00400000 >#define AMDID_FFXSR 0x02000000 >#define AMDID_PAGE1GB 0x04000000 >#define AMDID_RDTSCP 0x08000000 >#define AMDID_LM 0x20000000 >#define AMDID_EXT_3DNOW 0x40000000 >#define AMDID_3DNOW 0x80000000 > >#define AMDID2_LAHF 0x00000001 >#define AMDID2_CMP 0x00000002 >#define AMDID2_SVM 0x00000004 >#define AMDID2_EXT_APIC 0x00000008 >#define AMDID2_CR8 0x00000010 >#define AMDID2_ABM 0x00000020 >#define AMDID2_SSE4A 0x00000040 >#define AMDID2_MAS 0x00000080 >#define AMDID2_PREFETCH 0x00000100 >#define AMDID2_OSVW 0x00000200 >#define AMDID2_IBS 0x00000400 >#define AMDID2_XOP 0x00000800 >#define AMDID2_SKINIT 0x00001000 >#define AMDID2_WDT 0x00002000 >#define AMDID2_LWP 0x00008000 >#define AMDID2_FMA4 0x00010000 >#define AMDID2_TCE 0x00020000 >#define AMDID2_NODE_ID 0x00080000 >#define AMDID2_TBM 0x00200000 >#define AMDID2_TOPOLOGY 0x00400000 >#define AMDID2_PCXC 0x00800000 >#define AMDID2_PNXC 0x01000000 >#define AMDID2_DBE 0x04000000 >#define AMDID2_PTSC 0x08000000 >#define AMDID2_PTSCEL2I 0x10000000 >#define AMDID2_MWAITX 0x20000000 > >/* > * CPUID instruction 1 eax info > */ >#define CPUID_STEPPING 0x0000000f >#define CPUID_MODEL 0x000000f0 >#define CPUID_FAMILY 0x00000f00 >#define CPUID_EXT_MODEL 0x000f0000 >#define CPUID_EXT_FAMILY 0x0ff00000 >#ifdef __i386__ >#define CPUID_TO_MODEL(id) \ > ((((id) & CPUID_MODEL) >> 4) | \ > ((((id) & CPUID_FAMILY) >= 0x600) ? \ > (((id) & CPUID_EXT_MODEL) >> 12) : 0)) >#define CPUID_TO_FAMILY(id) \ > ((((id) & CPUID_FAMILY) >> 8) + \ > ((((id) & CPUID_FAMILY) == 0xf00) ? \ > (((id) & CPUID_EXT_FAMILY) >> 20) : 0)) >#else ># 295 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/specialreg.h" 3 4 >#define CPUID_TO_MODEL(id) \ > ((((id) & CPUID_MODEL) >> 4) | \ > (((id) & CPUID_EXT_MODEL) >> 12)) >#define CPUID_TO_FAMILY(id) \ > ((((id) & CPUID_FAMILY) >> 8) + \ > (((id) & CPUID_EXT_FAMILY) >> 20)) >#endif ># 302 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/specialreg.h" 3 4 >#define CPUID_TO_STEPPING(id) ((id) & CPUID_STEPPING) > >/* > * CPUID instruction 1 ebx info > */ >#define CPUID_BRAND_INDEX 0x000000ff >#define CPUID_CLFUSH_SIZE 0x0000ff00 >#define CPUID_HTT_CORES 0x00ff0000 >#define CPUID_LOCAL_APIC_ID 0xff000000 > >/* > * CPUID instruction 5 info > */ >#define CPUID5_MON_MIN_SIZE 0x0000ffff /* eax */ >#define CPUID5_MON_MAX_SIZE 0x0000ffff /* ebx */ >#define CPUID5_MON_MWAIT_EXT 0x00000001 /* ecx */ >#define CPUID5_MWAIT_INTRBREAK 0x00000002 /* ecx */ > >/* > * MWAIT cpu power states. Lower 4 bits are sub-states. > */ >#define MWAIT_C0 0xf0 >#define MWAIT_C1 0x00 >#define MWAIT_C2 0x10 >#define MWAIT_C3 0x20 >#define MWAIT_C4 0x30 > >/* > * MWAIT extensions. > */ >/* Interrupt breaks MWAIT even when masked. */ >#define MWAIT_INTRBREAK 0x00000001 > >/* > * CPUID leaf 6: Thermal and Power management. > */ >/* Eax. */ >#define CPUTPM1_SENSOR 0x00000001 >#define CPUTPM1_TURBO 0x00000002 >#define CPUTPM1_ARAT 0x00000004 >#define CPUTPM1_PLN 0x00000010 >#define CPUTPM1_ECMD 0x00000020 >#define CPUTPM1_PTM 0x00000040 >#define CPUTPM1_HWP 0x00000080 >#define CPUTPM1_HWP_NOTIFICATION 0x00000100 >#define CPUTPM1_HWP_ACTIVITY_WINDOW 0x00000200 >#define CPUTPM1_HWP_PERF_PREF 0x00000400 >#define CPUTPM1_HWP_PKG 0x00000800 >#define CPUTPM1_HDC 0x00002000 >#define CPUTPM1_TURBO30 0x00004000 >#define CPUTPM1_HWP_CAPABILITIES 0x00008000 >#define CPUTPM1_HWP_PECI_OVR 0x00010000 >#define CPUTPM1_HWP_FLEXIBLE 0x00020000 >#define CPUTPM1_HWP_FAST_MSR 0x00040000 >#define CPUTPM1_HW_FEEDBACK 0x00080000 >#define CPUTPM1_HWP_IGN_IDLE 0x00100000 >#define CPUTPM1_THREAD_DIRECTOR 0x00800000 > >/* Ebx. */ >#define CPUTPM_B_NSENSINTTHRESH 0x0000000f > >/* Ecx. */ >#define CPUID_PERF_STAT 0x00000001 >#define CPUID_PERF_BIAS 0x00000008 >#define CPUID_PERF_TD_CLASSES 0x0000ff00 > >/* Edx. */ >#define CPUID_HF_PERFORMANCE 0x00000001 >#define CPUID_HF_EFFICIENCY 0x00000002 >#define CPUID_TD_CAPABLITIES 0x0000000f >#define CPUID_TD_TBLPAGES 0x00000f00 > >/* > * CPUID instruction 0xb ebx info. > */ >#define CPUID_TYPE_INVAL 0 >#define CPUID_TYPE_SMT 1 >#define CPUID_TYPE_CORE 2 > >/* > * CPUID instruction 0xd Processor Extended State Enumeration Sub-leaf 1 > */ >#define CPUID_EXTSTATE_XSAVEOPT 0x00000001 >#define CPUID_EXTSTATE_XSAVEC 0x00000002 >#define CPUID_EXTSTATE_XINUSE 0x00000004 >#define CPUID_EXTSTATE_XSAVES 0x00000008 > >/* > * AMD extended function 8000_0007h ebx info > */ >#define AMDRAS_MCA_OF_RECOV 0x00000001 >#define AMDRAS_SUCCOR 0x00000002 >#define AMDRAS_HW_ASSERT 0x00000004 >#define AMDRAS_SCALABLE_MCA 0x00000008 >#define AMDRAS_PFEH_SUPPORT 0x00000010 > >/* > * AMD extended function 8000_0007h edx info > */ >#define AMDPM_TS 0x00000001 >#define AMDPM_FID 0x00000002 >#define AMDPM_VID 0x00000004 >#define AMDPM_TTP 0x00000008 >#define AMDPM_TM 0x00000010 >#define AMDPM_STC 0x00000020 >#define AMDPM_100MHZ_STEPS 0x00000040 >#define AMDPM_HW_PSTATE 0x00000080 >#define AMDPM_TSC_INVARIANT 0x00000100 >#define AMDPM_CPB 0x00000200 > >/* > * AMD extended function 8000_0008h ebx info (amd_extended_feature_extensions) > */ >#define AMDFEID_CLZERO 0x00000001 >#define AMDFEID_IRPERF 0x00000002 >#define AMDFEID_XSAVEERPTR 0x00000004 >#define AMDFEID_INVLPGB 0x00000008 >#define AMDFEID_RDPRU 0x00000010 >#define AMDFEID_BE 0x00000040 >#define AMDFEID_MCOMMIT 0x00000100 >#define AMDFEID_WBNOINVD 0x00000200 >#define AMDFEID_IBPB 0x00001000 >#define AMDFEID_INT_WBINVD 0x00002000 >#define AMDFEID_IBRS 0x00004000 >#define AMDFEID_STIBP 0x00008000 >/* The below are only defined if the corresponding base feature above exists. */ >#define AMDFEID_IBRS_ALWAYSON 0x00010000 >#define AMDFEID_STIBP_ALWAYSON 0x00020000 >#define AMDFEID_PREFER_IBRS 0x00040000 >#define AMDFEID_SAMEMODE_IBRS 0x00080000 >#define AMDFEID_NO_LMSLE 0x00100000 >#define AMDFEID_INVLPGB_NEST 0x00200000 >#define AMDFEID_PPIN 0x00800000 >#define AMDFEID_SSBD 0x01000000 >/* SSBD via MSRC001_011F instead of MSR 0x48: */ >#define AMDFEID_VIRT_SSBD 0x02000000 >#define AMDFEID_SSB_NO 0x04000000 >#define AMDFEID_CPPC 0x08000000 >#define AMDFEID_PSFD 0x10000000 >#define AMDFEID_BTC_NO 0x20000000 >#define AMDFEID_IBPB_RET 0x40000000 > >/* > * AMD extended function 8000_0008h ecx info > */ >#define AMDID_CMP_CORES 0x000000ff >#define AMDID_COREID_SIZE 0x0000f000 >#define AMDID_COREID_SIZE_SHIFT 12 > >/* > * AMD extended function 8000_0008h edx info > */ >#define AMDID_INVLPGB_MAXCNT 0x0000ffff >#define AMDID_RDPRU_SHIFT 16 >#define AMDID_RDPRU_ID 0xffff0000 > >/* > * CPUID instruction 7 Structured Extended Features, leaf 0 ebx info > */ >#define CPUID_STDEXT_FSGSBASE 0x00000001 >#define CPUID_STDEXT_TSC_ADJUST 0x00000002 >#define CPUID_STDEXT_SGX 0x00000004 >#define CPUID_STDEXT_BMI1 0x00000008 >#define CPUID_STDEXT_HLE 0x00000010 >#define CPUID_STDEXT_AVX2 0x00000020 >#define CPUID_STDEXT_FDP_EXC 0x00000040 >#define CPUID_STDEXT_SMEP 0x00000080 >#define CPUID_STDEXT_BMI2 0x00000100 >#define CPUID_STDEXT_ERMS 0x00000200 >#define CPUID_STDEXT_INVPCID 0x00000400 >#define CPUID_STDEXT_RTM 0x00000800 >#define CPUID_STDEXT_PQM 0x00001000 >#define CPUID_STDEXT_NFPUSG 0x00002000 >#define CPUID_STDEXT_MPX 0x00004000 >#define CPUID_STDEXT_PQE 0x00008000 >#define CPUID_STDEXT_AVX512F 0x00010000 >#define CPUID_STDEXT_AVX512DQ 0x00020000 >#define CPUID_STDEXT_RDSEED 0x00040000 >#define CPUID_STDEXT_ADX 0x00080000 >#define CPUID_STDEXT_SMAP 0x00100000 >#define CPUID_STDEXT_AVX512IFMA 0x00200000 >/* Formerly PCOMMIT */ >#define CPUID_STDEXT_CLFLUSHOPT 0x00800000 >#define CPUID_STDEXT_CLWB 0x01000000 >#define CPUID_STDEXT_PROCTRACE 0x02000000 >#define CPUID_STDEXT_AVX512PF 0x04000000 >#define CPUID_STDEXT_AVX512ER 0x08000000 >#define CPUID_STDEXT_AVX512CD 0x10000000 >#define CPUID_STDEXT_SHA 0x20000000 >#define CPUID_STDEXT_AVX512BW 0x40000000 >#define CPUID_STDEXT_AVX512VL 0x80000000 > >/* > * CPUID instruction 7 Structured Extended Features, leaf 0 ecx info > */ >#define CPUID_STDEXT2_PREFETCHWT1 0x00000001 >#define CPUID_STDEXT2_AVX512VBMI 0x00000002 >#define CPUID_STDEXT2_UMIP 0x00000004 >#define CPUID_STDEXT2_PKU 0x00000008 >#define CPUID_STDEXT2_OSPKE 0x00000010 >#define CPUID_STDEXT2_WAITPKG 0x00000020 >#define CPUID_STDEXT2_AVX512VBMI2 0x00000040 >#define CPUID_STDEXT2_GFNI 0x00000100 >#define CPUID_STDEXT2_VAES 0x00000200 >#define CPUID_STDEXT2_VPCLMULQDQ 0x00000400 >#define CPUID_STDEXT2_AVX512VNNI 0x00000800 >#define CPUID_STDEXT2_AVX512BITALG 0x00001000 >#define CPUID_STDEXT2_TME 0x00002000 >#define CPUID_STDEXT2_AVX512VPOPCNTDQ 0x00004000 >#define CPUID_STDEXT2_LA57 0x00010000 >#define CPUID_STDEXT2_RDPID 0x00400000 >#define CPUID_STDEXT2_CLDEMOTE 0x02000000 >#define CPUID_STDEXT2_MOVDIRI 0x08000000 >#define CPUID_STDEXT2_MOVDIR64B 0x10000000 >#define CPUID_STDEXT2_ENQCMD 0x20000000 >#define CPUID_STDEXT2_SGXLC 0x40000000 > >/* > * CPUID instruction 7 Structured Extended Features, leaf 0 edx info > */ >#define CPUID_STDEXT3_AVX5124VNNIW 0x00000004 >#define CPUID_STDEXT3_AVX5124FMAPS 0x00000008 >#define CPUID_STDEXT3_FSRM 0x00000010 >#define CPUID_STDEXT3_AVX512VP2INTERSECT 0x00000100 >#define CPUID_STDEXT3_MCUOPT 0x00000200 >#define CPUID_STDEXT3_MD_CLEAR 0x00000400 >#define CPUID_STDEXT3_TSXFA 0x00002000 >#define CPUID_STDEXT3_PCONFIG 0x00040000 >#define CPUID_STDEXT3_IBPB 0x04000000 >#define CPUID_STDEXT3_STIBP 0x08000000 >#define CPUID_STDEXT3_L1D_FLUSH 0x10000000 >#define CPUID_STDEXT3_ARCH_CAP 0x20000000 >#define CPUID_STDEXT3_CORE_CAP 0x40000000 >#define CPUID_STDEXT3_SSBD 0x80000000 > >/* > * CPUID instruction 7 Structured Extended Features, leaf 1 eax info > */ >#define CPUID_STDEXT4_LASS 0x00000040 >#define CPUID_STDEXT4_LAM 0x04000000 > >/* CPUID_HYBRID_ID leaf 0x1a */ >#define CPUID_HYBRID_CORE_MASK 0xff000000 >#define CPUID_HYBRID_SMALL_CORE 0x20000000 >#define CPUID_HYBRID_LARGE_CORE 0x40000000 > >/* MSR IA32_ARCH_CAP(ABILITIES) bits */ >#define IA32_ARCH_CAP_RDCL_NO 0x00000001 >#define IA32_ARCH_CAP_IBRS_ALL 0x00000002 >#define IA32_ARCH_CAP_RSBA 0x00000004 >#define IA32_ARCH_CAP_SKIP_L1DFL_VMENTRY 0x00000008 >#define IA32_ARCH_CAP_SSB_NO 0x00000010 >#define IA32_ARCH_CAP_MDS_NO 0x00000020 >#define IA32_ARCH_CAP_IF_PSCHANGE_MC_NO 0x00000040 >#define IA32_ARCH_CAP_TSX_CTRL 0x00000080 >#define IA32_ARCH_CAP_TAA_NO 0x00000100 > >/* MSR IA32_TSX_CTRL bits */ >#define IA32_TSX_CTRL_RTM_DISABLE 0x00000001 >#define IA32_TSX_CTRL_TSX_CPUID_CLEAR 0x00000002 > >/* > * CPUID manufacturers identifiers > */ >#define AMD_VENDOR_ID "AuthenticAMD" >#define CENTAUR_VENDOR_ID "CentaurHauls" >#define CYRIX_VENDOR_ID "CyrixInstead" >#define INTEL_VENDOR_ID "GenuineIntel" >#define NEXGEN_VENDOR_ID "NexGenDriven" >#define NSC_VENDOR_ID "Geode by NSC" >#define RISE_VENDOR_ID "RiseRiseRise" >#define SIS_VENDOR_ID "SiS SiS SiS " >#define TRANSMETA_VENDOR_ID "GenuineTMx86" >#define UMC_VENDOR_ID "UMC UMC UMC " >#define HYGON_VENDOR_ID "HygonGenuine" > >/* > * Model-specific registers for the i386 family > */ >#define MSR_P5_MC_ADDR 0x000 >#define MSR_P5_MC_TYPE 0x001 >#define MSR_TSC 0x010 >#define MSR_P5_CESR 0x011 >#define MSR_P5_CTR0 0x012 >#define MSR_P5_CTR1 0x013 >#define MSR_IA32_PLATFORM_ID 0x017 >#define MSR_APICBASE 0x01b >#define MSR_EBL_CR_POWERON 0x02a >#define MSR_TEST_CTL 0x033 >#define MSR_IA32_FEATURE_CONTROL 0x03a >#define MSR_IA32_SPEC_CTRL 0x048 >#define MSR_IA32_PRED_CMD 0x049 >#define MSR_BIOS_UPDT_TRIG 0x079 >#define MSR_BBL_CR_D0 0x088 >#define MSR_BBL_CR_D1 0x089 >#define MSR_BBL_CR_D2 0x08a >#define MSR_BIOS_SIGN 0x08b >#define MSR_PERFCTR0 0x0c1 >#define MSR_PERFCTR1 0x0c2 >#define MSR_PLATFORM_INFO 0x0ce >#define MSR_MPERF 0x0e7 >#define MSR_APERF 0x0e8 >#define MSR_IA32_EXT_CONFIG 0x0ee /* Undocumented. Core Solo/Duo only */ >#define MSR_MTRRcap 0x0fe >#define MSR_IA32_ARCH_CAP 0x10a >#define MSR_IA32_FLUSH_CMD 0x10b >#define MSR_TSX_FORCE_ABORT 0x10f >#define MSR_BBL_CR_ADDR 0x116 >#define MSR_BBL_CR_DECC 0x118 >#define MSR_BBL_CR_CTL 0x119 >#define MSR_BBL_CR_TRIG 0x11a >#define MSR_BBL_CR_BUSY 0x11b >#define MSR_BBL_CR_CTL3 0x11e >#define MSR_IA32_TSX_CTRL 0x122 >#define MSR_IA32_MCU_OPT_CTRL 0x123 >#define MSR_MISC_FEATURE_ENABLES 0x140 >#define MSR_SYSENTER_CS_MSR 0x174 >#define MSR_SYSENTER_ESP_MSR 0x175 >#define MSR_SYSENTER_EIP_MSR 0x176 >#define MSR_MCG_CAP 0x179 >#define MSR_MCG_STATUS 0x17a >#define MSR_MCG_CTL 0x17b >#define MSR_EVNTSEL0 0x186 >#define MSR_EVNTSEL1 0x187 >#define MSR_THERM_CONTROL 0x19a >#define MSR_THERM_INTERRUPT 0x19b >#define MSR_THERM_STATUS 0x19c >#define MSR_IA32_MISC_ENABLE 0x1a0 >#define MSR_IA32_TEMPERATURE_TARGET 0x1a2 >#define MSR_TURBO_RATIO_LIMIT 0x1ad >#define MSR_TURBO_RATIO_LIMIT1 0x1ae >#define MSR_IA32_ENERGY_PERF_BIAS 0x1b0 >#define MSR_IA32_PKG_THERM_STATUS 0x1b1 >#define MSR_IA32_PKG_THERM_INTERRUPT 0x1b2 >#define MSR_DEBUGCTLMSR 0x1d9 >#define MSR_LASTBRANCHFROMIP 0x1db >#define MSR_LASTBRANCHTOIP 0x1dc >#define MSR_LASTINTFROMIP 0x1dd >#define MSR_LASTINTTOIP 0x1de >#define MSR_ROB_CR_BKUPTMPDR6 0x1e0 >#define MSR_MTRRVarBase 0x200 >#define MSR_MTRR64kBase 0x250 >#define MSR_MTRR16kBase 0x258 >#define MSR_MTRR4kBase 0x268 >#define MSR_PAT 0x277 >#define MSR_MC0_CTL2 0x280 >#define MSR_MTRRdefType 0x2ff >#define MSR_MC0_CTL 0x400 >#define MSR_MC0_STATUS 0x401 >#define MSR_MC0_ADDR 0x402 >#define MSR_MC0_MISC 0x403 >#define MSR_MC1_CTL 0x404 >#define MSR_MC1_STATUS 0x405 >#define MSR_MC1_ADDR 0x406 >#define MSR_MC1_MISC 0x407 >#define MSR_MC2_CTL 0x408 >#define MSR_MC2_STATUS 0x409 >#define MSR_MC2_ADDR 0x40a >#define MSR_MC2_MISC 0x40b >#define MSR_MC3_CTL 0x40c >#define MSR_MC3_STATUS 0x40d >#define MSR_MC3_ADDR 0x40e >#define MSR_MC3_MISC 0x40f >#define MSR_MC4_CTL 0x410 >#define MSR_MC4_STATUS 0x411 >#define MSR_MC4_ADDR 0x412 >#define MSR_MC4_MISC 0x413 >#define MSR_MCG_EXT_CTL 0x4d0 >#define MSR_RAPL_POWER_UNIT 0x606 >#define MSR_PKG_ENERGY_STATUS 0x611 >#define MSR_DRAM_ENERGY_STATUS 0x619 >#define MSR_PP0_ENERGY_STATUS 0x639 >#define MSR_PP1_ENERGY_STATUS 0x641 >#define MSR_PPERF 0x64e >#define MSR_TSC_DEADLINE 0x6e0 /* Writes are not serializing */ >#define MSR_IA32_PM_ENABLE 0x770 >#define MSR_IA32_HWP_CAPABILITIES 0x771 >#define MSR_IA32_HWP_REQUEST_PKG 0x772 >#define MSR_IA32_HWP_INTERRUPT 0x773 >#define MSR_IA32_HWP_REQUEST 0x774 >#define MSR_IA32_HWP_STATUS 0x777 > >/* > * VMX MSRs > */ >#define MSR_VMX_BASIC 0x480 >#define MSR_VMX_PINBASED_CTLS 0x481 >#define MSR_VMX_PROCBASED_CTLS 0x482 >#define MSR_VMX_EXIT_CTLS 0x483 >#define MSR_VMX_ENTRY_CTLS 0x484 >#define MSR_VMX_CR0_FIXED0 0x486 >#define MSR_VMX_CR0_FIXED1 0x487 >#define MSR_VMX_CR4_FIXED0 0x488 >#define MSR_VMX_CR4_FIXED1 0x489 >#define MSR_VMX_PROCBASED_CTLS2 0x48b >#define MSR_VMX_EPT_VPID_CAP 0x48c >#define MSR_VMX_TRUE_PINBASED_CTLS 0x48d >#define MSR_VMX_TRUE_PROCBASED_CTLS 0x48e >#define MSR_VMX_TRUE_EXIT_CTLS 0x48f >#define MSR_VMX_TRUE_ENTRY_CTLS 0x490 > >/* > * X2APIC MSRs. > * Writes are not serializing. > */ >#define MSR_APIC_000 0x800 >#define MSR_APIC_ID 0x802 >#define MSR_APIC_VERSION 0x803 >#define MSR_APIC_TPR 0x808 >#define MSR_APIC_EOI 0x80b >#define MSR_APIC_LDR 0x80d >#define MSR_APIC_SVR 0x80f >#define MSR_APIC_ISR0 0x810 >#define MSR_APIC_ISR1 0x811 >#define MSR_APIC_ISR2 0x812 >#define MSR_APIC_ISR3 0x813 >#define MSR_APIC_ISR4 0x814 >#define MSR_APIC_ISR5 0x815 >#define MSR_APIC_ISR6 0x816 >#define MSR_APIC_ISR7 0x817 >#define MSR_APIC_TMR0 0x818 >#define MSR_APIC_IRR0 0x820 >#define MSR_APIC_ESR 0x828 >#define MSR_APIC_LVT_CMCI 0x82F >#define MSR_APIC_ICR 0x830 >#define MSR_APIC_LVT_TIMER 0x832 >#define MSR_APIC_LVT_THERMAL 0x833 >#define MSR_APIC_LVT_PCINT 0x834 >#define MSR_APIC_LVT_LINT0 0x835 >#define MSR_APIC_LVT_LINT1 0x836 >#define MSR_APIC_LVT_ERROR 0x837 >#define MSR_APIC_ICR_TIMER 0x838 >#define MSR_APIC_CCR_TIMER 0x839 >#define MSR_APIC_DCR_TIMER 0x83e >#define MSR_APIC_SELF_IPI 0x83f > >#define MSR_IA32_XSS 0xda0 > >/* > * Intel Processor Trace (PT) MSRs. > */ >#define MSR_IA32_RTIT_OUTPUT_BASE 0x560 /* Trace Output Base Register (R/W) */ >#define MSR_IA32_RTIT_OUTPUT_MASK_PTRS 0x561 /* Trace Output Mask Pointers Register (R/W) */ >#define MSR_IA32_RTIT_CTL 0x570 /* Trace Control Register (R/W) */ >#define RTIT_CTL_TRACEEN (1 << 0) >#define RTIT_CTL_CYCEN (1 << 1) >#define RTIT_CTL_OS (1 << 2) >#define RTIT_CTL_USER (1 << 3) >#define RTIT_CTL_PWREVTEN (1 << 4) >#define RTIT_CTL_FUPONPTW (1 << 5) >#define RTIT_CTL_FABRICEN (1 << 6) >#define RTIT_CTL_CR3FILTER (1 << 7) >#define RTIT_CTL_TOPA (1 << 8) >#define RTIT_CTL_MTCEN (1 << 9) >#define RTIT_CTL_TSCEN (1 << 10) >#define RTIT_CTL_DISRETC (1 << 11) >#define RTIT_CTL_PTWEN (1 << 12) >#define RTIT_CTL_BRANCHEN (1 << 13) >#define RTIT_CTL_MTC_FREQ_S 14 >#define RTIT_CTL_MTC_FREQ(n) ((n) << RTIT_CTL_MTC_FREQ_S) >#define RTIT_CTL_MTC_FREQ_M (0xf << RTIT_CTL_MTC_FREQ_S) >#define RTIT_CTL_CYC_THRESH_S 19 >#define RTIT_CTL_CYC_THRESH_M (0xf << RTIT_CTL_CYC_THRESH_S) >#define RTIT_CTL_PSB_FREQ_S 24 >#define RTIT_CTL_PSB_FREQ_M (0xf << RTIT_CTL_PSB_FREQ_S) >#define RTIT_CTL_ADDR_CFG_S(n) (32 + (n) * 4) >#define RTIT_CTL_ADDR0_CFG_S 32 >#define RTIT_CTL_ADDR0_CFG_M (0xfULL << RTIT_CTL_ADDR0_CFG_S) >#define RTIT_CTL_ADDR1_CFG_S 36 >#define RTIT_CTL_ADDR1_CFG_M (0xfULL << RTIT_CTL_ADDR1_CFG_S) >#define RTIT_CTL_ADDR2_CFG_S 40 >#define RTIT_CTL_ADDR2_CFG_M (0xfULL << RTIT_CTL_ADDR2_CFG_S) >#define RTIT_CTL_ADDR3_CFG_S 44 >#define RTIT_CTL_ADDR3_CFG_M (0xfULL << RTIT_CTL_ADDR3_CFG_S) >#define MSR_IA32_RTIT_STATUS 0x571 /* Tracing Status Register (R/W) */ >#define RTIT_STATUS_FILTEREN (1 << 0) >#define RTIT_STATUS_CONTEXTEN (1 << 1) >#define RTIT_STATUS_TRIGGEREN (1 << 2) >#define RTIT_STATUS_ERROR (1 << 4) >#define RTIT_STATUS_STOPPED (1 << 5) >#define RTIT_STATUS_PACKETBYTECNT_S 32 >#define RTIT_STATUS_PACKETBYTECNT_M (0x1ffffULL << RTIT_STATUS_PACKETBYTECNT_S) >#define MSR_IA32_RTIT_CR3_MATCH 0x572 /* Trace Filter CR3 Match Register (R/W) */ >#define MSR_IA32_RTIT_ADDR_A(n) (0x580 + (n) * 2) >#define MSR_IA32_RTIT_ADDR_B(n) (0x581 + (n) * 2) >#define MSR_IA32_RTIT_ADDR0_A 0x580 /* Region 0 Start Address (R/W) */ >#define MSR_IA32_RTIT_ADDR0_B 0x581 /* Region 0 End Address (R/W) */ >#define MSR_IA32_RTIT_ADDR1_A 0x582 /* Region 1 Start Address (R/W) */ >#define MSR_IA32_RTIT_ADDR1_B 0x583 /* Region 1 End Address (R/W) */ >#define MSR_IA32_RTIT_ADDR2_A 0x584 /* Region 2 Start Address (R/W) */ >#define MSR_IA32_RTIT_ADDR2_B 0x585 /* Region 2 End Address (R/W) */ >#define MSR_IA32_RTIT_ADDR3_A 0x586 /* Region 3 Start Address (R/W) */ >#define MSR_IA32_RTIT_ADDR3_B 0x587 /* Region 3 End Address (R/W) */ > >/* Intel Processor Trace Table of Physical Addresses (ToPA). */ >#define TOPA_SIZE_S 6 >#define TOPA_SIZE_M (0xf << TOPA_SIZE_S) >#define TOPA_SIZE_4K (0 << TOPA_SIZE_S) >#define TOPA_SIZE_8K (1 << TOPA_SIZE_S) >#define TOPA_SIZE_16K (2 << TOPA_SIZE_S) >#define TOPA_SIZE_32K (3 << TOPA_SIZE_S) >#define TOPA_SIZE_64K (4 << TOPA_SIZE_S) >#define TOPA_SIZE_128K (5 << TOPA_SIZE_S) >#define TOPA_SIZE_256K (6 << TOPA_SIZE_S) >#define TOPA_SIZE_512K (7 << TOPA_SIZE_S) >#define TOPA_SIZE_1M (8 << TOPA_SIZE_S) >#define TOPA_SIZE_2M (9 << TOPA_SIZE_S) >#define TOPA_SIZE_4M (10 << TOPA_SIZE_S) >#define TOPA_SIZE_8M (11 << TOPA_SIZE_S) >#define TOPA_SIZE_16M (12 << TOPA_SIZE_S) >#define TOPA_SIZE_32M (13 << TOPA_SIZE_S) >#define TOPA_SIZE_64M (14 << TOPA_SIZE_S) >#define TOPA_SIZE_128M (15 << TOPA_SIZE_S) >#define TOPA_STOP (1 << 4) >#define TOPA_INT (1 << 2) >#define TOPA_END (1 << 0) > >/* > * Intel Hardware Feedback Interface / Thread Director MSRs > */ >#define MSR_IA32_HW_FEEDBACK_PTR 0x17d0 >#define MSR_IA32_HW_FEEDBACK_CONFIG 0x17d1 >#define MSR_IA32_THREAD_FEEDBACK_CHAR 0x17d2 >#define MSR_IA32_HW_FEEDBACK_THREAD_CONFIG 0x17d4 > >/* > * Constants related to MSR's. > */ >#define APICBASE_RESERVED 0x000002ff >#define APICBASE_BSP 0x00000100 >#define APICBASE_X2APIC 0x00000400 >#define APICBASE_ENABLED 0x00000800 >#define APICBASE_ADDRESS 0xfffff000 > >/* MSR_IA32_FEATURE_CONTROL related */ >#define IA32_FEATURE_CONTROL_LOCK 0x01 /* lock bit */ >#define IA32_FEATURE_CONTROL_SMX_EN 0x02 /* enable VMX inside SMX */ >#define IA32_FEATURE_CONTROL_VMX_EN 0x04 /* enable VMX outside SMX */ >#define IA32_FEATURE_CONTROL_LMCE_EN 0x100000 /* enable local MCE */ > >/* MSR IA32_MISC_ENABLE */ >#define IA32_MISC_EN_FASTSTR 0x0000000000000001ULL >#define IA32_MISC_EN_ATCCE 0x0000000000000008ULL >#define IA32_MISC_EN_PERFMON 0x0000000000000080ULL >#define IA32_MISC_EN_PEBSU 0x0000000000001000ULL >#define IA32_MISC_EN_ESSTE 0x0000000000010000ULL >#define IA32_MISC_EN_MONE 0x0000000000040000ULL >#define IA32_MISC_EN_LIMCPUID 0x0000000000400000ULL >#define IA32_MISC_EN_xTPRD 0x0000000000800000ULL >#define IA32_MISC_EN_XDD 0x0000000400000000ULL > >/* > * IA32_SPEC_CTRL and IA32_PRED_CMD MSRs are described in the Intel' > * document 336996-001 Speculative Execution Side Channel Mitigations. > * > * AMD uses the same MSRs and bit definitions, as described in 111006-B > * "Indirect Branch Control Extension" and 124441 "Speculative Store Bypass > * Disable." > */ >/* MSR IA32_SPEC_CTRL */ >#define IA32_SPEC_CTRL_IBRS 0x00000001 >#define IA32_SPEC_CTRL_STIBP 0x00000002 >#define IA32_SPEC_CTRL_SSBD 0x00000004 > >/* MSR IA32_PRED_CMD */ >#define IA32_PRED_CMD_IBPB_BARRIER 0x0000000000000001ULL > >/* MSR IA32_FLUSH_CMD */ >#define IA32_FLUSH_CMD_L1D 0x00000001 > >/* MSR IA32_MCU_OPT_CTRL */ >#define IA32_RNGDS_MITG_DIS 0x00000001 > >/* MSR IA32_HWP_CAPABILITIES */ >#define IA32_HWP_CAPABILITIES_HIGHEST_PERFORMANCE(x) (((x) >> 0) & 0xff) >#define IA32_HWP_CAPABILITIES_GUARANTEED_PERFORMANCE(x) (((x) >> 8) & 0xff) >#define IA32_HWP_CAPABILITIES_EFFICIENT_PERFORMANCE(x) (((x) >> 16) & 0xff) >#define IA32_HWP_CAPABILITIES_LOWEST_PERFORMANCE(x) (((x) >> 24) & 0xff) > >/* MSR IA32_HWP_REQUEST */ >#define IA32_HWP_REQUEST_MINIMUM_VALID (1ULL << 63) >#define IA32_HWP_REQUEST_MAXIMUM_VALID (1ULL << 62) >#define IA32_HWP_REQUEST_DESIRED_VALID (1ULL << 61) >#define IA32_HWP_REQUEST_EPP_VALID (1ULL << 60) >#define IA32_HWP_REQUEST_ACTIVITY_WINDOW_VALID (1ULL << 59) >#define IA32_HWP_REQUEST_PACKAGE_CONTROL (1ULL << 42) >#define IA32_HWP_ACTIVITY_WINDOW (0x3ffULL << 32) >#define IA32_HWP_REQUEST_ENERGY_PERFORMANCE_PREFERENCE (0xffULL << 24) >#define IA32_HWP_DESIRED_PERFORMANCE (0xffULL << 16) >#define IA32_HWP_REQUEST_MAXIMUM_PERFORMANCE (0xffULL << 8) >#define IA32_HWP_MINIMUM_PERFORMANCE (0xffULL << 0) > >/* MSR IA32_ENERGY_PERF_BIAS */ >#define IA32_ENERGY_PERF_BIAS_POLICY_HINT_MASK (0xfULL << 0) > >/* MSR IA32_HW_FEEDBACK_PTR */ >#define IA32_HW_FEEDBACK_PTR_ENABLE (0x1ULL << 0) > >/* MSR IA32_HW_FEEDBACK_CONFIG */ >#define IA32_HW_FEEDBACK_CONFIG_EN_HFI (0x1ULL << 0) >#define IA32_HW_FEEDBACK_CONFIG_EN_THDIR (0x1ULL << 1) > >/* MSR IA32_PKG_THERM_STATUS */ >#define IA32_PKG_THERM_STATUS_HFI_UPDATED (0x1ULL << 26) > >/* MSR IA32_PKG_THERM_INTERRUPT */ >#define IA32_PKG_THERM_INTERRUPT_HFI_ENABLE (0x1ULL << 25) > >/* > * PAT modes. > */ >#define PAT_UNCACHEABLE 0x00 >#define PAT_WRITE_COMBINING 0x01 >#define PAT_WRITE_THROUGH 0x04 >#define PAT_WRITE_PROTECTED 0x05 >#define PAT_WRITE_BACK 0x06 >#define PAT_UNCACHED 0x07 >#define PAT_VALUE(i, m) ((long long)(m) << (8 * (i))) >#define PAT_MASK(i) PAT_VALUE(i, 0xff) > >/* > * Constants related to MTRRs > */ >#define MTRR_UNCACHEABLE 0x00 >#define MTRR_WRITE_COMBINING 0x01 >#define MTRR_WRITE_THROUGH 0x04 >#define MTRR_WRITE_PROTECTED 0x05 >#define MTRR_WRITE_BACK 0x06 >#define MTRR_N64K 8 /* numbers of fixed-size entries */ >#define MTRR_N16K 16 >#define MTRR_N4K 64 >#define MTRR_CAP_WC 0x0000000000000400 >#define MTRR_CAP_FIXED 0x0000000000000100 >#define MTRR_CAP_VCNT 0x00000000000000ff >#define MTRR_DEF_ENABLE 0x0000000000000800 >#define MTRR_DEF_FIXED_ENABLE 0x0000000000000400 >#define MTRR_DEF_TYPE 0x00000000000000ff >#define MTRR_PHYSBASE_PHYSBASE 0x000ffffffffff000 >#define MTRR_PHYSBASE_TYPE 0x00000000000000ff >#define MTRR_PHYSMASK_PHYSMASK 0x000ffffffffff000 >#define MTRR_PHYSMASK_VALID 0x0000000000000800 > >/* > * Cyrix configuration registers, accessible as IO ports. > */ >#define CCR0 0xc0 /* Configuration control register 0 */ >#define CCR0_NC0 0x01 /* First 64K of each 1M memory region is > non-cacheable */ >#define CCR0_NC1 0x02 /* 640K-1M region is non-cacheable */ >#define CCR0_A20M 0x04 /* Enables A20M# input pin */ >#define CCR0_KEN 0x08 /* Enables KEN# input pin */ >#define CCR0_FLUSH 0x10 /* Enables FLUSH# input pin */ >#define CCR0_BARB 0x20 /* Flushes internal cache when entering hold > state */ >#define CCR0_CO 0x40 /* Cache org: 1=direct mapped, 0=2x set > assoc */ >#define CCR0_SUSPEND 0x80 /* Enables SUSP# and SUSPA# pins */ > >#define CCR1 0xc1 /* Configuration control register 1 */ >#define CCR1_RPL 0x01 /* Enables RPLSET and RPLVAL# pins */ >#define CCR1_SMI 0x02 /* Enables SMM pins */ >#define CCR1_SMAC 0x04 /* System management memory access */ >#define CCR1_MMAC 0x08 /* Main memory access */ >#define CCR1_NO_LOCK 0x10 /* Negate LOCK# */ >#define CCR1_SM3 0x80 /* SMM address space address region 3 */ > >#define CCR2 0xc2 >#define CCR2_WB 0x02 /* Enables WB cache interface pins */ >#define CCR2_SADS 0x02 /* Slow ADS */ >#define CCR2_LOCK_NW 0x04 /* LOCK NW Bit */ >#define CCR2_SUSP_HLT 0x08 /* Suspend on HALT */ >#define CCR2_WT1 0x10 /* WT region 1 */ >#define CCR2_WPR1 0x10 /* Write-protect region 1 */ >#define CCR2_BARB 0x20 /* Flushes write-back cache when entering > hold state. */ >#define CCR2_BWRT 0x40 /* Enables burst write cycles */ >#define CCR2_USE_SUSP 0x80 /* Enables suspend pins */ > >#define CCR3 0xc3 >#define CCR3_SMILOCK 0x01 /* SMM register lock */ >#define CCR3_NMI 0x02 /* Enables NMI during SMM */ >#define CCR3_LINBRST 0x04 /* Linear address burst cycles */ >#define CCR3_SMMMODE 0x08 /* SMM Mode */ >#define CCR3_MAPEN0 0x10 /* Enables Map0 */ >#define CCR3_MAPEN1 0x20 /* Enables Map1 */ >#define CCR3_MAPEN2 0x40 /* Enables Map2 */ >#define CCR3_MAPEN3 0x80 /* Enables Map3 */ > >#define CCR4 0xe8 >#define CCR4_IOMASK 0x07 >#define CCR4_MEM 0x08 /* Enables memory bypassing */ >#define CCR4_DTE 0x10 /* Enables directory table entry cache */ >#define CCR4_FASTFPE 0x20 /* Fast FPU exception */ >#define CCR4_CPUID 0x80 /* Enables CPUID instruction */ > >#define CCR5 0xe9 >#define CCR5_WT_ALLOC 0x01 /* Write-through allocate */ >#define CCR5_SLOP 0x02 /* LOOP instruction slowed down */ >#define CCR5_LBR1 0x10 /* Local bus region 1 */ >#define CCR5_ARREN 0x20 /* Enables ARR region */ > >#define CCR6 0xea > >#define CCR7 0xeb > >/* Performance Control Register (5x86 only). */ >#define PCR0 0x20 >#define PCR0_RSTK 0x01 /* Enables return stack */ >#define PCR0_BTB 0x02 /* Enables branch target buffer */ >#define PCR0_LOOP 0x04 /* Enables loop */ >#define PCR0_AIS 0x08 /* Enables all instructions stalled to > serialize pipe. */ >#define PCR0_MLR 0x10 /* Enables reordering of misaligned loads */ >#define PCR0_BTBRT 0x40 /* Enables BTB test register. */ >#define PCR0_LSSER 0x80 /* Disable reorder */ > >/* Device Identification Registers */ >#define DIR0 0xfe >#define DIR1 0xff > >/* > * Machine Check register constants. > */ >#define MCG_CAP_COUNT 0x000000ff >#define MCG_CAP_CTL_P 0x00000100 >#define MCG_CAP_EXT_P 0x00000200 >#define MCG_CAP_CMCI_P 0x00000400 >#define MCG_CAP_TES_P 0x00000800 >#define MCG_CAP_EXT_CNT 0x00ff0000 >#define MCG_CAP_SER_P 0x01000000 >#define MCG_CAP_EMC_P 0x02000000 >#define MCG_CAP_ELOG_P 0x04000000 >#define MCG_CAP_LMCE_P 0x08000000 >#define MCG_STATUS_RIPV 0x00000001 >#define MCG_STATUS_EIPV 0x00000002 >#define MCG_STATUS_MCIP 0x00000004 >#define MCG_STATUS_LMCS 0x00000008 /* if MCG_CAP_LMCE_P */ >#define MCG_CTL_ENABLE 0xffffffffffffffff >#define MCG_CTL_DISABLE 0x0000000000000000 >#define MSR_MC_CTL(x) (MSR_MC0_CTL + (x) * 4) >#define MSR_MC_STATUS(x) (MSR_MC0_STATUS + (x) * 4) >#define MSR_MC_ADDR(x) (MSR_MC0_ADDR + (x) * 4) >#define MSR_MC_MISC(x) (MSR_MC0_MISC + (x) * 4) >#define MSR_MC_CTL2(x) (MSR_MC0_CTL2 + (x)) /* If MCG_CAP_CMCI_P */ >#define MC_STATUS_MCA_ERROR 0x000000000000ffff >#define MC_STATUS_MODEL_ERROR 0x00000000ffff0000 >#define MC_STATUS_OTHER_INFO 0x01ffffff00000000 >#define MC_STATUS_COR_COUNT 0x001fffc000000000 /* If MCG_CAP_CMCI_P */ >#define MC_STATUS_TES_STATUS 0x0060000000000000 /* If MCG_CAP_TES_P */ >#define MC_STATUS_AR 0x0080000000000000 /* If MCG_CAP_TES_P */ >#define MC_STATUS_S 0x0100000000000000 /* If MCG_CAP_TES_P */ >#define MC_STATUS_PCC 0x0200000000000000 >#define MC_STATUS_ADDRV 0x0400000000000000 >#define MC_STATUS_MISCV 0x0800000000000000 >#define MC_STATUS_EN 0x1000000000000000 >#define MC_STATUS_UC 0x2000000000000000 >#define MC_STATUS_OVER 0x4000000000000000 >#define MC_STATUS_VAL 0x8000000000000000 >#define MC_MISC_RA_LSB 0x000000000000003f /* If MCG_CAP_SER_P */ >#define MC_MISC_ADDRESS_MODE 0x00000000000001c0 /* If MCG_CAP_SER_P */ >#define MC_MISC_PCIE_RID 0x00000000ffff0000 >#define MC_MISC_PCIE_FUNC 0x0000000000070000 >#define MC_MISC_PCIE_SLOT 0x0000000000f80000 >#define MC_MISC_PCIE_BUS 0x00000000ff000000 >#define MC_MISC_PCIE_SEG 0x000000ff00000000 >#define MC_CTL2_THRESHOLD 0x0000000000007fff >#define MC_CTL2_CMCI_EN 0x0000000040000000 >#define MC_AMDNB_BANK 4 >#define MC_MISC_AMD_VAL 0x8000000000000000 /* Counter presence valid */ >#define MC_MISC_AMD_CNTP 0x4000000000000000 /* Counter present */ >#define MC_MISC_AMD_LOCK 0x2000000000000000 /* Register locked */ >#define MC_MISC_AMD_INTP 0x1000000000000000 /* Int. type can generate interrupts */ >#define MC_MISC_AMD_LVT_MASK 0x00f0000000000000 /* Extended LVT offset */ >#define MC_MISC_AMD_LVT_SHIFT 52 >#define MC_MISC_AMD_CNTEN 0x0008000000000000 /* Counter enabled */ >#define MC_MISC_AMD_INT_MASK 0x0006000000000000 /* Interrupt type */ >#define MC_MISC_AMD_INT_LVT 0x0002000000000000 /* Interrupt via Extended LVT */ >#define MC_MISC_AMD_INT_SMI 0x0004000000000000 /* SMI */ >#define MC_MISC_AMD_OVERFLOW 0x0001000000000000 /* Counter overflow */ >#define MC_MISC_AMD_CNT_MASK 0x00000fff00000000 /* Counter value */ >#define MC_MISC_AMD_CNT_SHIFT 32 >#define MC_MISC_AMD_CNT_MAX 0xfff >#define MC_MISC_AMD_PTR_MASK 0x00000000ff000000 /* Pointer to additional registers */ >#define MC_MISC_AMD_PTR_SHIFT 24 > >/* AMD Scalable MCA */ >#define MSR_SMCA_MC0_CTL 0xc0002000 >#define MSR_SMCA_MC0_STATUS 0xc0002001 >#define MSR_SMCA_MC0_ADDR 0xc0002002 >#define MSR_SMCA_MC0_MISC0 0xc0002003 >#define MSR_SMCA_MC_CTL(x) (MSR_SMCA_MC0_CTL + 0x10 * (x)) >#define MSR_SMCA_MC_STATUS(x) (MSR_SMCA_MC0_STATUS + 0x10 * (x)) >#define MSR_SMCA_MC_ADDR(x) (MSR_SMCA_MC0_ADDR + 0x10 * (x)) >#define MSR_SMCA_MC_MISC(x) (MSR_SMCA_MC0_MISC0 + 0x10 * (x)) > >/* > * The following four 3-byte registers control the non-cacheable regions. > * These registers must be written as three separate bytes. > * > * NCRx+0: A31-A24 of starting address > * NCRx+1: A23-A16 of starting address > * NCRx+2: A15-A12 of starting address | NCR_SIZE_xx. > * > * The non-cacheable region's starting address must be aligned to the > * size indicated by the NCR_SIZE_xx field. > */ >#define NCR1 0xc4 >#define NCR2 0xc7 >#define NCR3 0xca >#define NCR4 0xcd > >#define NCR_SIZE_0K 0 >#define NCR_SIZE_4K 1 >#define NCR_SIZE_8K 2 >#define NCR_SIZE_16K 3 >#define NCR_SIZE_32K 4 >#define NCR_SIZE_64K 5 >#define NCR_SIZE_128K 6 >#define NCR_SIZE_256K 7 >#define NCR_SIZE_512K 8 >#define NCR_SIZE_1M 9 >#define NCR_SIZE_2M 10 >#define NCR_SIZE_4M 11 >#define NCR_SIZE_8M 12 >#define NCR_SIZE_16M 13 >#define NCR_SIZE_32M 14 >#define NCR_SIZE_4G 15 > >/* > * The address region registers are used to specify the location and > * size for the eight address regions. > * > * ARRx + 0: A31-A24 of start address > * ARRx + 1: A23-A16 of start address > * ARRx + 2: A15-A12 of start address | ARR_SIZE_xx > */ >#define ARR0 0xc4 >#define ARR1 0xc7 >#define ARR2 0xca >#define ARR3 0xcd >#define ARR4 0xd0 >#define ARR5 0xd3 >#define ARR6 0xd6 >#define ARR7 0xd9 > >#define ARR_SIZE_0K 0 >#define ARR_SIZE_4K 1 >#define ARR_SIZE_8K 2 >#define ARR_SIZE_16K 3 >#define ARR_SIZE_32K 4 >#define ARR_SIZE_64K 5 >#define ARR_SIZE_128K 6 >#define ARR_SIZE_256K 7 >#define ARR_SIZE_512K 8 >#define ARR_SIZE_1M 9 >#define ARR_SIZE_2M 10 >#define ARR_SIZE_4M 11 >#define ARR_SIZE_8M 12 >#define ARR_SIZE_16M 13 >#define ARR_SIZE_32M 14 >#define ARR_SIZE_4G 15 > >/* > * The region control registers specify the attributes associated with > * the ARRx address regions. > */ >#define RCR0 0xdc >#define RCR1 0xdd >#define RCR2 0xde >#define RCR3 0xdf >#define RCR4 0xe0 >#define RCR5 0xe1 >#define RCR6 0xe2 >#define RCR7 0xe3 > >#define RCR_RCD 0x01 /* Disables caching for ARRx (x = 0-6). */ >#define RCR_RCE 0x01 /* Enables caching for ARR7. */ >#define RCR_WWO 0x02 /* Weak write ordering. */ >#define RCR_WL 0x04 /* Weak locking. */ >#define RCR_WG 0x08 /* Write gathering. */ >#define RCR_WT 0x10 /* Write-through. */ >#define RCR_NLB 0x20 /* LBA# pin is not asserted. */ > >/* AMD Write Allocate Top-Of-Memory and Control Register */ >#define AMD_WT_ALLOC_TME 0x40000 /* top-of-memory enable */ >#define AMD_WT_ALLOC_PRE 0x20000 /* programmable range enable */ >#define AMD_WT_ALLOC_FRE 0x10000 /* fixed (A0000-FFFFF) range enable */ > >/* AMD64 MSR's */ >#define MSR_EFER 0xc0000080 /* extended features */ >#define MSR_STAR 0xc0000081 /* legacy mode SYSCALL target/cs/ss */ >#define MSR_LSTAR 0xc0000082 /* long mode SYSCALL target rip */ >#define MSR_CSTAR 0xc0000083 /* compat mode SYSCALL target rip */ >#define MSR_SF_MASK 0xc0000084 /* syscall flags mask */ >#define MSR_FSBASE 0xc0000100 /* base address of the %fs "segment" */ >#define MSR_GSBASE 0xc0000101 /* base address of the %gs "segment" */ >#define MSR_KGSBASE 0xc0000102 /* base address of the kernel %gs */ >#define MSR_TSC_AUX 0xc0000103 >#define MSR_PERFEVSEL0 0xc0010000 >#define MSR_PERFEVSEL1 0xc0010001 >#define MSR_PERFEVSEL2 0xc0010002 >#define MSR_PERFEVSEL3 0xc0010003 >#define MSR_K7_PERFCTR0 0xc0010004 >#define MSR_K7_PERFCTR1 0xc0010005 >#define MSR_K7_PERFCTR2 0xc0010006 >#define MSR_K7_PERFCTR3 0xc0010007 >#define MSR_SYSCFG 0xc0010010 >#define MSR_HWCR 0xc0010015 >#define MSR_IORRBASE0 0xc0010016 >#define MSR_IORRMASK0 0xc0010017 >#define MSR_IORRBASE1 0xc0010018 >#define MSR_IORRMASK1 0xc0010019 >#define MSR_TOP_MEM 0xc001001a /* boundary for ram below 4G */ >#define MSR_TOP_MEM2 0xc001001d /* boundary for ram above 4G */ >#define MSR_NB_CFG1 0xc001001f /* NB configuration 1 */ >#define MSR_K8_UCODE_UPDATE 0xc0010020 /* update microcode */ >#define MSR_MC0_CTL_MASK 0xc0010044 >#define MSR_AMDK8_IPM 0xc0010055 >#define MSR_P_STATE_LIMIT 0xc0010061 /* P-state Current Limit Register */ >#define MSR_P_STATE_CONTROL 0xc0010062 /* P-state Control Register */ >#define MSR_P_STATE_STATUS 0xc0010063 /* P-state Status Register */ >#define MSR_P_STATE_CONFIG(n) (0xc0010064 + (n)) /* P-state Config */ >#define MSR_SMM_ADDR 0xc0010112 /* SMM TSEG base address */ >#define MSR_SMM_MASK 0xc0010113 /* SMM TSEG address mask */ >#define MSR_VM_CR 0xc0010114 /* SVM: feature control */ >#define MSR_VM_HSAVE_PA 0xc0010117 /* SVM: host save area address */ >#define MSR_AMD_CPUID07 0xc0011002 /* CPUID 07 %ebx override */ >#define MSR_EXTFEATURES 0xc0011005 /* Extended CPUID Features override */ >#define MSR_LS_CFG 0xc0011020 >#define MSR_IC_CFG 0xc0011021 /* Instruction Cache Configuration */ >#define MSR_DE_CFG 0xc0011029 /* Decode Configuration */ > >/* MSR_AMDK8_IPM */ >#define AMDK8_SMIONCMPHALT (1ULL << 27) >#define AMDK8_C1EONCMPHALT (1ULL << 28) > >/* MSR_VM_CR related */ >#define VM_CR_SVMDIS 0x10 /* SVM: disabled by BIOS */ > >/* MSR_DE_CFG */ >#define DE_CFG_10H_12H_STACK_POINTER_JUMP_FIX_BIT 0x1 >#define DE_CFG_ZEN_LOAD_STALE_DATA_FIX_BIT 0x2000 >#define DE_CFG_ZEN2_FP_BACKUP_FIX_BIT 0x200 > >/* VIA ACE crypto featureset: for via_feature_rng */ >#define VIA_HAS_RNG 1 /* cpu has RNG */ > >/* VIA ACE crypto featureset: for via_feature_xcrypt */ >#define VIA_HAS_AES 1 /* cpu has AES */ >#define VIA_HAS_SHA 2 /* cpu has SHA1 & SHA256 */ >#define VIA_HAS_MM 4 /* cpu has RSA instructions */ >#define VIA_HAS_AESCTR 8 /* cpu has AES-CTR instructions */ > >/* Centaur Extended Feature flags */ >#define VIA_CPUID_HAS_RNG 0x000004 >#define VIA_CPUID_DO_RNG 0x000008 >#define VIA_CPUID_HAS_ACE 0x000040 >#define VIA_CPUID_DO_ACE 0x000080 >#define VIA_CPUID_HAS_ACE2 0x000100 >#define VIA_CPUID_DO_ACE2 0x000200 >#define VIA_CPUID_HAS_PHE 0x000400 >#define VIA_CPUID_DO_PHE 0x000800 >#define VIA_CPUID_HAS_PMM 0x001000 >#define VIA_CPUID_DO_PMM 0x002000 > >/* VIA ACE xcrypt-* instruction context control options */ >#define VIA_CRYPT_CWLO_ROUND_M 0x0000000f >#define VIA_CRYPT_CWLO_ALG_M 0x00000070 >#define VIA_CRYPT_CWLO_ALG_AES 0x00000000 >#define VIA_CRYPT_CWLO_KEYGEN_M 0x00000080 >#define VIA_CRYPT_CWLO_KEYGEN_HW 0x00000000 >#define VIA_CRYPT_CWLO_KEYGEN_SW 0x00000080 >#define VIA_CRYPT_CWLO_NORMAL 0x00000000 >#define VIA_CRYPT_CWLO_INTERMEDIATE 0x00000100 >#define VIA_CRYPT_CWLO_ENCRYPT 0x00000000 >#define VIA_CRYPT_CWLO_DECRYPT 0x00000200 >#define VIA_CRYPT_CWLO_KEY128 0x0000000a /* 128bit, 10 rds */ >#define VIA_CRYPT_CWLO_KEY192 0x0000040c /* 192bit, 12 rds */ >#define VIA_CRYPT_CWLO_KEY256 0x0000080e /* 256bit, 15 rds */ > >#endif /* !_MACHINE_SPECIALREG_H_ */ ># 1283 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/specialreg.h" 3 4 >#endif /* specialreg.h expanded by -frewrite-includes */ ># 6 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/specialreg.h" 2 3 4 >#endif /* specialreg.h expanded by -frewrite-includes */ ># 36 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" 2 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* sysarch.h expanded by -frewrite-includes */ >#include <machine/sysarch.h> >#else /* sysarch.h expanded by -frewrite-includes */ ># 36 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/sysarch.h" 1 3 4 >/*- > * This file is in the public domain. > */ > >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* sysarch.h expanded by -frewrite-includes */ >#include <x86/sysarch.h> >#else /* sysarch.h expanded by -frewrite-includes */ ># 5 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/sysarch.h" 3 4 ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/sysarch.h" 1 3 4 >/*- > * SPDX-License-Identifier: BSD-3-Clause > * > * Copyright (c) 1993 The Regents of the University of California. > * All rights reserved. > * > * 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. > */ > >/* > * Architecture specific syscalls (X86) > */ >#ifndef _MACHINE_SYSARCH_H_ >#define _MACHINE_SYSARCH_H_ > >#if 0 /* expanded by -frewrite-includes */ >#include <sys/cdefs.h> >#endif /* expanded by -frewrite-includes */ ># 38 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/sysarch.h" 3 4 ># 39 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/sysarch.h" 3 4 > >#define I386_GET_LDT 0 >#define I386_SET_LDT 1 >#define LDT_AUTO_ALLOC 0xffffffff > /* I386_IOPL */ >#define I386_GET_IOPERM 3 >#define I386_SET_IOPERM 4 > /* xxxxx */ >#define I386_VM86 6 /* XXX Not implementable on amd64 */ >#define I386_GET_FSBASE 7 >#define I386_SET_FSBASE 8 >#define I386_GET_GSBASE 9 >#define I386_SET_GSBASE 10 >#define I386_GET_XFPUSTATE 11 >#define I386_SET_PKRU 12 >#define I386_CLEAR_PKRU 13 > >/* Leave space for 0-127 for to avoid translating syscalls */ >#define AMD64_GET_FSBASE 128 >#define AMD64_SET_FSBASE 129 >#define AMD64_GET_GSBASE 130 >#define AMD64_SET_GSBASE 131 >#define AMD64_GET_XFPUSTATE 132 >#define AMD64_SET_PKRU 133 >#define AMD64_CLEAR_PKRU 134 > >/* Flags for AMD64_SET_PKRU */ >#define AMD64_PKRU_EXCL 0x0001 >#define AMD64_PKRU_PERSIST 0x0002 > >struct i386_ioperm_args { > unsigned int start; > unsigned int length; > int enable; >}; > >#ifdef __i386__ >struct i386_ldt_args { > unsigned int start; > union descriptor *descs; > unsigned int num; >}; > >struct i386_vm86_args { > int sub_op; /* sub-operation to perform */ > char *sub_args; /* args */ >}; > >struct i386_get_xfpustate { > void *addr; > int len; >}; >#else ># 92 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/sysarch.h" 3 4 >struct i386_ldt_args { > unsigned int start; > struct user_segment_descriptor *descs __packed; > unsigned int num; >}; > >struct i386_get_xfpustate { > unsigned int addr; > int len; >}; > >struct i386_set_pkru { > unsigned int addr; > unsigned int len; > unsigned int keyidx; > int flags; >}; > >struct amd64_get_xfpustate { > void *addr; > int len; >}; >#endif ># 115 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/sysarch.h" 3 4 > >struct amd64_set_pkru { > void *addr; > unsigned long len; > unsigned int keyidx; > int flags; >}; > >#ifndef _KERNEL >union descriptor; >struct dbreg; > >__BEGIN_DECLS >int i386_get_ldt(int, union descriptor *, int); >int i386_set_ldt(int, union descriptor *, int); >int i386_get_ioperm(unsigned int, unsigned int *, int *); >int i386_set_ioperm(unsigned int, unsigned int, int); >int i386_vm86(int, void *); >int i386_get_fsbase(void **); >int i386_get_gsbase(void **); >int i386_set_fsbase(void *); >int i386_set_gsbase(void *); >int i386_set_watch(int, unsigned int, int, int, struct dbreg *); >int i386_clr_watch(int, struct dbreg *); >int amd64_get_fsbase(void **); >int amd64_get_gsbase(void **); >int amd64_set_fsbase(void *); >int amd64_set_gsbase(void *); >int x86_pkru_get_perm(unsigned int keyidx, int *access, int *modify); >int x86_pkru_set_perm(unsigned int keyidx, int access, int modify); >int x86_pkru_protect_range(void *addr, unsigned long len, unsigned int keyidx, > int flag); >int x86_pkru_unprotect_range(void *addr, unsigned long len); >int sysarch(int, void *); >__END_DECLS >#else ># 151 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/sysarch.h" 3 4 >struct thread; >union descriptor; > >int i386_get_ldt(struct thread *, struct i386_ldt_args *); >int i386_set_ldt(struct thread *, struct i386_ldt_args *, union descriptor *); >int i386_get_ioperm(struct thread *, struct i386_ioperm_args *); >int i386_set_ioperm(struct thread *, struct i386_ioperm_args *); >int amd64_get_ldt(struct thread *, struct i386_ldt_args *); >int amd64_set_ldt(struct thread *, struct i386_ldt_args *, > struct user_segment_descriptor *); >int amd64_get_ioperm(struct thread *, struct i386_ioperm_args *); >int amd64_set_ioperm(struct thread *, struct i386_ioperm_args *); >#endif ># 164 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/sysarch.h" 3 4 > >#endif /* !_MACHINE_SYSARCH_H_ */ ># 166 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/sysarch.h" 3 4 >#endif /* sysarch.h expanded by -frewrite-includes */ ># 6 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/machine/sysarch.h" 2 3 4 >#endif /* sysarch.h expanded by -frewrite-includes */ ># 37 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" 2 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* ifunc.h expanded by -frewrite-includes */ >#include <x86/ifunc.h> >#else /* ifunc.h expanded by -frewrite-includes */ ># 37 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/ifunc.h" 1 3 4 >/*- > * Copyright (c) 2015-2018 The FreeBSD Foundation > * > * This software was developed by Konstantin Belousov <kib@FreeBSD.org> > * under sponsorship from the FreeBSD Foundation. > * > * 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 AUTHOR 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 AUTHOR 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_IFUNC_H >#define __X86_IFUNC_H > >#define DEFINE_IFUNC(qual, ret_type, name, args) \ > static ret_type (*name##_resolver(void))args __used; \ > qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \ > static ret_type (*name##_resolver(void))args > >#define DEFINE_UIFUNC(qual, ret_type, name, args) \ > static ret_type (*name##_resolver(uint32_t, uint32_t, uint32_t, \ > uint32_t))args __used; \ > qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \ > static ret_type (*name##_resolver( \ > uint32_t cpu_feature __unused, \ > uint32_t cpu_feature2 __unused, \ > uint32_t cpu_stdext_feature __unused, \ > uint32_t cpu_stdext_feature2 __unused))args > >#endif ># 48 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/ifunc.h" 3 4 >#endif /* ifunc.h expanded by -frewrite-includes */ ># 38 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" 2 >#if defined(__CLANG_REWRITTEN_INCLUDES) || defined(__CLANG_REWRITTEN_SYSTEM_INCLUDES) /* fpu.h expanded by -frewrite-includes */ >#include <x86/fpu.h> >#else /* fpu.h expanded by -frewrite-includes */ ># 38 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" ># 1 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/fpu.h" 1 3 4 >/*- > * Copyright (c) 1990 The Regents of the University of California. > * All rights reserved. > * > * This code is derived from software contributed to Berkeley by > * William Jolitz. > * > * 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. > */ > >/* > * Floating Point Data Structures and Constants > * W. Jolitz 1/90 > */ > >#ifndef _X86_FPU_H_ >#define _X86_FPU_H_ > >/* Environment information of floating point unit. */ >struct env87 { > int32_t en_cw; /* control word (16bits) */ > int32_t en_sw; /* status word (16bits) */ > int32_t en_tw; /* tag word (16bits) */ > int32_t en_fip; /* fp instruction pointer */ > uint16_t en_fcs; /* fp code segment selector */ > uint16_t en_opcode; /* opcode last executed (11 bits) */ > int32_t en_foo; /* fp operand offset */ > int32_t en_fos; /* fp operand segment selector */ >}; > >/* Contents of each x87 floating point accumulator. */ >struct fpacc87 { > uint8_t fp_bytes[10]; >}; > >/* Floating point context. (i386 fnsave/frstor) */ >struct save87 { > struct env87 sv_env; /* floating point control/status */ > struct fpacc87 sv_ac[8]; /* accumulator contents, 0-7 */ > uint8_t sv_pad0[4]; /* saved status word (now unused) */ > uint8_t sv_pad[64]; >}; > >/* Contents of each SSE extended accumulator. */ >struct xmmacc { > uint8_t xmm_bytes[16]; >}; > >/* Contents of the upper 16 bytes of each AVX extended accumulator. */ >struct ymmacc { > uint8_t ymm_bytes[16]; >}; > >/* Rename structs below depending on machine architecture. */ >#ifdef __i386__ >#define __envxmm32 envxmm >#else ># 80 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/fpu.h" 3 4 >#define __envxmm32 envxmm32 >#define __envxmm64 envxmm >#endif ># 83 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/fpu.h" 3 4 > >struct __envxmm32 { > uint16_t en_cw; /* control word (16bits) */ > uint16_t en_sw; /* status word (16bits) */ > uint16_t en_tw; /* tag word (16bits) */ > uint16_t en_opcode; /* opcode last executed (11 bits) */ > uint32_t en_fip; /* fp instruction pointer */ > uint16_t en_fcs; /* fp code segment selector */ > uint16_t en_pad0; /* padding */ > uint32_t en_foo; /* fp operand offset */ > uint16_t en_fos; /* fp operand segment selector */ > uint16_t en_pad1; /* padding */ > uint32_t en_mxcsr; /* SSE control/status register */ > uint32_t en_mxcsr_mask; /* valid bits in mxcsr */ >}; > >struct __envxmm64 { > uint16_t en_cw; /* control word (16bits) */ > uint16_t en_sw; /* status word (16bits) */ > uint8_t en_tw; /* tag word (8bits) */ > uint8_t en_zero; > uint16_t en_opcode; /* opcode last executed (11 bits ) */ > uint64_t en_rip; /* fp instruction pointer */ > uint64_t en_rdp; /* fp operand pointer */ > uint32_t en_mxcsr; /* SSE control/status register */ > uint32_t en_mxcsr_mask; /* valid bits in mxcsr */ >}; > >/* Floating point context. (i386 fxsave/fxrstor) */ >struct savexmm { > struct __envxmm32 sv_env; > struct { > struct fpacc87 fp_acc; > uint8_t fp_pad[6]; /* padding */ > } sv_fp[8]; > struct xmmacc sv_xmm[8]; > uint8_t sv_pad[224]; >} __aligned(16); > >#ifdef __i386__ >union savefpu { > struct save87 sv_87; > struct savexmm sv_xmm; >}; >#else ># 128 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/fpu.h" 3 4 >/* Floating point context. (amd64 fxsave/fxrstor) */ >struct savefpu { > struct __envxmm64 sv_env; > struct { > struct fpacc87 fp_acc; > uint8_t fp_pad[6]; /* padding */ > } sv_fp[8]; > struct xmmacc sv_xmm[16]; > uint8_t sv_pad[96]; >} __aligned(16); >#endif ># 139 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/fpu.h" 3 4 > >struct xstate_hdr { > uint64_t xstate_bv; > uint64_t xstate_xcomp_bv; > uint8_t xstate_rsrv0[8]; > uint8_t xstate_rsrv[40]; >}; >#define XSTATE_XCOMP_BV_COMPACT (1ULL << 63) > >struct savexmm_xstate { > struct xstate_hdr sx_hd; > struct ymmacc sx_ymm[16]; >}; > >struct savexmm_ymm { > struct __envxmm32 sv_env; > struct { > struct fpacc87 fp_acc; > int8_t fp_pad[6]; /* padding */ > } sv_fp[8]; > struct xmmacc sv_xmm[16]; > uint8_t sv_pad[96]; > struct savexmm_xstate sv_xstate; >} __aligned(64); > >struct savefpu_xstate { > struct xstate_hdr sx_hd; > struct ymmacc sx_ymm[16]; >}; > >struct savefpu_ymm { > struct __envxmm64 sv_env; > struct { > struct fpacc87 fp_acc; > int8_t fp_pad[6]; /* padding */ > } sv_fp[8]; > struct xmmacc sv_xmm[16]; > uint8_t sv_pad[96]; > struct savefpu_xstate sv_xstate; >} __aligned(64); > >#undef __envxmm32 >#undef __envxmm64 > >/* > * The hardware default control word for i387's and later coprocessors is > * 0x37F, giving: > * > * round to nearest > * 64-bit precision > * all exceptions masked. > * > * FreeBSD/i386 uses 53 bit precision for things like fadd/fsub/fsqrt etc > * because of the difference between memory and fpu register stack arguments. > * If its using an intermediate fpu register, it has 80/64 bits to work > * with. If it uses memory, it has 64/53 bits to work with. However, > * gcc is aware of this and goes to a fair bit of trouble to make the > * best use of it. > * > * This is mostly academic for AMD64, because the ABI prefers the use > * SSE2 based math. For FreeBSD/amd64, we go with the default settings. > */ >#define __INITIAL_FPUCW__ 0x037F >#define __INITIAL_FPUCW_I386__ 0x127F >#define __INITIAL_NPXCW__ __INITIAL_FPUCW_I386__ >#define __INITIAL_MXCSR__ 0x1F80 >#define __INITIAL_MXCSR_MASK__ 0xFFBF > >/* > * The current value of %xcr0 is saved in the sv_pad[] field of the FPU > * state in the NT_X86_XSTATE note in core dumps. This offset is chosen > * to match the offset used by NT_X86_XSTATE in other systems. > */ >#define X86_XSTATE_XCR0_OFFSET 464 > >#ifdef _KERNEL >/* > * CR0_MP and CR0_EM are always set. Use CR0_TS to force traps when > * FPU access is disabled. > */ >#define fpu_enable() clts() >#define fpu_disable() load_cr0(rcr0() | CR0_TS) >#endif ># 222 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/fpu.h" 3 4 > >#endif /* !_X86_FPU_H_ */ ># 224 "/home/markj/sb/main/obj/home/markj/sb/main/src/amd64.amd64/tmp/usr/include/x86/fpu.h" 3 4 >#endif /* fpu.h expanded by -frewrite-includes */ ># 39 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" 2 > >#if 0 /* disabled by -frewrite-includes */ >#if defined __i386__ >#endif >#endif /* disabled by -frewrite-includes */ >#if 0 /* evaluated by -frewrite-includes */ ># 41 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" >#define X86_GET_XFPUSTATE I386_GET_XFPUSTATE >typedef struct savexmm savex86_t ; >typedef struct i386_get_xfpustate x86_get_xfpustate_t; >#if 0 /* disabled by -frewrite-includes */ >#if 0 >#elif defined __amd64__ >#endif >#endif /* disabled by -frewrite-includes */ >#elif 1 /* evaluated by -frewrite-includes */ ># 45 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" >#define X86_GET_XFPUSTATE AMD64_GET_XFPUSTATE >typedef struct savefpu savex86_t; >typedef struct amd64_get_xfpustate x86_get_xfpustate_t; >#else ># 49 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" >#error "Wrong arch" >#endif ># 51 "/home/markj/sb/main/src/lib/libc/x86/gen/getcontextx.c" > >static int xstate_sz = 0; > >static int >__getcontextx_size_xfpu(void) >{ > > return (sizeof(ucontext_t) + xstate_sz); >} > >DEFINE_UIFUNC(, int, __getcontextx_size, (void)) >{ > u_int p[4]; > > if ((cpu_feature2 & CPUID2_OSXSAVE) != 0) { > cpuid_count(0xd, 0x0, p); > xstate_sz = p[1] - sizeof(savex86_t); > } > return (__getcontextx_size_xfpu); >} > >static int >__fillcontextx2_xfpu(char *ctx) >{ > x86_get_xfpustate_t xfpu; > ucontext_t *ucp; > > ucp = (ucontext_t *)ctx; > xfpu.addr = (char *)(ucp + 1); > xfpu.len = xstate_sz; > if (sysarch(X86_GET_XFPUSTATE, &xfpu) == -1) > return (-1); > ucp->uc_mcontext.mc_xfpustate = (__register_t)xfpu.addr; > ucp->uc_mcontext.mc_xfpustate_len = xstate_sz; > ucp->uc_mcontext.mc_flags |= _MC_HASFPXSTATE; > return (0); >} > >static int >__fillcontextx2_noxfpu(char *ctx) >{ > ucontext_t *ucp; > > ucp = (ucontext_t *)ctx; > ucp->uc_mcontext.mc_xfpustate = 0; > ucp->uc_mcontext.mc_xfpustate_len = 0; > return (0); >} > >DEFINE_UIFUNC(, int, __fillcontextx2, (char *)) >{ > > return ((cpu_feature2 & CPUID2_OSXSAVE) != 0 ? __fillcontextx2_xfpu : > __fillcontextx2_noxfpu); >} > >int >__fillcontextx(char *ctx) >{ > ucontext_t *ucp; > > ucp = (ucontext_t *)ctx; > if (getcontext(ucp) == -1) > return (-1); > __fillcontextx2(ctx); > return (0); >} > >__weak_reference(__getcontextx, getcontextx); > >ucontext_t * >__getcontextx(void) >{ > char *ctx; > int error; > > ctx = malloc(__getcontextx_size()); > if (ctx == NULL) > return (NULL); > if (__fillcontextx(ctx) == -1) { > error = errno; > free(ctx); > errno = error; > return (NULL); > } > return ((ucontext_t *)ctx); >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 280936
:
252937
|
254508
| 254509