Skip to content

Instantly share code, notes, and snippets.

@arichardson
Created February 21, 2017 16:52
Show Gist options
  • Save arichardson/49b97988a495afaffcdb73f5f6f8ca23 to your computer and use it in GitHub Desktop.
Save arichardson/49b97988a495afaffcdb73f5f6f8ca23 to your computer and use it in GitHub Desktop.
This file has been truncated, but you can view the full file.
# 1 "<built-in>"
# 1 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
/*-
* Copyright (c) 2012-2016 Robert N. M. Watson
* Copyright (c) 2014-2015 SRI International
* All rights reserved.
*
* This software was developed by SRI International and the University of
* Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
* ("CTSRD"), as part of the DARPA CRASH research programme.
*
* 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.
*/
#if 0 /* expanded by -frewrite-includes */
#include <sys/types.h>
#endif /* expanded by -frewrite-includes */
# 32 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 1 3 4
/*-
* 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.
* 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.
*
* @(#)types.h 8.6 (Berkeley) 2/19/95
* $FreeBSD$
*/
#ifndef _SYS_TYPES_H_
#define _SYS_TYPES_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 1 3 4
/*-
* 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.
* 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.
*
* @(#)cdefs.h 8.8 (Berkeley) 1/9/95
* $FreeBSD$
*/
#ifndef _SYS_CDEFS_H_
#define _SYS_CDEFS_H_
/*
* Testing against Clang-specific extensions.
*/
#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __has_extension
#define __has_extension __has_feature
#endif
# 48 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __has_feature
#define __has_feature(x) 0
#endif
# 51 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __has_include
#define __has_include(x) 0
#endif
# 54 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __has_builtin
#define __has_builtin(x) 0
#endif
# 57 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if defined(__cplusplus)
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS }
#else
# 62 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __BEGIN_DECLS
#define __END_DECLS
#endif
# 65 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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.
*/
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
#if __GNUC__ >= 3 || defined(__INTEL_COMPILER)
#define __GNUCLIKE_ASM 3
#define __GNUCLIKE_MATH_BUILTIN_CONSTANTS
#else
# 78 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __GNUCLIKE_ASM 2
#endif
# 80 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __GNUCLIKE___TYPEOF 1
#define __GNUCLIKE___OFFSETOF 1
#define __GNUCLIKE___SECTION 1
#ifndef __INTEL_COMPILER
#define __GNUCLIKE_CTOR_SECTION_HANDLING 1
#endif
# 87 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __GNUCLIKE_BUILTIN_CONSTANT_P 1
#if defined(__INTEL_COMPILER) && defined(__cplusplus) && \
__INTEL_COMPILER < 800
#undef __GNUCLIKE_BUILTIN_CONSTANT_P
#endif
# 93 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if (__GNUC_MINOR__ > 95 || __GNUC__ >= 3)
#define __GNUCLIKE_BUILTIN_VARARGS 1
#define __GNUCLIKE_BUILTIN_STDARG 1
#define __GNUCLIKE_BUILTIN_VAALIST 1
#endif
# 99 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if defined(__GNUC__)
#define __GNUC_VA_LIST_COMPATIBILITY 1
#endif
# 103 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/*
* Compiler memory barriers, specific to gcc and clang.
*/
#if defined(__GNUC__)
#define __compiler_membar() __asm __volatile(" " : : : "memory")
#endif
# 110 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __INTEL_COMPILER
#define __GNUCLIKE_BUILTIN_NEXT_ARG 1
#define __GNUCLIKE_MATH_BUILTIN_RELOPS
#endif
# 115 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __GNUCLIKE_BUILTIN_MEMCPY 1
/* XXX: if __GNUC__ >= 2: not tested everywhere originally, where replaced */
#define __CC_SUPPORTS_INLINE 1
#define __CC_SUPPORTS___INLINE 1
#define __CC_SUPPORTS___INLINE__ 1
#define __CC_SUPPORTS___FUNC__ 1
#define __CC_SUPPORTS_WARNING 1
#define __CC_SUPPORTS_VARADIC_XXX 1 /* see varargs.h */
#define __CC_SUPPORTS_DYNAMIC_ARRAY_INIT 1
#endif /* __GNUC__ || __INTEL_COMPILER */
# 131 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/*
* Macro to test if we're using a specific version of gcc or later.
*/
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
#define __GNUC_PREREQ__(ma, mi) \
(__GNUC__ > (ma) || __GNUC__ == (ma) && __GNUC_MINOR__ >= (mi))
#else
# 139 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __GNUC_PREREQ__(ma, mi) 0
#endif
# 141 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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 defined(__STDC__) || defined(__cplusplus)
#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 __const const /* define reserved names to standard */
#define __signed signed
#define __volatile volatile
#if defined(__cplusplus)
#define __inline inline /* convert to C++ keyword */
#else
# 167 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if !(defined(__CC_SUPPORTS___INLINE))
#define __inline /* delete GCC keyword */
#endif /* ! __CC_SUPPORTS___INLINE */
# 170 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif /* !__cplusplus */
# 171 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#else /* !(__STDC__ || __cplusplus) */
# 173 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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 !defined(__CC_SUPPORTS___INLINE)
#define __const /* delete pseudo-ANSI C keywords */
#define __inline
#define __signed
#define __volatile
/*
* In non-ANSI C environments, new programs will want ANSI-only C keywords
* deleted from the program and old programs will want them left alone.
* When using a compiler other than gcc, programs using the ANSI C keywords
* const, inline etc. as normal identifiers should define -DNO_ANSI_KEYWORDS.
* When using "gcc -traditional", we assume that this is the intent; if
* __GNUC__ is defined but __STDC__ is not, we leave the new keywords alone.
*/
#ifndef NO_ANSI_KEYWORDS
#define const /* delete ANSI C keywords */
#define inline
#define signed
#define volatile
#endif /* !NO_ANSI_KEYWORDS */
# 196 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif /* !__CC_SUPPORTS___INLINE */
# 197 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif /* !(__STDC__ || __cplusplus) */
# 198 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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. They are
* null except for versions of gcc that are known to support the features
* properly (old versions of gcc-2 supported the dead and pure features
* in a different (wrong) way). If we do not provide an implementation
* for a given compiler, let the compile fail if it is told to use
* a feature that we cannot live without.
*/
#ifdef lint
#define __dead2
#define __pure2
#define __unused
#define __packed
#define __aligned(x)
#define __alloc_align(x)
#define __alloc_size(x)
#define __section(x)
#define __weak_symbol
#else
# 219 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __weak_symbol __attribute__((__weak__))
#if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER)
#define __dead2
#define __pure2
#define __unused
#endif
# 225 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7 && !defined(__INTEL_COMPILER)
#define __dead2 __attribute__((__noreturn__))
#define __pure2 __attribute__((__const__))
#define __unused
/* XXX Find out what to do for __packed, __aligned and __section */
#endif
# 231 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if __GNUC_PREREQ__(2, 7) || defined(__INTEL_COMPILER)
#define __dead2 __attribute__((__noreturn__))
#define __pure2 __attribute__((__const__))
#define __unused __attribute__((__unused__))
#define __used __attribute__((__used__))
#define __packed __attribute__((__packed__))
#define __aligned(x) __attribute__((__aligned__(x)))
#define __section(x) __attribute__((__section__(x)))
#endif
# 240 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if __GNUC_PREREQ__(4, 3) || __has_attribute(__alloc_size__)
#define __alloc_size(x) __attribute__((__alloc_size__(x)))
#else
# 243 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __alloc_size(x)
#endif
# 245 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if __GNUC_PREREQ__(4, 9) || __has_attribute(__alloc_align__)
#define __alloc_align(x) __attribute__((__alloc_align__(x)))
#else
# 248 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __alloc_align(x)
#endif
# 250 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif /* lint */
# 251 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if !__GNUC_PREREQ__(2, 95)
#define __alignof(x) __offsetof(struct { char __a; x __b; }, __b)
#endif
# 255 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/*
* Keywords added in C11.
*/
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L || defined(lint)
#if !__has_extension(c_alignas)
#if (defined(__cplusplus) && __cplusplus >= 201103L) || \
__has_extension(cxx_alignas)
#define _Alignas(x) alignas(x)
#else
# 267 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/* XXX: Only emulates _Alignas(constant-expression); not _Alignas(type-name). */
#define _Alignas(x) __aligned(x)
#endif
# 270 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 271 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if defined(__cplusplus) && __cplusplus >= 201103L
#define _Alignof(x) alignof(x)
#else
# 275 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define _Alignof(x) __alignof(x)
#endif
# 277 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if !defined(__cplusplus) && !__has_extension(c_atomic) && \
!__has_extension(cxx_atomic)
/*
* No native support for _Atomic(). Place object in structure to prevent
* most forms of direct non-atomic access.
*/
#define _Atomic(T) struct { T volatile __val; }
#endif
# 286 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if defined(__cplusplus) && __cplusplus >= 201103L
#define _Noreturn [[noreturn]]
#else
# 290 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define _Noreturn __dead2
#endif
# 292 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if !__has_extension(c_static_assert)
#if (defined(__cplusplus) && __cplusplus >= 201103L) || \
__has_extension(cxx_static_assert)
#define _Static_assert(x, y) static_assert(x, y)
#elif __GNUC_PREREQ__(4,6)
# 298 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/* Nothing, gcc 4.6 and higher has _Static_assert built-in */
#elif defined(__COUNTER__)
# 300 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define _Static_assert(x, y) __Static_assert(x, __COUNTER__)
#define __Static_assert(x, y) ___Static_assert(x, y)
#define ___Static_assert(x, y) typedef char __assert_ ## y[(x) ? 1 : -1] \
__unused
#else
# 305 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define _Static_assert(x, y) struct __hack
#endif
# 307 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 308 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if !__has_extension(c_thread_local)
/*
* XXX: Some compilers (Clang 3.3, GCC 4.7) falsely announce C++11 mode
* without actually supporting the thread_local keyword. Don't check for
* the presence of C++11 when defining _Thread_local.
*/
#if /* (defined(__cplusplus) && __cplusplus >= 201103L) || */ \
__has_extension(cxx_thread_local)
#define _Thread_local thread_local
#else
# 319 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define _Thread_local __thread
#endif
# 321 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 322 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif /* __STDC_VERSION__ || __STDC_VERSION__ < 201112L */
# 324 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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.
*/
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || \
__has_extension(c_generic_selections)
#define __generic(expr, t, yes, no) \
_Generic(expr, t: yes, default: no)
#elif __GNUC_PREREQ__(3, 1) && !defined(__cplusplus)
# 339 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __generic(expr, t, yes, no) \
__builtin_choose_expr( \
__builtin_types_compatible_p(__typeof(expr), t), yes, no)
#endif
# 343 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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 !defined(__cplusplus) && \
(!defined(__STDC_VERSION) || (__STDC_VERSION__ >= 199901))
#define __min_size(x) static (x)
#else
# 355 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __min_size(x) (x)
#endif
# 357 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if __GNUC_PREREQ__(2, 96)
#define __malloc_like __attribute__((__malloc__))
#define __pure __attribute__((__pure__))
#else
# 362 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __malloc_like
#define __pure
#endif
# 365 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if __GNUC_PREREQ__(3, 1) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 800)
#define __always_inline __attribute__((__always_inline__))
#else
# 369 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __always_inline
#endif
# 371 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if __GNUC_PREREQ__(3, 1)
#define __noinline __attribute__ ((__noinline__))
#else
# 375 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __noinline
#endif
# 377 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if __GNUC_PREREQ__(3, 3)
#define __nonnull(x) __attribute__((__nonnull__(x)))
#define __nonnull_all __attribute__((__nonnull__))
#else
# 382 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __nonnull(x)
#define __nonnull_all
#endif
# 385 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if __GNUC_PREREQ__(3, 4)
#define __fastcall __attribute__((__fastcall__))
#define __result_use_check __attribute__((__warn_unused_result__))
#else
# 390 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __fastcall
#define __result_use_check
#endif
# 393 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if __GNUC_PREREQ__(4, 1)
#define __returns_twice __attribute__((__returns_twice__))
#else
# 397 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __returns_twice
#endif
# 399 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if __GNUC_PREREQ__(4, 6) || __has_builtin(__builtin_unreachable)
#define __unreachable() __builtin_unreachable()
#else
# 403 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __unreachable() ((void)0)
#endif
# 405 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/* XXX: should use `#if __STDC_VERSION__ < 199901'. */
#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
#define __func__ NULL
#endif
# 410 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if (defined(__INTEL_COMPILER) || (defined(__GNUC__) && __GNUC__ >= 2)) && !defined(__STRICT_ANSI__) || __STDC_VERSION__ >= 199901
#define __LONG_LONG_SUPPORTED
#endif
# 414 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/* C++11 exposes a load of C99 stuff */
#if defined(__cplusplus) && __cplusplus >= 201103L
#define __LONG_LONG_SUPPORTED
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS
#endif
# 421 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
# 424 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 425 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/*
* GCC 2.95 provides `__restrict' as an extension to C90 to support the
* C99-specific `restrict' type qualifier. We happen to use `__restrict' as
* a way to define the `restrict' type qualifier without disturbing older
* software that is unaware of C99 keywords.
*/
#if !(__GNUC__ == 2 && __GNUC_MINOR__ == 95)
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901 || defined(lint)
#define __restrict
#else
# 436 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __restrict restrict
#endif
# 438 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 439 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/*
* GNU C version 2.96 adds explicit branch prediction so that
* the CPU back-end can hint 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.
*
* The following two macros provide us with a way to utilize this
* compiler feature. Use __predict_true() if you expect the expression
* to evaluate to true, and __predict_false() if you expect the
* expression to evaluate to false.
*
* A few notes about usage:
*
* * Generally, __predict_false() error condition checks (unless
* you have some _strong_ reason to do otherwise, in which case
* document it), and/or __predict_true() `no-error' condition
* checks, assuming you want to optimize for the no-error case.
*
* * Other than that, if you don't know the likelihood of a test
* succeeding from empirical or other `hard' evidence, don't
* make predictions.
*
* * These are meant to be used in places that are run `a lot'.
* It is wasteful to make predictions in code that is run
* seldomly (e.g. at subsystem initialization time) as the
* basic block reordering that this affects can often generate
* larger code.
*/
#if __GNUC_PREREQ__(2, 96)
#define __predict_true(exp) __builtin_expect((exp), 1)
#define __predict_false(exp) __builtin_expect((exp), 0)
#else
# 472 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __predict_true(exp) (exp)
#define __predict_false(exp) (exp)
#endif
# 475 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if __GNUC_PREREQ__(4, 0)
#define __null_sentinel __attribute__((__sentinel__))
#define __exported __attribute__((__visibility__("default")))
#define __hidden __attribute__((__visibility__("hidden")))
#else
# 481 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __null_sentinel
#define __exported
#define __hidden
#endif
# 485 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/*
* We define this here since <stddef.h>, <sys/queue.h>, and <sys/types.h>
* require it.
*/
#if __GNUC_PREREQ__(4, 1)
#define __offsetof(type, field) __builtin_offsetof(type, field)
#else
# 493 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __cplusplus
#define __offsetof(type, field) \
((__size_t)(__uintptr_t)((const volatile void *)&((type *)0)->field))
#else
# 497 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __offsetof(type, field) \
(__offsetof__ (reinterpret_cast <__size_t> \
(&reinterpret_cast <const volatile char &> \
(static_cast<type *> (0)->field))))
#endif
# 502 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 503 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#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.
*/
#if __GNUC_PREREQ__(3, 1)
#define __containerof(x, s, m) ({ \
const volatile __typeof(((s *)0)->m) *__x = (x); \
__DEQUALIFY(s *, (const volatile char *)__x - __offsetof(s, m));\
})
#else
# 518 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __containerof(x, s, m) \
__DEQUALIFY(s *, (const volatile char *)(x) - __offsetof(s, m))
#endif
# 521 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/*
* Compiler-dependent macros to declare that functions take printf-like
* or scanf-like arguments. They are null except for versions of gcc
* that are known to support the features properly (old versions of gcc-2
* didn't permit keeping the keywords out of the application namespace).
*/
#if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER)
#define __printflike(fmtarg, firstvararg)
#define __scanflike(fmtarg, firstvararg)
#define __format_arg(fmtarg)
#define __strfmonlike(fmtarg, firstvararg)
#define __strftimelike(fmtarg, firstvararg)
#else
# 535 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#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)))
#endif
# 545 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/*
* FORTIFY_SOURCE, and perhaps other compiler-specific features, require
* the use of non-standard inlining. In general we should try to avoid
* using these but GCC-compatible compilers tend to support the extensions
* well enough to use them in limited cases.
*/
#if defined(__GNUC_GNU_INLINE__) || defined(__GNUC_STDC_INLINE__)
#if __GNUC_PREREQ__(4, 3) || __has_attribute(__artificial__)
#define __gnu_inline __attribute__((__gnu_inline__, __artificial__))
#else
# 556 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __gnu_inline __attribute__((__gnu_inline__))
#endif /* artificial */
# 558 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#else
# 559 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __gnu_inline
#endif
# 561 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/* Compiler-dependent macros that rely on FreeBSD-specific extensions. */
#if defined(__FreeBSD_cc_version) && __FreeBSD_cc_version >= 300001 && \
defined(__GNUC__) && !defined(__INTEL_COMPILER)
#define __printf0like(fmtarg, firstvararg) \
__attribute__((__format__ (__printf0__, fmtarg, firstvararg)))
#else
# 568 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __printf0like(fmtarg, firstvararg)
#endif
# 570 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
#ifndef __INTEL_COMPILER
#define __strong_reference(sym,aliassym) \
extern __typeof (sym) aliassym __attribute__ ((__alias__ (#sym)))
#endif
# 576 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#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")
#define __sym_compat(sym,impl,verid) \
__asm__(".symver " #impl ", " #sym "@" #verid)
#define __sym_default(sym,impl,verid) \
__asm__(".symver " #impl ", " #sym "@@" #verid)
#else
# 589 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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")
#define __sym_compat(sym,impl,verid) \
__asm__(".symver impl, sym@verid")
#define __sym_default(impl,sym,verid) \
__asm__(".symver impl, sym@@verid")
#endif /* __STDC__ */
# 601 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif /* __GNUC__ || __INTEL_COMPILER */
# 602 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __GLOBL1(sym) __asm__(".globl " #sym)
#define __GLOBL(sym) __GLOBL1(sym)
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
#define __IDSTRING(name,string) __asm__(".ident\t\"" string "\"")
#else
# 609 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/*
* The following definition might not work well if used in header files,
* but it should be better than nothing. If you want a "do nothing"
* version, then it should generate some harmless declaration, such as:
* #define __IDSTRING(name,string) struct __hack
*/
#define __IDSTRING(name,string) static const char name[] __unused = string
#endif
# 617 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/*
* 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:
* __FBSDID("$FreeBSD$");
*/
#ifndef __FBSDID
#if !defined(lint) && !defined(STRIP_FBSDID)
#define __FBSDID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
#else
# 628 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __FBSDID(s) struct __hack
#endif
# 630 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 631 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __RCSID
#ifndef NO__RCSID
#define __RCSID(s) __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
#else
# 636 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __RCSID(s) struct __hack
#endif
# 638 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 639 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 644 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __RCSID_SOURCE(s) struct __hack
#endif
# 646 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 647 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __SCCSID
#ifndef NO__SCCSID
#define __SCCSID(s) __IDSTRING(__CONCAT(__sccsid_,__LINE__),s)
#else
# 652 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __SCCSID(s) struct __hack
#endif
# 654 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 655 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __COPYRIGHT
#ifndef NO__COPYRIGHT
#define __COPYRIGHT(s) __IDSTRING(__CONCAT(__copyright_,__LINE__),s)
#else
# 660 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __COPYRIGHT(s) struct __hack
#endif
# 662 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 663 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __DECONST
#if !__has_feature(capabilities)
#define __DECONST(type, var) ((type)(__uintptr_t)(const void *)(var))
#else
# 668 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __DECONST(type, var) ((type)(__intcap_t)(__capability const void *)(var))
#endif
# 670 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 671 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __DEVOLATILE
#if !__has_feature(capabilities)
#define __DEVOLATILE(type, var) ((type)(__uintptr_t)(volatile void *)(var))
#else
# 676 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __DEVOLATILE(type, var) ((type)(__intcap_t)(__capability volatile void *)(var))
#endif
# 678 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 679 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifndef __DEQUALIFY
#if !__has_feature(capabilities)
#define __DEQUALIFY(type, var) ((type)(__uintptr_t)(const volatile void *)(var))
#else
# 684 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __DEQUALIFY(type, var) ((type)(__intcap_t)(__capability const volatile void *)(var))
#endif
# 686 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 687 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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:
* defined(_POSIX_SOURCE) 1003.1-1988
* _POSIX_C_SOURCE == 1 1003.1-1990
* _POSIX_C_SOURCE == 2 1003.2-1992 C Language Binding Option
* _POSIX_C_SOURCE == 199309 1003.1b-1993
* _POSIX_C_SOURCE == 199506 1003.1c-1995, 1003.1i-1995,
* and the omnibus ISO/IEC 9945-1: 1996
* _POSIX_C_SOURCE == 200112 1003.1-2001
* _POSIX_C_SOURCE == 200809 1003.1-2008
*
* 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 defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 1
#undef _POSIX_C_SOURCE /* Probably illegal, but beyond caring now. */
#define _POSIX_C_SOURCE 199009
#endif
# 716 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/* Deal with IEEE Std. 1003.2-1992, in which _POSIX_C_SOURCE == 2. */
#if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE == 2
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 199209
#endif
# 722 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/* Deal with various X/Open Portability Guides and Single UNIX Spec. */
#ifdef _XOPEN_SOURCE
#if _XOPEN_SOURCE - 0 >= 700
#define __XSI_VISIBLE 700
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809
#elif _XOPEN_SOURCE - 0 >= 600
# 730 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __XSI_VISIBLE 600
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200112
#elif _XOPEN_SOURCE - 0 >= 500
# 734 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __XSI_VISIBLE 500
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 199506
#endif
# 738 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 739 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/*
* Deal with all versions of POSIX. The ordering relative to the tests above is
* important.
*/
#if defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE)
#define _POSIX_C_SOURCE 198808
#endif
# 747 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#ifdef _POSIX_C_SOURCE
#if _POSIX_C_SOURCE >= 200809
#define __POSIX_VISIBLE 200809
#define __ISO_C_VISIBLE 1999
#elif _POSIX_C_SOURCE >= 200112
# 752 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __POSIX_VISIBLE 200112
#define __ISO_C_VISIBLE 1999
#elif _POSIX_C_SOURCE >= 199506
# 755 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __POSIX_VISIBLE 199506
#define __ISO_C_VISIBLE 1990
#elif _POSIX_C_SOURCE >= 199309
# 758 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __POSIX_VISIBLE 199309
#define __ISO_C_VISIBLE 1990
#elif _POSIX_C_SOURCE >= 199209
# 761 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __POSIX_VISIBLE 199209
#define __ISO_C_VISIBLE 1990
#elif _POSIX_C_SOURCE >= 199009
# 764 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __POSIX_VISIBLE 199009
#define __ISO_C_VISIBLE 1990
#else
# 767 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __POSIX_VISIBLE 198808
#define __ISO_C_VISIBLE 0
#endif /* _POSIX_C_SOURCE */
# 770 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#else
# 771 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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 defined(_ANSI_SOURCE) /* Hide almost everything. */
#define __POSIX_VISIBLE 0
#define __XSI_VISIBLE 0
#define __BSD_VISIBLE 0
#define __ISO_C_VISIBLE 1990
#elif defined(_C99_SOURCE) /* Localism to specify strict C99 env. */
# 789 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
#elif defined(_C11_SOURCE) /* Localism to specify strict C11 env. */
# 794 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
#else /* Default environment: show everything. */
# 799 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
#endif
# 804 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 805 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#if defined(__mips) || defined(__powerpc64__) || defined(__riscv__)
#define __NO_TLS 1
#endif
# 809 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
/*
* Old versions of GCC use non-standard ARM arch symbols; acle-compat.h
* translates them to __ARM_ARCH and the modern feature symbols defined by ARM.
*/
#if defined(__arm__) && !defined(__ARM_ARCH)
#if 0 /* expanded by -frewrite-includes */
#include <machine/acle-compat.h>
#endif /* expanded by -frewrite-includes */
# 815 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
# 816 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif
# 817 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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 __has_attribute(__argument_with_type_tag__) && \
__has_attribute(__type_tag_for_datatype__) && !defined(lint)
#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
# 832 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 835 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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 __has_extension(c_thread_safety_attributes)
#define __lock_annotate(x) __attribute__((x))
#else
# 851 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __lock_annotate(x)
#endif
# 853 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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)
/* 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))
/* Specify that a file requires capabilities */
#if __has_feature(capabilities)
#define __REQUIRE_CAPABILITIES
#else
# 897 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#define __REQUIRE_CAPABILITIES \
_Pragma("GCC error \"This file requires a capability-aware compiler\"")
#endif
# 900 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
#endif /* !_SYS_CDEFS_H_ */
# 902 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cdefs.h" 3 4
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 2 3 4
/* Machine type dependent parameters. */
#if 0 /* expanded by -frewrite-includes */
#include <machine/endian.h>
#endif /* expanded by -frewrite-includes */
# 44 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 1 3 4
/*-
* 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.
* 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.
*
* @(#)endian.h 7.8 (Berkeley) 4/3/91
* $FreeBSD$
*/
#ifndef _MACHINE_ENDIAN_H_
#define _MACHINE_ENDIAN_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
#ifndef __ASSEMBLER__
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_types.h" 1 3 4
/*-
* 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.
*
* $FreeBSD$
*/
#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/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_types.h" 3 4
# 33 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_types.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <machine/_types.h>
#endif /* expanded by -frewrite-includes */
# 33 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_types.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 1 3 4
/*-
* 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.
*
* From: @(#)ansi.h 8.2 (Berkeley) 1/4/94
* From: @(#)types.h 8.3 (Berkeley) 1/5/94
* from: src/sys/i386/include/_types.h,v 1.12 2005/07/02 23:13:31 thompsa
* $FreeBSD$
*/
#ifndef _MACHINE__TYPES_H_
#define _MACHINE__TYPES_H_
#ifndef _SYS_CDEFS_H_
#error this file needs sys/cdefs.h as a prerequisite
#endif
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
/*
* Basic types upon which most other types are built.
*/
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;
#ifdef __mips_n64
typedef long __int64_t;
typedef unsigned long __uint64_t;
#else
# 60 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
#ifndef lint
__extension__
#endif
# 63 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
/* LONGLONG */
typedef long long __int64_t;
#ifndef lint
__extension__
#endif
# 68 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
/* LONGLONG */
typedef unsigned long long __uint64_t;
#endif
# 71 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
/*
* Standard type definitions.
*/
typedef __int32_t __clock_t; /* clock()... */
typedef double __double_t;
typedef float __float_t;
#ifdef __mips_n64
#ifndef __CHERI_PURE_CAPABILITY__
typedef __int64_t __critical_t;
typedef __int64_t __intfptr_t;
typedef __int64_t __intptr_t;
#else
# 84 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
typedef __intcap_t __critical_t;
typedef __intcap_t __intfptr_t;
typedef __intcap_t __intptr_t;
#endif
# 88 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
#else
# 89 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
typedef __int32_t __critical_t;
typedef __int32_t __intfptr_t;
typedef __int32_t __intptr_t;
#endif
# 93 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
typedef __int64_t __intmax_t;
typedef __int32_t __int_fast8_t;
typedef __int32_t __int_fast16_t;
typedef __int32_t __int_fast32_t;
typedef __int64_t __int_fast64_t;
typedef __int8_t __int_least8_t;
typedef __int16_t __int_least16_t;
typedef __int32_t __int_least32_t;
typedef __int64_t __int_least64_t;
#if defined(__mips_n64) || defined(__mips_n32)
typedef __int64_t __register_t;
typedef __int64_t f_register_t;
#else
# 106 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
typedef __int32_t __register_t;
typedef __int32_t f_register_t;
#endif
# 109 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
#ifdef __mips_n64
typedef __int64_t __ptrdiff_t;
typedef __int64_t __segsz_t;
typedef __uint64_t __size_t;
typedef __int64_t __ssize_t;
#ifndef __CHERI_PURE_CAPABILITY__
typedef __uint64_t __uintfptr_t;
typedef __uint64_t __uintptr_t;
#else
# 118 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
typedef __uintcap_t __uintfptr_t;
typedef __uintcap_t __uintptr_t;
#endif
# 121 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
#else
# 122 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
typedef __int32_t __ptrdiff_t; /* ptr1 - ptr2 */
typedef __int32_t __segsz_t; /* segment size (in pages) */
typedef __uint32_t __size_t; /* sizeof() */
typedef __int32_t __ssize_t; /* byte count or error */
typedef __uint32_t __uintfptr_t;
typedef __uint32_t __uintptr_t;
#endif
# 129 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
typedef __int64_t __time_t; /* time()... */
typedef __uint64_t __uintmax_t;
typedef __uint32_t __uint_fast8_t;
typedef __uint32_t __uint_fast16_t;
typedef __uint32_t __uint_fast32_t;
typedef __uint64_t __uint_fast64_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;
#if defined(__mips_n64) || defined(__mips_n32)
typedef __uint64_t __u_register_t;
#else
# 142 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
typedef __uint32_t __u_register_t;
#endif
# 144 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
#ifdef __mips_n64
typedef __uint64_t __vm_offset_t;
typedef __uint64_t __vm_size_t;
#else
# 148 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
typedef __uint32_t __vm_offset_t;
typedef __uint32_t __vm_size_t;
#endif
# 151 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
#if defined(__mips_n64) || defined(__mips_n32) /* PHYSADDR_64_BIT */
typedef __uint64_t __vm_paddr_t;
#else
# 154 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
typedef __uint32_t __vm_paddr_t;
#endif
# 156 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
typedef __int64_t __vm_ooffset_t;
typedef __uint64_t __vm_pindex_t;
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 */
/*
* Unusual type definitions.
*/
#ifdef __GNUCLIKE_BUILTIN_VARARGS
typedef __builtin_va_list __va_list; /* internally known to gcc */
#else
# 170 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
typedef char * __va_list;
#endif /* __GNUCLIKE_BUILTIN_VARARGS */
# 172 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
#if defined(__GNUC_VA_LIST_COMPATIBILITY) && !defined(__GNUC_VA_LIST) \
&& !defined(__NO_GNUC_VA_LIST)
#define __GNUC_VA_LIST
typedef __va_list __gnuc_va_list; /* compatibility w/GNU headers*/
#endif
# 177 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
#endif /* !_MACHINE__TYPES_H_ */
# 179 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_types.h" 3 4
# 34 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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 __uint32_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 __uint16_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 __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. */
/*
* 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 !defined(__clang__) || !defined(__cplusplus)
typedef __uint_least16_t __char16_t;
typedef __uint_least32_t __char32_t;
#endif
# 97 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_types.h" 3 4
/* In C++11, char16_t and char32_t are built-in types. */
#if defined(__cplusplus) && __cplusplus >= 201103L
#define _CHAR16_T_DECLARED
#define _CHAR32_T_DECLARED
#endif
# 102 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_types.h" 3 4
typedef struct {
long long __max_align1 __aligned(_Alignof(long long));
long double __max_align2 __aligned(_Alignof(long double));
} __max_align_t;
typedef __uint32_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;
#endif /* !_SYS__TYPES_H_ */
# 124 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_types.h" 3 4
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 2 3 4
#endif
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
#ifdef __cplusplus
extern "C" {
#endif
# 44 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
/*
* Definitions for byte order, according to byte significance from low
* address to high.
*/
#define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
#define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
#define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
#ifdef __MIPSEB__
#define _BYTE_ORDER _BIG_ENDIAN
#else
# 56 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
#define _BYTE_ORDER _LITTLE_ENDIAN
#endif /* __MIBSEB__ */
# 58 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
/*
* Deprecated variants that don't have enough underscores to be useful in more
* strict namespaces.
*/
#if __BSD_VISIBLE
#define LITTLE_ENDIAN _LITTLE_ENDIAN
#define BIG_ENDIAN _BIG_ENDIAN
#define PDP_ENDIAN _PDP_ENDIAN
#define BYTE_ORDER _BYTE_ORDER
#endif
# 69 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
#ifndef __ASSEMBLER__
#if defined(__GNUCLIKE_BUILTIN_CONSTANT_P) && defined(__OPTIMIZE__)
#define __is_constant(x) __builtin_constant_p(x)
#else
# 74 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
#define __is_constant(x) 0
#endif
# 76 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
#define __bswap16_const(x) (((x) >> 8) | (((x) << 8) & 0xff00))
#define __bswap32_const(x) (((x) >> 24) | (((x) >> 8) & 0xff00) | \
(((x) << 8) & 0xff0000) | (((x) << 24) & 0xff000000))
#define __bswap64_const(x) (((x) >> 56) | (((x) >> 40) & 0xff00) | \
(((x) >> 24) & 0xff0000) | (((x) >> 8) & 0xff000000) | \
(((x) << 8) & ((__uint64_t)0xff << 32)) | \
(((x) << 24) & ((__uint64_t)0xff << 40)) | \
(((x) << 40) & ((__uint64_t)0xff << 48)) | (((x) << 56)))
static __inline __uint16_t
__bswap16_var(__uint16_t _x)
{
return ((_x >> 8) | ((_x << 8) & 0xff00));
}
static __inline __uint32_t
__bswap32_var(__uint32_t _x)
{
return ((_x >> 24) | ((_x >> 8) & 0xff00) | ((_x << 8) & 0xff0000) |
((_x << 24) & 0xff000000));
}
static __inline __uint64_t
__bswap64_var(__uint64_t _x)
{
return ((_x >> 56) | ((_x >> 40) & 0xff00) | ((_x >> 24) & 0xff0000) |
((_x >> 8) & 0xff000000) | ((_x << 8) & ((__uint64_t)0xff << 32)) |
((_x << 24) & ((__uint64_t)0xff << 40)) |
((_x << 40) & ((__uint64_t)0xff << 48)) | ((_x << 56)));
}
#define __bswap16(x) ((__uint16_t)(__is_constant((x)) ? \
__bswap16_const((__uint16_t)(x)) : __bswap16_var((__uint16_t)(x))))
#define __bswap32(x) ((__uint32_t)(__is_constant((x)) ? \
__bswap32_const((__uint32_t)(x)) : __bswap32_var((__uint32_t)(x))))
#define __bswap64(x) ((__uint64_t)(__is_constant((x)) ? \
__bswap64_const((__uint64_t)(x)) : __bswap64_var((__uint64_t)(x))))
#ifdef __MIPSEB__
#define __htonl(x) ((__uint32_t)(x))
#define __htons(x) ((__uint16_t)(x))
#define __ntohl(x) ((__uint32_t)(x))
#define __ntohs(x) ((__uint16_t)(x))
/*
* Define the order of 32-bit words in 64-bit words.
*/
/*
* XXXMIPS: Additional parentheses to make gcc more happy.
*/
#define _QUAD_HIGHWORD 0
#define _QUAD_LOWWORD 1
#else
# 132 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
#define _QUAD_HIGHWORD 1
#define _QUAD_LOWWORD 0
#define __ntohl(x) (__bswap32((x)))
#define __ntohs(x) (__bswap16((x)))
#define __htonl(x) (__bswap32((x)))
#define __htons(x) (__bswap16((x)))
#endif /* _MIPSEB */
# 139 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
#endif /* _ASSEMBLER_ */
# 141 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
#ifdef __cplusplus
}
#endif
# 145 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
#endif /* !_MACHINE_ENDIAN_H_ */
# 147 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/endian.h" 3 4
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_pthreadtypes.h>
#endif /* expanded by -frewrite-includes */
# 47 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_pthreadtypes.h" 1 3 4
/*
* 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.
*
* $FreeBSD$
*/
#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/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_pthreadtypes.h" 3 4
# 48 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 2 3 4
#if __BSD_VISIBLE
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
# 58 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#endif
# 59 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
/*
* XXX POSIX sized integrals that should appear only in <sys/stdint.h>.
*/
#if 0 /* expanded by -frewrite-includes */
#include <sys/_stdint.h>
#endif /* expanded by -frewrite-includes */
# 63 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 1 3 4
/*-
* 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.
*
* $FreeBSD$
*/
#ifndef _SYS__STDINT_H_
#define _SYS__STDINT_H_
#ifndef _INT8_T_DECLARED
typedef __int8_t int8_t;
#define _INT8_T_DECLARED
#endif
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#ifndef _INT16_T_DECLARED
typedef __int16_t int16_t;
#define _INT16_T_DECLARED
#endif
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#ifndef _INT32_T_DECLARED
typedef __int32_t int32_t;
#define _INT32_T_DECLARED
#endif
# 47 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#ifndef _INT64_T_DECLARED
typedef __int64_t int64_t;
#define _INT64_T_DECLARED
#endif
# 52 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#ifndef _UINT8_T_DECLARED
typedef __uint8_t uint8_t;
#define _UINT8_T_DECLARED
#endif
# 57 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#ifndef _UINT16_T_DECLARED
typedef __uint16_t uint16_t;
#define _UINT16_T_DECLARED
#endif
# 62 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#ifndef _UINT32_T_DECLARED
typedef __uint32_t uint32_t;
#define _UINT32_T_DECLARED
#endif
# 67 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#ifndef _UINT64_T_DECLARED
typedef __uint64_t uint64_t;
#define _UINT64_T_DECLARED
#endif
# 72 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#ifndef _INTPTR_T_DECLARED
typedef __intptr_t intptr_t;
#define _INTPTR_T_DECLARED
#endif
# 77 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#ifndef _UINTPTR_T_DECLARED
typedef __uintptr_t uintptr_t;
#define _UINTPTR_T_DECLARED
#endif
# 81 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#ifndef _INTMAX_T_DECLARED
typedef __intmax_t intmax_t;
#define _INTMAX_T_DECLARED
#endif
# 85 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#ifndef _UINTMAX_T_DECLARED
typedef __uintmax_t uintmax_t;
#define _UINTMAX_T_DECLARED
#endif
# 89 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#ifndef __CHERI_PURE_CAPABILITY__
typedef __uintptr_t vaddr_t;
#else
# 93 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
typedef __uint64_t vaddr_t;
#endif
# 95 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
#endif /* !_SYS__STDINT_H_ */
# 97 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_stdint.h" 3 4
# 64 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 81 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 90 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _CLOCK_T_DECLARED
typedef __clock_t clock_t;
#define _CLOCK_T_DECLARED
#endif
# 95 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _CLOCKID_T_DECLARED
typedef __clockid_t clockid_t;
#define _CLOCKID_T_DECLARED
#endif
# 100 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
typedef __critical_t critical_t; /* Critical section value */
typedef __int64_t daddr_t; /* disk address */
#ifndef _DEV_T_DECLARED
typedef __dev_t dev_t; /* device number or struct cdev */
#define _DEV_T_DECLARED
#endif
# 108 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _FFLAGS_T_DECLARED
typedef __fflags_t fflags_t; /* file flags */
#define _FFLAGS_T_DECLARED
#endif
# 113 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 121 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _GID_T_DECLARED
typedef __gid_t gid_t; /* group id */
#define _GID_T_DECLARED
#endif
# 126 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 131 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 136 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 141 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _INO_T_DECLARED
typedef __ino_t ino_t; /* inode number */
#define _INO_T_DECLARED
#endif
# 146 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 151 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 156 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _MODE_T_DECLARED
typedef __mode_t mode_t; /* permissions */
#define _MODE_T_DECLARED
#endif
# 161 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _ACCMODE_T_DECLARED
typedef __accmode_t accmode_t; /* access permissions */
#define _ACCMODE_T_DECLARED
#endif
# 166 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _NLINK_T_DECLARED
typedef __nlink_t nlink_t; /* link count */
#define _NLINK_T_DECLARED
#endif
# 171 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _OFF_T_DECLARED
typedef __off_t off_t; /* file offset */
#define _OFF_T_DECLARED
#endif
# 176 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 181 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _PID_T_DECLARED
typedef __pid_t pid_t; /* process id */
#define _PID_T_DECLARED
#endif
# 186 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 193 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
typedef __int64_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
# 202 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _SSIZE_T_DECLARED
typedef __ssize_t ssize_t;
#define _SSIZE_T_DECLARED
#endif
# 207 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _SUSECONDS_T_DECLARED
typedef __suseconds_t suseconds_t; /* microseconds (signed) */
#define _SUSECONDS_T_DECLARED
#endif
# 212 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _TIME_T_DECLARED
typedef __time_t time_t;
#define _TIME_T_DECLARED
#endif
# 217 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _TIMER_T_DECLARED
typedef __timer_t timer_t;
#define _TIMER_T_DECLARED
#endif
# 222 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _MQD_T_DECLARED
typedef __mqd_t mqd_t;
#define _MQD_T_DECLARED
#endif
# 227 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 234 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _USECONDS_T_DECLARED
typedef __useconds_t useconds_t; /* microseconds (unsigned) */
#define _USECONDS_T_DECLARED
#endif
# 239 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 244 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 251 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
typedef __vm_offset_t vm_offset_t;
typedef __vm_ooffset_t vm_ooffset_t;
typedef __vm_paddr_t vm_paddr_t;
typedef __vm_pindex_t vm_pindex_t;
typedef __vm_size_t vm_size_t;
typedef __rman_res_t rman_res_t;
#ifdef _KERNEL
typedef 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;
#if !defined(__bool_true_false_are_defined) && !defined(__cplusplus)
#define __bool_true_false_are_defined 1
#define false 0
#define true 1
#if __STDC_VERSION__ < 199901L && __GNUC__ < 3 && !defined(__INTEL_COMPILER)
typedef int _Bool;
#endif
# 289 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
typedef _Bool bool;
#endif /* !__bool_true_false_are_defined && !__cplusplus */
# 291 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#define offsetof(type, field) __offsetof(type, field)
#endif /* !_KERNEL */
# 295 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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.
*/
#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
# 308 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.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
# 351 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.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
# 360 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#define __bitcount(x) __bitcount32((unsigned int)(x))
#endif
# 362 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#if __BSD_VISIBLE
#if 0 /* expanded by -frewrite-includes */
#include <sys/select.h>
#endif /* expanded by -frewrite-includes */
# 365 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 1 3 4
/*-
* 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.
* 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.
*
* $FreeBSD$
*/
#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/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_sigset.h>
#endif /* expanded by -frewrite-includes */
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_sigset.h" 1 3 4
/*-
* 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.
* 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.
*
* @(#)signal.h 8.4 (Berkeley) 5/4/95
* $FreeBSD$
*/
#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) (1 << (_SIG_IDX(sig) & 31))
#define _SIG_VALID(sig) ((sig) <= _SIG_MAXSIG && (sig) > 0)
typedef struct __sigset {
__uint32_t __bits[_SIG_WORDS];
} __sigset_t;
#if defined(_KERNEL) && defined(COMPAT_43)
typedef unsigned int osigset_t;
#endif
# 58 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_sigset.h" 3 4
#endif /* !_SYS__SIGSET_H_ */
# 60 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_sigset.h" 3 4
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_timeval.h>
#endif /* expanded by -frewrite-includes */
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_timeval.h" 1 3 4
/*-
* 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.
*
* $FreeBSD$
*/
#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/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_timeval.h" 3 4
# 33 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_timeval.h" 3 4
#ifndef _SUSECONDS_T_DECLARED
typedef __suseconds_t suseconds_t;
#define _SUSECONDS_T_DECLARED
#endif
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_timeval.h" 3 4
#ifndef _TIME_T_DECLARED
typedef __time_t time_t;
#define _TIME_T_DECLARED
#endif
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_timeval.h" 3 4
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/timespec.h>
#endif /* expanded by -frewrite-includes */
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/timespec.h" 1 3 4
/*-
* 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.
* 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.
*
* @(#)time.h 8.5 (Berkeley) 5/4/95
* from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp
* $FreeBSD$
*/
#ifndef _SYS_TIMESPEC_H_
#define _SYS_TIMESPEC_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/timespec.h" 3 4
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/timespec.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_timespec.h>
#endif /* expanded by -frewrite-includes */
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/timespec.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_timespec.h" 1 3 4
/*-
* 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.
* 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.
*
* @(#)time.h 8.5 (Berkeley) 5/4/95
* from: FreeBSD: src/sys/sys/time.h,v 1.43 2000/03/20 14:09:05 phk Exp
* $FreeBSD$
*/
#ifndef _SYS__TIMESPEC_H_
#define _SYS__TIMESPEC_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_timespec.h" 3 4
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_timespec.h" 3 4
#ifndef _TIME_T_DECLARED
typedef __time_t time_t;
#define _TIME_T_DECLARED
#endif
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_timespec.h" 3 4
struct timespec {
time_t tv_sec; /* seconds */
long tv_nsec; /* and nanoseconds */
};
#endif /* !_SYS__TIMESPEC_H_ */
# 50 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_timespec.h" 3 4
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/timespec.h" 2 3 4
#if __BSD_VISIBLE
#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 */
# 53 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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_ */
# 64 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/timespec.h" 3 4
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 2 3 4
typedef unsigned long __fd_mask;
#if __BSD_VISIBLE
typedef __fd_mask fd_mask;
#endif
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
#ifndef _SIGSET_T_DECLARED
#define _SIGSET_T_DECLARED
typedef __sigset_t sigset_t;
#endif
# 51 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 61 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
#define _NFDBITS (sizeof(__fd_mask) * 8) /* bits per mask */
#if __BSD_VISIBLE
#define NFDBITS _NFDBITS
#endif
# 66 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
#ifndef _howmany
#define _howmany(x, y) (((x) + ((y) - 1)) / (y))
#endif
# 70 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
typedef struct fd_set {
__fd_mask __fds_bits[_howmany(FD_SETSIZE, _NFDBITS)];
} fd_set;
#if __BSD_VISIBLE
#define fds_bits __fds_bits
#endif
# 77 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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[(n)/_NFDBITS] &= ~__fdset_mask(n))
#if __BSD_VISIBLE
#define FD_COPY(f, t) (void)(*(t) = *(f))
#endif
# 83 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
#define FD_ISSET(n, p) (((p)->__fds_bits[(n)/_NFDBITS] & __fdset_mask(n)) != 0)
#define FD_SET(n, p) ((p)->__fds_bits[(n)/_NFDBITS] |= __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
# 105 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
__END_DECLS
#endif /* !_KERNEL */
# 107 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
#endif /* _SYS_SELECT_H_ */
# 109 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/select.h" 3 4
# 366 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 2 3 4
/*
* minor() gives a cookie instead of an index since we don't want to
* change the meanings of bits 0-15 or waste time and space shifting
* bits 16-31 for devices that don't use them.
*/
#define major(x) ((int)(((u_int)(x) >> 8)&0xff)) /* major number */
#define minor(x) ((int)((x)&0xffff00ff)) /* minor number */
#define makedev(x,y) ((dev_t)(((x) << 8) | (y))) /* create dev_t */
/*
* 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
# 387 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _LSEEK_DECLARED
#define _LSEEK_DECLARED
off_t lseek(int, off_t, int);
#endif
# 391 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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
# 395 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#ifndef _TRUNCATE_DECLARED
#define _TRUNCATE_DECLARED
int truncate(const char *, off_t);
#endif
# 399 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
__END_DECLS
#endif /* !_KERNEL */
# 401 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#endif /* __BSD_VISIBLE */
# 403 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
#endif /* !_SYS_TYPES_H_ */
# 405 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/types.h" 3 4
# 33 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <sys/stat.h>
#endif /* expanded by -frewrite-includes */
# 33 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 1 3 4
/*-
* 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.
* 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.
*
* @(#)stat.h 8.12 (Berkeley) 6/16/95
* $FreeBSD$
*/
#ifndef _SYS_STAT_H_
#define _SYS_STAT_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_timespec.h>
#endif /* expanded by -frewrite-includes */
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
# 44 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifndef _BLKSIZE_T_DECLARED
typedef __blksize_t blksize_t;
#define _BLKSIZE_T_DECLARED
#endif
# 49 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifndef _BLKCNT_T_DECLARED
typedef __blkcnt_t blkcnt_t;
#define _BLKCNT_T_DECLARED
#endif
# 54 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifndef _DEV_T_DECLARED
typedef __dev_t dev_t;
#define _DEV_T_DECLARED
#endif
# 59 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifndef _FFLAGS_T_DECLARED
typedef __fflags_t fflags_t;
#define _FFLAGS_T_DECLARED
#endif
# 64 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifndef _GID_T_DECLARED
typedef __gid_t gid_t;
#define _GID_T_DECLARED
#endif
# 69 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifndef _INO_T_DECLARED
typedef __ino_t ino_t;
#define _INO_T_DECLARED
#endif
# 74 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifndef _MODE_T_DECLARED
typedef __mode_t mode_t;
#define _MODE_T_DECLARED
#endif
# 79 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifndef _NLINK_T_DECLARED
typedef __nlink_t nlink_t;
#define _NLINK_T_DECLARED
#endif
# 84 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifndef _OFF_T_DECLARED
typedef __off_t off_t;
#define _OFF_T_DECLARED
#endif
# 89 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifndef _UID_T_DECLARED
typedef __uid_t uid_t;
#define _UID_T_DECLARED
#endif
# 94 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#if !defined(_KERNEL) && __BSD_VISIBLE
/*
* XXX We get miscellaneous namespace pollution with this.
*/
#if 0 /* expanded by -frewrite-includes */
#include <sys/time.h>
#endif /* expanded by -frewrite-includes */
# 99 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 1 3 4
/*-
* 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.
* 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.
*
* @(#)time.h 8.5 (Berkeley) 5/4/95
* $FreeBSD$
*/
#ifndef _SYS_TIME_H_
#define _SYS_TIME_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/_timeval.h>
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/types.h>
#endif /* expanded by -frewrite-includes */
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/timespec.h>
#endif /* expanded by -frewrite-includes */
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
struct timezone {
int tz_minuteswest; /* minutes west of Greenwich */
int tz_dsttime; /* type of dst correction */
};
#define DST_NONE 0 /* not on dst */
#define DST_USA 1 /* USA style dst */
#define DST_AUST 2 /* Australian style dst */
#define DST_WET 3 /* Western European dst */
#define DST_MET 4 /* Middle European dst */
#define DST_EET 5 /* Eastern European dst */
#define DST_CAN 6 /* Canada */
#if __BSD_VISIBLE
struct bintime {
time_t sec;
uint64_t frac;
};
static __inline void
bintime_addx(struct bintime *_bt, uint64_t _x)
{
uint64_t _u;
_u = _bt->frac;
_bt->frac += _x;
if (_u > _bt->frac)
_bt->sec++;
}
static __inline void
bintime_add(struct bintime *_bt, const struct bintime *_bt2)
{
uint64_t _u;
_u = _bt->frac;
_bt->frac += _bt2->frac;
if (_u > _bt->frac)
_bt->sec++;
_bt->sec += _bt2->sec;
}
static __inline void
bintime_sub(struct bintime *_bt, const struct bintime *_bt2)
{
uint64_t _u;
_u = _bt->frac;
_bt->frac -= _bt2->frac;
if (_u < _bt->frac)
_bt->sec--;
_bt->sec -= _bt2->sec;
}
static __inline void
bintime_mul(struct bintime *_bt, u_int _x)
{
uint64_t _p1, _p2;
_p1 = (_bt->frac & 0xffffffffull) * _x;
_p2 = (_bt->frac >> 32) * _x + (_p1 >> 32);
_bt->sec *= _x;
_bt->sec += (_p2 >> 32);
_bt->frac = (_p2 << 32) | (_p1 & 0xffffffffull);
}
static __inline void
bintime_shift(struct bintime *_bt, int _exp)
{
if (_exp > 0) {
_bt->sec <<= _exp;
_bt->sec |= _bt->frac >> (64 - _exp);
_bt->frac <<= _exp;
} else if (_exp < 0) {
_bt->frac >>= -_exp;
_bt->frac |= (uint64_t)_bt->sec << (64 + _exp);
_bt->sec >>= -_exp;
}
}
#define bintime_clear(a) ((a)->sec = (a)->frac = 0)
#define bintime_isset(a) ((a)->sec || (a)->frac)
#define bintime_cmp(a, b, cmp) \
(((a)->sec == (b)->sec) ? \
((a)->frac cmp (b)->frac) : \
((a)->sec cmp (b)->sec))
#define SBT_1S ((sbintime_t)1 << 32)
#define SBT_1M (SBT_1S * 60)
#define SBT_1MS (SBT_1S / 1000)
#define SBT_1US (SBT_1S / 1000000)
#define SBT_1NS (SBT_1S / 1000000000)
#define SBT_MAX 0x7fffffffffffffffLL
static __inline int
sbintime_getsec(sbintime_t _sbt)
{
return (_sbt >> 32);
}
static __inline sbintime_t
bttosbt(const struct bintime _bt)
{
return (((sbintime_t)_bt.sec << 32) + (_bt.frac >> 32));
}
static __inline struct bintime
sbttobt(sbintime_t _sbt)
{
struct bintime _bt;
_bt.sec = _sbt >> 32;
_bt.frac = _sbt << 32;
return (_bt);
}
/*-
* Background information:
*
* When converting between timestamps on parallel timescales of differing
* resolutions it is historical and scientific practice to round down rather
* than doing 4/5 rounding.
*
* The date changes at midnight, not at noon.
*
* Even at 15:59:59.999999999 it's not four'o'clock.
*
* time_second ticks after N.999999999 not after N.4999999999
*/
static __inline void
bintime2timespec(const struct bintime *_bt, struct timespec *_ts)
{
_ts->tv_sec = _bt->sec;
_ts->tv_nsec = ((uint64_t)1000000000 *
(uint32_t)(_bt->frac >> 32)) >> 32;
}
static __inline void
timespec2bintime(const struct timespec *_ts, struct bintime *_bt)
{
_bt->sec = _ts->tv_sec;
/* 18446744073 = int(2^64 / 1000000000) */
_bt->frac = _ts->tv_nsec * (uint64_t)18446744073LL;
}
static __inline void
bintime2timeval(const struct bintime *_bt, struct timeval *_tv)
{
_tv->tv_sec = _bt->sec;
_tv->tv_usec = ((uint64_t)1000000 * (uint32_t)(_bt->frac >> 32)) >> 32;
}
static __inline void
timeval2bintime(const struct timeval *_tv, struct bintime *_bt)
{
_bt->sec = _tv->tv_sec;
/* 18446744073709 = int(2^64 / 1000000) */
_bt->frac = _tv->tv_usec * (uint64_t)18446744073709LL;
}
static __inline struct timespec
sbttots(sbintime_t _sbt)
{
struct timespec _ts;
_ts.tv_sec = _sbt >> 32;
_ts.tv_nsec = ((uint64_t)1000000000 * (uint32_t)_sbt) >> 32;
return (_ts);
}
static __inline sbintime_t
tstosbt(struct timespec _ts)
{
return (((sbintime_t)_ts.tv_sec << 32) +
(_ts.tv_nsec * (((uint64_t)1 << 63) / 500000000) >> 32));
}
static __inline struct timeval
sbttotv(sbintime_t _sbt)
{
struct timeval _tv;
_tv.tv_sec = _sbt >> 32;
_tv.tv_usec = ((uint64_t)1000000 * (uint32_t)_sbt) >> 32;
return (_tv);
}
static __inline sbintime_t
tvtosbt(struct timeval _tv)
{
return (((sbintime_t)_tv.tv_sec << 32) +
(_tv.tv_usec * (((uint64_t)1 << 63) / 500000) >> 32));
}
#endif /* __BSD_VISIBLE */
# 243 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
#ifdef _KERNEL
/* Operations on timespecs */
#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0)
#define timespecisset(tvp) ((tvp)->tv_sec || (tvp)->tv_nsec)
#define timespeccmp(tvp, uvp, cmp) \
(((tvp)->tv_sec == (uvp)->tv_sec) ? \
((tvp)->tv_nsec cmp (uvp)->tv_nsec) : \
((tvp)->tv_sec cmp (uvp)->tv_sec))
#define timespecadd(vvp, uvp) \
do { \
(vvp)->tv_sec += (uvp)->tv_sec; \
(vvp)->tv_nsec += (uvp)->tv_nsec; \
if ((vvp)->tv_nsec >= 1000000000) { \
(vvp)->tv_sec++; \
(vvp)->tv_nsec -= 1000000000; \
} \
} while (0)
#define timespecsub(vvp, uvp) \
do { \
(vvp)->tv_sec -= (uvp)->tv_sec; \
(vvp)->tv_nsec -= (uvp)->tv_nsec; \
if ((vvp)->tv_nsec < 0) { \
(vvp)->tv_sec--; \
(vvp)->tv_nsec += 1000000000; \
} \
} while (0)
/* Operations on timevals. */
#define timevalclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
#define timevalisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
#define timevalcmp(tvp, uvp, cmp) \
(((tvp)->tv_sec == (uvp)->tv_sec) ? \
((tvp)->tv_usec cmp (uvp)->tv_usec) : \
((tvp)->tv_sec cmp (uvp)->tv_sec))
/* timevaladd and timevalsub are not inlined */
#endif /* _KERNEL */
# 284 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
#ifndef _KERNEL /* NetBSD/OpenBSD compatible interfaces */
#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
#define timercmp(tvp, uvp, cmp) \
(((tvp)->tv_sec == (uvp)->tv_sec) ? \
((tvp)->tv_usec cmp (uvp)->tv_usec) : \
((tvp)->tv_sec cmp (uvp)->tv_sec))
#define timeradd(tvp, uvp, vvp) \
do { \
(vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
(vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
if ((vvp)->tv_usec >= 1000000) { \
(vvp)->tv_sec++; \
(vvp)->tv_usec -= 1000000; \
} \
} while (0)
#define timersub(tvp, uvp, vvp) \
do { \
(vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
(vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
if ((vvp)->tv_usec < 0) { \
(vvp)->tv_sec--; \
(vvp)->tv_usec += 1000000; \
} \
} while (0)
#endif
# 312 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
/*
* Names of the interval timers, and structure
* defining a timer setting.
*/
#define ITIMER_REAL 0
#define ITIMER_VIRTUAL 1
#define ITIMER_PROF 2
struct itimerval {
struct timeval it_interval; /* timer interval */
struct timeval it_value; /* current value */
};
/*
* Getkerninfo clock information structure
*/
struct clockinfo {
int hz; /* clock frequency */
int tick; /* micro-seconds per hz tick */
int spare;
int stathz; /* statistics clock frequency */
int profhz; /* profiling clock frequency */
};
/* These macros are also in time.h. */
#ifndef CLOCK_REALTIME
#define CLOCK_REALTIME 0
#define CLOCK_VIRTUAL 1
#define CLOCK_PROF 2
#define CLOCK_MONOTONIC 4
#define CLOCK_UPTIME 5 /* FreeBSD-specific. */
#define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */
#define CLOCK_UPTIME_FAST 8 /* FreeBSD-specific. */
#define CLOCK_REALTIME_PRECISE 9 /* FreeBSD-specific. */
#define CLOCK_REALTIME_FAST 10 /* FreeBSD-specific. */
#define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */
#define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */
#define CLOCK_SECOND 13 /* FreeBSD-specific. */
#define CLOCK_THREAD_CPUTIME_ID 14
#define CLOCK_PROCESS_CPUTIME_ID 15
#endif
# 354 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
#ifndef TIMER_ABSTIME
#define TIMER_RELTIME 0x0 /* relative timer */
#define TIMER_ABSTIME 0x1 /* absolute timer */
#endif
# 359 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
#if __BSD_VISIBLE
#define CPUCLOCK_WHICH_PID 0
#define CPUCLOCK_WHICH_TID 1
#endif
# 364 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
#ifdef _KERNEL
/*
* Kernel to clock driver interface.
*/
void inittodr(time_t base);
void resettodr(void);
extern volatile time_t time_second;
extern volatile time_t time_uptime;
extern struct bintime tc_tick_bt;
extern sbintime_t tc_tick_sbt;
extern struct bintime tick_bt;
extern sbintime_t tick_sbt;
extern int tc_precexp;
extern int tc_timepercentage;
extern struct bintime bt_timethreshold;
extern struct bintime bt_tickthreshold;
extern sbintime_t sbt_timethreshold;
extern sbintime_t sbt_tickthreshold;
/*
* Functions for looking at our clock: [get]{bin,nano,micro}[up]time()
*
* Functions without the "get" prefix returns the best timestamp
* we can produce in the given format.
*
* "bin" == struct bintime == seconds + 64 bit fraction of seconds.
* "nano" == struct timespec == seconds + nanoseconds.
* "micro" == struct timeval == seconds + microseconds.
*
* Functions containing "up" returns time relative to boot and
* should be used for calculating time intervals.
*
* Functions without "up" returns UTC time.
*
* Functions with the "get" prefix returns a less precise result
* much faster than the functions without "get" prefix and should
* be used where a precision of 1/hz seconds is acceptable or where
* performance is priority. (NB: "precision", _not_ "resolution" !)
*/
void binuptime(struct bintime *bt);
void nanouptime(struct timespec *tsp);
void microuptime(struct timeval *tvp);
static __inline sbintime_t
sbinuptime(void)
{
struct bintime _bt;
binuptime(&_bt);
return (bttosbt(_bt));
}
void bintime(struct bintime *bt);
void nanotime(struct timespec *tsp);
void microtime(struct timeval *tvp);
void getbinuptime(struct bintime *bt);
void getnanouptime(struct timespec *tsp);
void getmicrouptime(struct timeval *tvp);
static __inline sbintime_t
getsbinuptime(void)
{
struct bintime _bt;
getbinuptime(&_bt);
return (bttosbt(_bt));
}
void getbintime(struct bintime *bt);
void getnanotime(struct timespec *tsp);
void getmicrotime(struct timeval *tvp);
void getboottime(struct timeval *boottime);
void getboottimebin(struct bintime *boottimebin);
/* Other functions */
int itimerdecr(struct itimerval *itp, int usec);
int itimerfix(struct timeval *tv);
int ppsratecheck(struct timeval *, int *, int);
int ratecheck(struct timeval *, const struct timeval *);
void timevaladd(struct timeval *t1, const struct timeval *t2);
void timevalsub(struct timeval *t1, const struct timeval *t2);
int tvtohz(struct timeval *tv);
#define TC_DEFAULTPERC 5
#define BT2FREQ(bt) \
(((uint64_t)0x8000000000000000 + ((bt)->frac >> 2)) / \
((bt)->frac >> 1))
#define SBT2FREQ(sbt) ((SBT_1S + ((sbt) >> 1)) / (sbt))
#define FREQ2BT(freq, bt) \
{ \
(bt)->sec = 0; \
(bt)->frac = ((uint64_t)0x8000000000000000 / (freq)) << 1; \
}
#define TIMESEL(sbt, sbt2) \
(((sbt2) >= sbt_timethreshold) ? \
((*(sbt) = getsbinuptime()), 1) : ((*(sbt) = sbinuptime()), 0))
#else /* !_KERNEL */
# 472 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <time.h>
#endif /* expanded by -frewrite-includes */
# 472 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 1 3 4
/*
* Copyright (c) 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.
*
* @(#)time.h 8.3 (Berkeley) 1/21/94
*/
/*
* $FreeBSD$
*/
#ifndef _TIME_H_
#define _TIME_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 44 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_null.h>
#endif /* expanded by -frewrite-includes */
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_null.h" 1 3 4
/*-
* 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.
*
* $FreeBSD$
*/
#ifndef NULL
#if !defined(__cplusplus)
#define NULL ((void *)0)
#else
# 34 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_null.h" 3 4
#if __cplusplus >= 201103L
#define NULL nullptr
#elif defined(__GNUG__) && defined(__GNUC__) && __GNUC__ >= 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_null.h" 3 4
#define NULL __null
#else
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_null.h" 3 4
#if defined(__LP64__)
#define NULL (0L)
#else
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_null.h" 3 4
#define NULL 0
#endif /* __LP64__ */
# 44 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_null.h" 3 4
#endif /* __GNUG__ */
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_null.h" 3 4
#endif /* !__cplusplus */
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_null.h" 3 4
#endif
# 48 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_null.h" 3 4
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
# 47 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if __POSIX_VISIBLE > 0 && __POSIX_VISIBLE < 200112 || __BSD_VISIBLE
/*
* Frequency of the clock ticks reported by times(). Deprecated - use
* sysconf(_SC_CLK_TCK) instead. (Removed in 1003.1-2001.)
*/
#define CLK_TCK 128
#endif
# 55 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
/* Frequency of the clock ticks reported by clock(). */
#define CLOCKS_PER_SEC 128
#ifndef _CLOCK_T_DECLARED
typedef __clock_t clock_t;
#define _CLOCK_T_DECLARED
#endif
# 63 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#ifndef _TIME_T_DECLARED
typedef __time_t time_t;
#define _TIME_T_DECLARED
#endif
# 68 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#ifndef _SIZE_T_DECLARED
typedef __size_t size_t;
#define _SIZE_T_DECLARED
#endif
# 73 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if __POSIX_VISIBLE >= 199309
/*
* New in POSIX 1003.1b-1993.
*/
#ifndef _CLOCKID_T_DECLARED
typedef __clockid_t clockid_t;
#define _CLOCKID_T_DECLARED
#endif
# 82 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#ifndef _TIMER_T_DECLARED
typedef __timer_t timer_t;
#define _TIMER_T_DECLARED
#endif
# 87 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/timespec.h>
#endif /* expanded by -frewrite-includes */
# 88 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
# 89 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#endif /* __POSIX_VISIBLE >= 199309 */
# 90 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if __POSIX_VISIBLE >= 200112
#ifndef _PID_T_DECLARED
typedef __pid_t pid_t;
#define _PID_T_DECLARED
#endif
# 96 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#endif
# 97 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
/* These macros are also in sys/time.h. */
#if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112
#define CLOCK_REALTIME 0
#ifdef __BSD_VISIBLE
#define CLOCK_VIRTUAL 1
#define CLOCK_PROF 2
#endif
# 105 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#define CLOCK_MONOTONIC 4
#define CLOCK_UPTIME 5 /* FreeBSD-specific. */
#define CLOCK_UPTIME_PRECISE 7 /* FreeBSD-specific. */
#define CLOCK_UPTIME_FAST 8 /* FreeBSD-specific. */
#define CLOCK_REALTIME_PRECISE 9 /* FreeBSD-specific. */
#define CLOCK_REALTIME_FAST 10 /* FreeBSD-specific. */
#define CLOCK_MONOTONIC_PRECISE 11 /* FreeBSD-specific. */
#define CLOCK_MONOTONIC_FAST 12 /* FreeBSD-specific. */
#define CLOCK_SECOND 13 /* FreeBSD-specific. */
#define CLOCK_THREAD_CPUTIME_ID 14
#define CLOCK_PROCESS_CPUTIME_ID 15
#endif /* !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112 */
# 117 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112
#if __BSD_VISIBLE
#define TIMER_RELTIME 0x0 /* relative timer */
#endif
# 122 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#define TIMER_ABSTIME 0x1 /* absolute timer */
#endif /* !defined(TIMER_ABSTIME) && __POSIX_VISIBLE >= 200112 */
# 124 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
struct tm {
int tm_sec; /* seconds after the minute [0-60] */
int tm_min; /* minutes after the hour [0-59] */
int tm_hour; /* hours since midnight [0-23] */
int tm_mday; /* day of the month [1-31] */
int tm_mon; /* months since January [0-11] */
int tm_year; /* years since 1900 */
int tm_wday; /* days since Sunday [0-6] */
int tm_yday; /* days since January 1 [0-365] */
int tm_isdst; /* Daylight Savings Time flag */
long tm_gmtoff; /* offset from UTC in seconds */
char *tm_zone; /* timezone abbreviation */
};
#if __POSIX_VISIBLE
extern char *tzname[];
#endif
# 142 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
__BEGIN_DECLS
char *asctime(const struct tm *);
clock_t clock(void);
char *ctime(const time_t *);
double difftime(time_t, time_t);
/* XXX missing: getdate() */
struct tm *gmtime(const time_t *);
struct tm *localtime(const time_t *);
time_t mktime(struct tm *);
size_t strftime(char * __restrict, size_t, const char * __restrict,
const struct tm * __restrict);
time_t time(time_t *);
#if __POSIX_VISIBLE >= 200112
struct sigevent;
int timer_create(clockid_t, struct sigevent *__restrict, timer_t *__restrict);
int timer_delete(timer_t);
int timer_gettime(timer_t, struct itimerspec *);
int timer_getoverrun(timer_t);
int timer_settime(timer_t, int, const struct itimerspec *__restrict,
struct itimerspec *__restrict);
#endif
# 164 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if __POSIX_VISIBLE
void tzset(void);
#endif
# 167 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if __POSIX_VISIBLE >= 199309
int clock_getres(clockid_t, struct timespec *);
int clock_gettime(clockid_t, struct timespec *);
int clock_settime(clockid_t, const struct timespec *);
/* XXX missing: clock_nanosleep() */
int nanosleep(const struct timespec *, struct timespec *);
#endif /* __POSIX_VISIBLE >= 199309 */
# 175 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if __POSIX_VISIBLE >= 200112
int clock_getcpuclockid(pid_t, clockid_t *);
#endif
# 179 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if __POSIX_VISIBLE >= 199506
char *asctime_r(const struct tm *, char *);
char *ctime_r(const time_t *, char *);
struct tm *gmtime_r(const time_t *, struct tm *);
struct tm *localtime_r(const time_t *, struct tm *);
#endif
# 186 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if __XSI_VISIBLE
char *strptime(const char * __restrict, const char * __restrict,
struct tm * __restrict);
#endif
# 191 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if __BSD_VISIBLE
char *timezone(int, int); /* XXX XSI conflict */
void tzsetwall(void);
time_t timelocal(struct tm * const);
time_t timegm(struct tm * const);
int timer_oshandle_np(timer_t timerid);
#endif /* __BSD_VISIBLE */
# 199 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
#if 0 /* expanded by -frewrite-includes */
#include <xlocale/_time.h>
#endif /* expanded by -frewrite-includes */
# 201 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_time.h" 1 3 4
/*-
* Copyright (c) 2011, 2012 The FreeBSD Foundation
* All rights reserved.
*
* This software was developed by David Chisnall 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.
*
* $FreeBSD$
*/
#ifndef _LOCALE_T_DEFINED
#define _LOCALE_T_DEFINED
typedef struct _xlocale *locale_t;
#endif
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_time.h" 3 4
/*
* This file is included from both locale.h and xlocale.h. We need to expose
* the declarations unconditionally if we are included from xlocale.h, but only
* if we are in POSIX2008 mode if included from locale.h.
*/
#ifndef _XLOCALE_LOCALE1_H
#define _XLOCALE_LOCALE1_H
size_t strftime_l(char * __restrict, size_t, const char * __restrict,
const struct tm * __restrict, locale_t) __strftimelike(3, 0);
#endif /* _XLOCALE_LOCALE1_H */
# 49 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_time.h" 3 4
#ifdef _XLOCALE_H_
#ifndef _XLOCALE_LOCALE2_H
#define _XLOCALE_LOCALE2_H
char *strptime_l(const char * __restrict, const char * __restrict,
struct tm * __restrict, locale_t);
#endif /* _XLOCALE_LOCALE2_H */
# 58 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_time.h" 3 4
#endif /* _XLOCALE_H_ */
# 59 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_time.h" 3 4
# 202 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 2 3 4
#endif
# 203 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
__END_DECLS
#endif /* !_TIME_H_ */
# 206 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/time.h" 3 4
# 473 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 474 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
# 475 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/select.h>
#endif /* expanded by -frewrite-includes */
# 475 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
# 476 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
__BEGIN_DECLS
int setitimer(int, const struct itimerval *, struct itimerval *);
int utimes(const char *, const struct timeval *);
#if __BSD_VISIBLE
int adjtime(const struct timeval *, struct timeval *);
int clock_getcpuclockid2(id_t, int, clockid_t *);
int futimes(int, const struct timeval *);
int futimesat(int, const char *, const struct timeval [2]);
int lutimes(const char *, const struct timeval *);
int settimeofday(const struct timeval *, const struct timezone *);
#endif
# 489 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
#if __XSI_VISIBLE
int getitimer(int, struct itimerval *);
int gettimeofday(struct timeval *, struct timezone *);
#endif
# 494 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
__END_DECLS
#endif /* !_KERNEL */
# 498 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
#endif /* !_SYS_TIME_H_ */
# 500 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/time.h" 3 4
# 100 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 2 3 4
#endif
# 101 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifdef _KERNEL
struct ostat {
__uint16_t st_dev; /* inode's device */
ino_t st_ino; /* inode's number */
mode_t st_mode; /* inode protection mode */
nlink_t st_nlink; /* number of hard links */
__uint16_t st_uid; /* user ID of the file's owner */
__uint16_t st_gid; /* group ID of the file's group */
__uint16_t st_rdev; /* device type */
__int32_t st_size; /* file size, in bytes */
struct timespec st_atim; /* time of last access */
struct timespec st_mtim; /* time of last data modification */
struct timespec st_ctim; /* time of last file status change */
__int32_t st_blksize; /* optimal blocksize for I/O */
__int32_t st_blocks; /* blocks allocated for file */
fflags_t st_flags; /* user defined flags for file */
__uint32_t st_gen; /* file generation number */
};
#endif
# 121 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
struct stat {
__dev_t st_dev; /* inode's device */
ino_t st_ino; /* inode's number */
mode_t st_mode; /* inode protection mode */
nlink_t st_nlink; /* number of hard links */
uid_t st_uid; /* user ID of the file's owner */
gid_t st_gid; /* group ID of the file's group */
__dev_t st_rdev; /* device type */
struct timespec st_atim; /* time of last access */
struct timespec st_mtim; /* time of last data modification */
struct timespec st_ctim; /* time of last file status change */
off_t st_size; /* file size, in bytes */
blkcnt_t st_blocks; /* blocks allocated for file */
blksize_t st_blksize; /* optimal blocksize for I/O */
fflags_t st_flags; /* user defined flags for file */
__uint32_t st_gen; /* file generation number */
__int32_t st_lspare;
struct timespec st_birthtim; /* time of file creation */
/*
* Explicitly pad st_birthtim to 16 bytes so that the size of
* struct stat is backwards compatible. We use bitfields instead
* of an array of chars so that this doesn't require a C99 compiler
* to compile if the size of the padding is 0. We use 2 bitfields
* to cover up to 64 bits on 32-bit machines. We assume that
* CHAR_BIT is 8...
*/
unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
};
#ifdef _KERNEL
struct nstat {
__dev_t st_dev; /* inode's device */
ino_t st_ino; /* inode's number */
__uint32_t st_mode; /* inode protection mode */
__uint32_t st_nlink; /* number of hard links */
uid_t st_uid; /* user ID of the file's owner */
gid_t st_gid; /* group ID of the file's group */
__dev_t st_rdev; /* device type */
struct timespec st_atim; /* time of last access */
struct timespec st_mtim; /* time of last data modification */
struct timespec st_ctim; /* time of last file status change */
off_t st_size; /* file size, in bytes */
blkcnt_t st_blocks; /* blocks allocated for file */
blksize_t st_blksize; /* optimal blocksize for I/O */
fflags_t st_flags; /* user defined flags for file */
__uint32_t st_gen; /* file generation number */
struct timespec st_birthtim; /* time of file creation */
/*
* See above about the following padding.
*/
unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
unsigned int :(8 / 2) * (16 - (int)sizeof(struct timespec));
};
#endif
# 177 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifndef _KERNEL
#define st_atime st_atim.tv_sec
#define st_mtime st_mtim.tv_sec
#define st_ctime st_ctim.tv_sec
#if __BSD_VISIBLE
#define st_birthtime st_birthtim.tv_sec
#endif
# 185 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
/* For compatibility. */
#if __BSD_VISIBLE
#define st_atimespec st_atim
#define st_mtimespec st_mtim
#define st_ctimespec st_ctim
#define st_birthtimespec st_birthtim
#endif
# 193 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#endif /* !_KERNEL */
# 194 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#define S_ISUID 0004000 /* set user id on execution */
#define S_ISGID 0002000 /* set group id on execution */
#if __BSD_VISIBLE
#define S_ISTXT 0001000 /* sticky bit */
#endif
# 200 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#define S_IRWXU 0000700 /* RWX mask for owner */
#define S_IRUSR 0000400 /* R for owner */
#define S_IWUSR 0000200 /* W for owner */
#define S_IXUSR 0000100 /* X for owner */
#if __BSD_VISIBLE
#define S_IREAD S_IRUSR
#define S_IWRITE S_IWUSR
#define S_IEXEC S_IXUSR
#endif
# 211 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#define S_IRWXG 0000070 /* RWX mask for group */
#define S_IRGRP 0000040 /* R for group */
#define S_IWGRP 0000020 /* W for group */
#define S_IXGRP 0000010 /* X for group */
#define S_IRWXO 0000007 /* RWX mask for other */
#define S_IROTH 0000004 /* R for other */
#define S_IWOTH 0000002 /* W for other */
#define S_IXOTH 0000001 /* X for other */
#if __XSI_VISIBLE
#define S_IFMT 0170000 /* type of file mask */
#define S_IFIFO 0010000 /* named pipe (fifo) */
#define S_IFCHR 0020000 /* character special */
#define S_IFDIR 0040000 /* directory */
#define S_IFBLK 0060000 /* block special */
#define S_IFREG 0100000 /* regular */
#define S_IFLNK 0120000 /* symbolic link */
#define S_IFSOCK 0140000 /* socket */
#define S_ISVTX 0001000 /* save swapped text even after use */
#endif
# 233 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#if __BSD_VISIBLE
#define S_IFWHT 0160000 /* whiteout */
#endif
# 236 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#define S_ISDIR(m) (((m) & 0170000) == 0040000) /* directory */
#define S_ISCHR(m) (((m) & 0170000) == 0020000) /* char special */
#define S_ISBLK(m) (((m) & 0170000) == 0060000) /* block special */
#define S_ISREG(m) (((m) & 0170000) == 0100000) /* regular file */
#define S_ISFIFO(m) (((m) & 0170000) == 0010000) /* fifo or socket */
#if __POSIX_VISIBLE >= 200112
#define S_ISLNK(m) (((m) & 0170000) == 0120000) /* symbolic link */
#define S_ISSOCK(m) (((m) & 0170000) == 0140000) /* socket */
#endif
# 246 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#if __BSD_VISIBLE
#define S_ISWHT(m) (((m) & 0170000) == 0160000) /* whiteout */
#endif
# 249 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#if __BSD_VISIBLE
#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) /* 0777 */
/* 7777 */
#define ALLPERMS (S_ISUID|S_ISGID|S_ISTXT|S_IRWXU|S_IRWXG|S_IRWXO)
/* 0666 */
#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
#define S_BLKSIZE 512 /* block size used in the stat struct */
/*
* Definitions of flags stored in file flags word.
*
* Super-user and owner changeable flags.
*/
#define UF_SETTABLE 0x0000ffff /* mask of owner changeable flags */
#define UF_NODUMP 0x00000001 /* do not dump file */
#define UF_IMMUTABLE 0x00000002 /* file may not be changed */
#define UF_APPEND 0x00000004 /* writes to file may only append */
#define UF_OPAQUE 0x00000008 /* directory is opaque wrt. union */
#define UF_NOUNLINK 0x00000010 /* file may not be removed or renamed */
/*
* These two bits are defined in MacOS X. They are not currently used in
* FreeBSD.
*/
#if 0
#define UF_COMPRESSED 0x00000020 /* file is compressed */
#define UF_TRACKED 0x00000040 /* renames and deletes are tracked */
#endif
# 278 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#define UF_SYSTEM 0x00000080 /* Windows system file bit */
#define UF_SPARSE 0x00000100 /* sparse file */
#define UF_OFFLINE 0x00000200 /* file is offline */
#define UF_REPARSE 0x00000400 /* Windows reparse point file bit */
#define UF_ARCHIVE 0x00000800 /* file needs to be archived */
#define UF_READONLY 0x00001000 /* Windows readonly file bit */
/* This is the same as the MacOS X definition of UF_HIDDEN. */
#define UF_HIDDEN 0x00008000 /* file is hidden */
/*
* Super-user changeable flags.
*/
#define SF_SETTABLE 0xffff0000 /* mask of superuser changeable flags */
#define SF_ARCHIVED 0x00010000 /* file is archived */
#define SF_IMMUTABLE 0x00020000 /* file may not be changed */
#define SF_APPEND 0x00040000 /* writes to file may only append */
#define SF_NOUNLINK 0x00100000 /* file may not be removed or renamed */
#define SF_SNAPSHOT 0x00200000 /* snapshot inode */
#ifdef _KERNEL
/*
* Shorthand abbreviations of above.
*/
#define OPAQUE (UF_OPAQUE)
#define APPEND (UF_APPEND | SF_APPEND)
#define IMMUTABLE (UF_IMMUTABLE | SF_IMMUTABLE)
#define NOUNLINK (UF_NOUNLINK | SF_NOUNLINK)
#endif
# 307 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#endif /* __BSD_VISIBLE */
# 309 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#if __POSIX_VISIBLE >= 200809
#define UTIME_NOW -1
#define UTIME_OMIT -2
#endif
# 314 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#ifndef _KERNEL
__BEGIN_DECLS
#if __BSD_VISIBLE
int chflags(const char *, unsigned long);
int chflagsat(int, const char *, unsigned long, int);
#endif
# 321 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
int chmod(const char *, mode_t);
#if __BSD_VISIBLE
int fchflags(int, unsigned long);
#endif
# 325 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#if __POSIX_VISIBLE >= 200112
int fchmod(int, mode_t);
#endif
# 328 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#if __POSIX_VISIBLE >= 200809
int fchmodat(int, const char *, mode_t, int);
int futimens(int fd, const struct timespec times[2]);
int utimensat(int fd, const char *path, const struct timespec times[2],
int flag);
#endif
# 334 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
int fstat(int, struct stat *);
#if __BSD_VISIBLE
int lchflags(const char *, unsigned long);
int lchmod(const char *, mode_t);
#endif
# 339 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#if __POSIX_VISIBLE >= 200112
int lstat(const char * __restrict, struct stat * __restrict);
#endif
# 342 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
int mkdir(const char *, mode_t);
int mkfifo(const char *, mode_t);
#if !defined(_MKNOD_DECLARED) && __XSI_VISIBLE
int mknod(const char *, mode_t, dev_t);
#define _MKNOD_DECLARED
#endif
# 348 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
int stat(const char * __restrict, struct stat * __restrict);
mode_t umask(mode_t);
#if __POSIX_VISIBLE >= 200809
int fstatat(int, const char *, struct stat *, int);
int mkdirat(int, const char *, mode_t);
int mkfifoat(int, const char *, mode_t);
#endif
# 355 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#if __XSI_VISIBLE >= 700
int mknodat(int, const char *, mode_t, dev_t);
#endif
# 358 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
__END_DECLS
#endif /* !_KERNEL */
# 360 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
#endif /* !_SYS_STAT_H_ */
# 362 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stat.h" 3 4
# 34 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <cheri/cheri.h>
#endif /* expanded by -frewrite-includes */
# 35 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 1 3 4
/*-
* Copyright (c) 2011-2016 Robert N. M. Watson
* Copyright (c) 2015 SRI International
* All rights reserved.
*
* This software was developed by SRI International and the University of
* Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
* ("CTSRD"), as part of the DARPA CRASH research programme.
*
* 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_CHERI_H_
#define _SYS_CHERI_H_
#ifdef _KERNEL
#if 0 /* expanded by -frewrite-includes */
#include <sys/sysctl.h> /* SYSCTL_DECL() */
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/systm.h> /* CTASSERT() */
#endif /* expanded by -frewrite-includes */
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
#endif
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/types.h>
#endif /* expanded by -frewrite-includes */
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <machine/cherireg.h> /* CHERICAP_SIZE. */
#endif /* expanded by -frewrite-includes */
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 1 3 4
/*-
* Copyright (c) 2011-2016 Robert N. M. Watson
* All rights reserved.
*
* This software was developed by SRI International and the University of
* Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
* ("CTSRD"), as part of the DARPA CRASH research programme.
*
* 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 _MIPS_INCLUDE_CHERIREG_H_
#define _MIPS_INCLUDE_CHERIREG_H_
/*
* The size of in-memory capabilities in bytes; minimum alignment is also
* assumed to be this size.
*/
#if defined(_MIPS_SZCAP) && (_MIPS_SZCAP != 128) && (_MIPS_SZCAP != 256)
#error "_MIPS_SZCAP defined but neither 128 nor 256"
#endif
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 3 4
#if defined(CPU_CHERI128) || (defined(_MIPS_SZCAP) && (_MIPS_SZCAP == 128))
#define CHERICAP_SIZE 16
#define CHERICAP_SHIFT 4
#else
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 3 4
#define CHERICAP_SIZE 32
#define CHERICAP_SHIFT 5
#endif
# 49 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 3 4
/*
* CHERI ISA-defined constants for capabilities -- suitable for inclusion from
* assembly source code.
*
* XXXRW: CHERI_UNSEALED is not currently considered part of the perms word,
* but perhaps it should be.
*/
#define CHERI_PERM_GLOBAL (1 << 0) /* 0x00000001 */
#define CHERI_PERM_EXECUTE (1 << 1) /* 0x00000002 */
#define CHERI_PERM_LOAD (1 << 2) /* 0x00000004 */
#define CHERI_PERM_STORE (1 << 3) /* 0x00000008 */
#define CHERI_PERM_LOAD_CAP (1 << 4) /* 0x00000010 */
#define CHERI_PERM_STORE_CAP (1 << 5) /* 0x00000020 */
#define CHERI_PERM_STORE_LOCAL_CAP (1 << 6) /* 0x00000040 */
#define CHERI_PERM_SEAL (1 << 7) /* 0x00000080 */
#define CHERI_PERM_RESERVED0 (1 << 8) /* 0x00000100 */
#define CHERI_PERM_RESERVED1 (1 << 9) /* 0x00000200 */
#define CHERI_PERM_SYSTEM_REGS (1 << 10) /* 0x00000400 */
/*
* User-defined permission bits.
*
* 256-bit CHERI has a substantially larger number of user-defined
* permissions.
*/
#define CHERI256_PERM_USER0 (1 << 15) /* 0x00008000 */
#define CHERI256_PERM_USER1 (1 << 16) /* 0x00010000 */
#define CHERI256_PERM_USER2 (1 << 17) /* 0x00020000 */
#define CHERI256_PERM_USER3 (1 << 18) /* 0x00040000 */
#define CHERI256_PERM_USER4 (1 << 19) /* 0x00080000 */
#define CHERI256_PERM_USER5 (1 << 20) /* 0x00100000 */
#define CHERI256_PERM_USER6 (1 << 21) /* 0x00200000 */
#define CHERI256_PERM_USER7 (1 << 22) /* 0x00400000 */
#define CHERI256_PERM_USER8 (1 << 23) /* 0x00800000 */
#define CHERI256_PERM_USER9 (1 << 24) /* 0x01000000 */
#define CHERI256_PERM_USER10 (1 << 25) /* 0x02000000 */
#define CHERI256_PERM_USER11 (1 << 26) /* 0x04000000 */
#define CHERI256_PERM_USER12 (1 << 27) /* 0x08000000 */
#define CHERI256_PERM_USER13 (1 << 28) /* 0x10000000 */
#define CHERI256_PERM_USER14 (1 << 29) /* 0x20000000 */
#define CHERI256_PERM_USER15 (1 << 30) /* 0x40000000 */
#define CHERI128_PERM_USER0 (1 << 15) /* 0x00008000 */
#define CHERI128_PERM_USER1 (1 << 16) /* 0x00010000 */
#define CHERI128_PERM_USER2 (1 << 17) /* 0x00020000 */
#define CHERI128_PERM_USER3 (1 << 18) /* 0x00040000 */
#if (CHERICAP_SIZE == 32)
#define CHERI_PERM_USER0 CHERI256_PERM_USER0
#define CHERI_PERM_USER1 CHERI256_PERM_USER1
#define CHERI_PERM_USER2 CHERI256_PERM_USER2
#define CHERI_PERM_USER3 CHERI256_PERM_USER3
#define CHERI_PERM_USER4 CHERI256_PERM_USER4
#define CHERI_PERM_USER5 CHERI256_PERM_USER5
#define CHERI_PERM_USER6 CHERI256_PERM_USER6
#define CHERI_PERM_USER7 CHERI256_PERM_USER7
#define CHERI_PERM_USER8 CHERI256_PERM_USER8
#define CHERI_PERM_USER9 CHERI256_PERM_USER9
#define CHERI_PERM_USER10 CHERI256_PERM_USER10
#define CHERI_PERM_USER11 CHERI256_PERM_USER11
#define CHERI_PERM_USER12 CHERI256_PERM_USER12
#define CHERI_PERM_USER13 CHERI256_PERM_USER13
#define CHERI_PERM_USER14 CHERI256_PERM_USER14
#define CHERI_PERM_USER15 CHERI256_PERM_USER15
#else /* (!(CHERICAP_SIZE == 32)) */
# 115 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 3 4
#define CHERI_PERM_USER0 CHERI128_PERM_USER0
#define CHERI_PERM_USER1 CHERI128_PERM_USER1
#define CHERI_PERM_USER2 CHERI128_PERM_USER2
#define CHERI_PERM_USER3 CHERI128_PERM_USER3
#endif /* (!(CHERICAP_SIZE == 32)) */
# 120 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 3 4
/*
* The kernel snags one for the user-defined permissions for the purposes of
* authorising system calls from $pcc. This is a bit of an oddity: normally,
* we check permissions on data capabilities, not code capabilities, but
* aligns with 'privilege' checks: e.g., $epcc access. We may wish to switch
* to another model, such as having userspace register one or more class
* capabilities as suitable for privilege.
*/
#define CHERI_PERM_SYSCALL CHERI_PERM_USER0
/*
* Use another user-defined permission to restrict the ability to change
* the page mapping underlying a capability. This can't be the same
* permission bit as CHERI_PERM_SYSCALL because $pcc should not confer the
* right rewrite or remap executable memory.
*/
#define CHERI_PERM_CHERIABI_VMMAP CHERI_PERM_USER1
/*
* Macros defining initial permission sets for various scenarios; details
* depend on the permissions available on 256-bit or 128-bit CHERI:
*
* CHERI_PERM_USER_PRIVS: Mask of all available user-defined permissions
* CHERI_PERM_PRIV: Mask of all available hardware-defined permissions
*/
#if (CHERICAP_SIZE == 32)
#define CHERI_PERM_USER_PRIVS \
(CHERI_PERM_USER0 | CHERI_PERM_USER1 | CHERI_PERM_USER2 | \
CHERI_PERM_USER3 | CHERI_PERM_USER4 | CHERI_PERM_USER5 | \
CHERI_PERM_USER6 | CHERI_PERM_USER7 | CHERI_PERM_USER8 | \
CHERI_PERM_USER9 | CHERI_PERM_USER10 | CHERI_PERM_USER11 | \
CHERI_PERM_USER12 | CHERI_PERM_USER13 | CHERI_PERM_USER14 | \
CHERI_PERM_USER15)
#else /* (!(CHERICAP_SIZE == 32)) */
# 155 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 3 4
#define CHERI_PERM_USER_PRIVS \
(CHERI_PERM_USER0 | CHERI_PERM_USER1 | CHERI_PERM_USER2 | \
CHERI_PERM_USER3)
#endif /* (!(CHERICAP_SIZE == 32)) */
# 159 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 3 4
/*
* No variation between 256-bit and 128-bit CHERI for privileged capability
* permissions -- at least, not anymore.
*/
#define CHERI_PERM_KERN \
(CHERI_PERM_GLOBAL | CHERI_PERM_EXECUTE | \
CHERI_PERM_LOAD | CHERI_PERM_STORE | CHERI_PERM_LOAD_CAP | \
CHERI_PERM_STORE_CAP | CHERI_PERM_STORE_LOCAL_CAP | \
CHERI_PERM_SEAL | CHERI_PERM_RESERVED0 | CHERI_PERM_RESERVED1 | \
CHERI_PERM_SYSTEM_REGS | CHERI_PERM_USER_PRIVS)
/*
* Root "object-type" capability for the kernel. This can be used neither as
* a data nor code capability.
*/
#define CHERI_PERM_KERN_TYPE (CHERI_PERM_GLOBAL | CHERI_PERM_SEAL)
/*
* Basic userspace permission mask; CHERI_PERM_EXECUTE will be added for
* executable capabilities ($pcc); CHERI_PERM_STORE, CHERI_PERM_STORE_CAP,
* and CHERI_PERM_STORE_LOCAL_CAP will be added for data permissions ($c0).
*
* No variation required between 256-bit and 128-bit CHERI.
*/
#define CHERI_PERM_USER \
(CHERI_PERM_GLOBAL | CHERI_PERM_LOAD | CHERI_PERM_LOAD_CAP | \
(CHERI_PERM_USER_PRIVS & ~CHERI_PERM_CHERIABI_VMMAP))
#define CHERI_PERM_USER_CODE (CHERI_PERM_USER | CHERI_PERM_EXECUTE)
/*
* XXX-BD: _DATA should not include _VMMAP, but malloc needs rework to
* fix.
*/
#define CHERI_PERM_USER_DATA (CHERI_PERM_USER | CHERI_PERM_STORE | \
CHERI_PERM_STORE_CAP | \
CHERI_PERM_STORE_LOCAL_CAP | \
CHERI_PERM_CHERIABI_VMMAP)
/*
* Root "object-type" capability -- queried via sysarch(2) when libcheri needs
* to allocate types. This can be used neither as a data nor code capability.
*
* No variation required between 256-bit and 128-bit CHERI.
*/
#define CHERI_PERM_USER_TYPE (CHERI_PERM_GLOBAL | CHERI_PERM_SEAL)
/*
* The CHERI object-type space is split between userspace and kernel,
* permitting kernel object references to be delegated to userspace (if
* desired). Currently, we provide 23 bits of namespace to each, with the top
* bit set for kernel object types, but it is easy to imagine other splits.
* User and kernel software should be written so as to not place assumptions
* about the specific values used here, as they may change.
*/
#define CHERI_OTYPE_USER_MIN (0)
#define CHERI_OTYPE_USER_MAX ((1 << 23) - 1)
#define CHERI_OTYPE_KERN_MIN (1 << 24)
#define CHERI_OTYPE_KERN_MAX ((1 << 24) - 1)
#define CHERI_OTYPE_ISKERN(x) (((x) & (1 << 23)) != 0)
#define CHERI_OTYPE_ISUSER(x) (!(CHERI_OTYPE_ISKERN(x)))
/*
* Definition for kernel "privileged" capability able to name the entire
* address space.
*
* No variation required between 256-bit and 128-bit CHERI.
*/
#define CHERI_CAP_KERN_PERMS CHERI_PERM_KERN
#define CHERI_CAP_KERN_BASE 0x0
#define CHERI_CAP_KERN_LENGTH 0xffffffffffffffff
#define CHERI_CAP_KERN_OFFSET 0x0
#define CHERI_CAP_KERN_TYPE_PERMS CHERI_PERM_KERN_TYPE
#define CHERI_CAP_KERN_TYPE_BASE CHERI_OTYPE_KERN_MIN
#define CHERI_CAP_KERN_TYPE_LENGTH \
(CHERI_OTYPE_KERN_MAX - CHERI_OTYPE_KERN_MIN)
#define CHERI_CAP_KERN_TYPE_OFFSET 0x0
/*
* Definition for userspace "unprivileged" capability able to name the user
* portion of the address space.
*
* No variation required between 256-bit and 128-bit CHERI.
*/
#define CHERI_CAP_USER_CODE_PERMS CHERI_PERM_USER_CODE
#define CHERI_CAP_USER_CODE_BASE MIPS_XUSEG_START
#define CHERI_CAP_USER_CODE_LENGTH (MIPS_XUSEG_END - MIPS_XUSEG_START)
#define CHERI_CAP_USER_CODE_OFFSET 0x0
#define CHERI_CAP_USER_DATA_PERMS CHERI_PERM_USER_DATA
#define CHERI_CAP_USER_DATA_BASE MIPS_XUSEG_START
#define CHERI_CAP_USER_DATA_LENGTH (MIPS_XUSEG_END - MIPS_XUSEG_START)
#define CHERI_CAP_USER_DATA_OFFSET 0x0
#define CHERI_CAP_USER_TYPE_PERMS CHERI_PERM_USER_TYPE
#define CHERI_CAP_USER_TYPE_BASE CHERI_OTYPE_USER_MIN
#define CHERI_CAP_USER_TYPE_LENGTH \
(CHERI_OTYPE_USER_MAX - CHERI_OTYPE_USER_MIN + 1)
#define CHERI_CAP_USER_TYPE_OFFSET 0x0
#define CHERI_CAP_USER_MMAP_PERMS \
(CHERI_PERM_USER_DATA | CHERI_PERM_USER_CODE | CHERI_PERM_CHERIABI_VMMAP)
#define CHERI_CAP_USER_MMAP_BASE MIPS_XUSEG_START
#define CHERI_CAP_USER_MMAP_LENGTH (MIPS_XUSEG_END - MIPS_XUSEG_START)
#define CHERI_CAP_USER_MMAP_OFFSET 0x0
/*
* A blend of hardware and software allocation of capability registers.
* Ideally, this list wouldn't exist here, but be purely in the assembler.
*/
#define CHERI_CR_C0 0 /* MIPS fetch/load/store capability. */
#define CHERI_CR_DDC CHERI_CR_C0
#define CHERI_CR_C1 1
#define CHERI_CR_C2 2
#define CHERI_CR_C3 3
#define CHERI_CR_C4 4
#define CHERI_CR_C5 5
#define CHERI_CR_C6 6
#define CHERI_CR_C7 7
#define CHERI_CR_C8 8
#define CHERI_CR_C9 9
#define CHERI_CR_C10 10
#define CHERI_CR_C11 11
#define CHERI_CR_STC CHERI_CR_C11
#define CHERI_CR_C12 12
#define CHERI_CR_C13 13
#define CHERI_CR_C14 14
#define CHERI_CR_C15 15
#define CHERI_CR_C16 16
#define CHERI_CR_C17 17
#define CHERI_CR_C18 18
#define CHERI_CR_C19 19
#define CHERI_CR_C20 20
#define CHERI_CR_C21 21
#define CHERI_CR_C22 22
#define CHERI_CR_C23 23
#define CHERI_CR_C24 24
#define CHERI_CR_C25 25
#define CHERI_CR_C26 26
#define CHERI_CR_IDC CHERI_CR_C26
#define CHERI_CR_C27 27
#define CHERI_CR_KR1C CHERI_CR_C27
#define CHERI_CR_C28 28
#define CHERI_CR_KR2C CHERI_CR_C28
#define CHERI_CR_C29 29
#define CHERI_CR_KCC CHERI_CR_C29
#define CHERI_CR_C30 30
#define CHERI_CR_KDC CHERI_CR_C30
#define CHERI_CR_C31 31
#define CHERI_CR_EPCC CHERI_CR_C31
#define CHERI_CR_CTEMP0 CHERI_CR_C13 /* C capability manipulation. */
#define CHERI_CR_CTEMP1 CHERI_CR_C14 /* C capability manipulation. */
#define CHERI_CR_SEC0 CHERI_CR_KR2C /* Saved $c0 in exception handler. */
/*
* Offsets of registers in struct cheri_kframe -- must match the definition in
* cheri.h.
*/
#define CHERIKFRAME_OFF_C17 0
#define CHERIKFRAME_OFF_C18 1
#define CHERIKFRAME_OFF_C19 2
#define CHERIKFRAME_OFF_C20 3
#define CHERIKFRAME_OFF_C21 4
#define CHERIKFRAME_OFF_C22 5
#define CHERIKFRAME_OFF_C23 6
#define CHERIKFRAME_OFF_C24 7
/*
* List of CHERI capability cause code constants, which are used to
* characterise various CP2 exceptions.
*/
#define CHERI_EXCCODE_NONE 0x00
#define CHERI_EXCCODE_LENGTH 0x01
#define CHERI_EXCCODE_TAG 0x02
#define CHERI_EXCCODE_SEAL 0x03
#define CHERI_EXCCODE_TYPE 0x04
#define CHERI_EXCCODE_CALL 0x05
#define CHERI_EXCCODE_RETURN 0x06
#define CHERI_EXCCODE_UNDERFLOW 0x07
#define CHERI_EXCCODE_USER_PERM 0x08
#define CHERI_EXCCODE_PERM_USER CHERI_EXCCODE_USER_PERM
#define CHERI_EXCCODE_TLBSTORE 0x09
#define CHERI_EXCCODE_IMPRECISE 0x0a
#define _CHERI_EXCCODE_RESERVED0b 0x0b
#define _CHERI_EXCCODE_RESERVED0c 0x0c
#define _CHERI_EXCCODE_RESERVED0d 0x0d
#define _CHERI_EXCCODE_RESERVED0e 0x0e
#define _CHERI_EXCCODE_RESERVED0f 0x0f
#define CHERI_EXCCODE_GLOBAL 0x10
#define CHERI_EXCCODE_PERM_EXECUTE 0x11
#define CHERI_EXCCODE_PERM_LOAD 0x12
#define CHERI_EXCCODE_PERM_STORE 0x13
#define CHERI_EXCCODE_PERM_LOADCAP 0x14
#define CHERI_EXCCODE_PERM_STORECAP 0x15
#define CHERI_EXCCODE_STORE_LOCALCAP 0x16
#define CHERI_EXCCODE_PERM_SEAL 0x17
#define CHERI_EXCCODE_SYSTEM_REGS 0x18
#define _CHERI_EXCCODE_RESERVED19 0x19
#define _CHERI_EXCCODE_RESERVED1a 0x1a
#define _CHERI_EXCCODE_RESERVED1b 0x1b
#define _CHERI_EXCCODE_RESERVED1c 0x1c
#define _CHERI_EXCCODE_RESERVED1d 0x1d
#define _CHERI_EXCCODE_RESERVED1e 0x1e
#define _CHERI_EXCCODE_RESERVED1f 0x1f
/*
* User-defined CHERI exception codes are numbered 128...255.
*/
#define CHERI_EXCCODE_SW_BASE 0x80
#define CHERI_EXCCODE_SW_LOCALARG 0x80 /* Non-global CCall argument. */
#define CHERI_EXCCODE_SW_LOCALRET 0x81 /* Non-global CReturn value. */
#define CHERI_EXCCODE_SW_CCALLREGS 0x82 /* Incorrect CCall registers. */
/*
* How to turn the cause register into an exception code and register number.
*/
#define CHERI_CAPCAUSE_EXCCODE_MASK 0xff00
#define CHERI_CAPCAUSE_EXCCODE_SHIFT 8
#define CHERI_CAPCAUSE_REGNUM_MASK 0xff
/*
* Location of the CHERI CCall/CReturn software-path exception vector.
*/
#define CHERI_CCALL_EXC_VEC ((intptr_t)(int32_t)0x80000280)
#if CHERICAP_SIZE == 32
#define CHERI_ALIGN_SHIFT(l) 0ULL
#define CHERI_SEAL_ALIGN_SHIFT(l) 0ULL
#else /* (!(CHERICAP_SIZE == 32)) */
# 391 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 3 4
#define CHERI_BASELEN_BITS 20
#define CHERI_SEAL_BASELEN_BITS 5
#define CHERI_SLOP_BITS 2
#define CHERI_ADDR_BITS 64
#define CHERI_SEAL_MIN_ALIGN 12
/*
* Use __builtin_clzll() to implement flsll() on clang where emission of
* DCLZ instructions is correctly conditionalized.
*/
#ifdef __clang__
#define _flsll(x) (64 - __builtin_clzll(x))
#else
# 405 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 3 4
#define _flsll(x) flsll(x)
#endif
# 407 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 3 4
#define CHERI_ALIGN_SHIFT(l) \
((_flsll(l) <= (CHERI_BASELEN_BITS - CHERI_SLOP_BITS)) ? 0ULL : \
(_flsll(l) - (CHERI_BASELEN_BITS - CHERI_SLOP_BITS)))
#define _CHERI_SEAL_ALIGN_SHIFT(l) \
((_flsll(l) <= (CHERI_SEAL_BASELEN_BITS)) ? 0ULL : \
(_flsll(l) - (CHERI_SEAL_BASELEN_BITS)))
#define CHERI_SEAL_ALIGN_SHIFT(l) \
(_CHERI_SEAL_ALIGN_SHIFT(l) < CHERI_SEAL_MIN_ALIGN ? \
CHERI_SEAL_MIN_ALIGN : _CHERI_SEAL_ALIGN_SHIFT(l))
#endif /* (!(CHERICAP_SIZE == 32)) */
# 417 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 3 4
#define CHERI_ALIGN_MASK(l) ~(~0ULL << CHERI_ALIGN_SHIFT(l))
#define CHERI_SEAL_ALIGN_MASK(l) ~(~0ULL << CHERI_SEAL_ALIGN_SHIFT(l))
#endif /* _MIPS_INCLUDE_CHERIREG_H_ */
# 422 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cherireg.h" 3 4
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 2 3 4
/*
* Canonical C-language representation of a capability for compilers that
* don't support capabilities directly. The in-memory layout is sensitive to
* the microarchitecture, and hence treated as opaque. Fields must be
* accessed via the ISA.
*/
struct chericap {
uint8_t c_data[CHERICAP_SIZE];
} __packed __aligned(CHERICAP_SIZE);
#ifdef _KERNEL
CTASSERT(sizeof(struct chericap) == CHERICAP_SIZE);
#endif
# 56 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
/*
* Canonical C-language representation of a CHERI object capability -- code and
* data capabilities in registers or memory.
*/
struct cheri_object {
#if !defined(_KERNEL) && __has_feature(capabilities)
__capability void *co_codecap;
__capability void *co_datacap;
#else
# 66 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
struct chericap co_codecap;
struct chericap co_datacap;
#endif
# 69 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
};
#if !defined(_KERNEL) && __has_feature(capabilities)
#define CHERI_OBJECT_INIT_NULL {NULL, NULL}
#define CHERI_OBJECT_ISNULL(co) \
((co).co_codecap == NULL && (co).co_datacap == NULL)
#endif
# 76 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
/*
* Data structure describing CHERI's sigaltstack-like extensions to signal
* delivery. In the event that a thread takes a signal when $pcc doesn't hold
* CHERI_PERM_SYSCALL, we will need to install new $pcc, $ddc, $stc, and $idc
* state, and move execution to the per-thread alternative stack, whose
* pointer should (presumably) be relative to the $ddc/$stc defined here.
*/
struct cheri_signal {
#if !defined(_KERNEL) && __has_feature(capabilities)
__capability void *csig_pcc;
__capability void *csig_ddc;
__capability void *csig_stc;
__capability void *csig_idc;
__capability void *csig_default_stack;
__capability void *csig_sigcode;
#else
# 93 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
struct chericap csig_pcc;
struct chericap csig_ddc;
struct chericap csig_stc;
struct chericap csig_idc;
struct chericap csig_default_stack;
struct chericap csig_sigcode;
#endif
# 100 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
};
/*
* Per-thread CHERI CCall/CReturn stack, which preserves the calling PC/PCC/
* IDC across CCall so that CReturn can restore them.
*
* XXXRW: This is a very early experiment -- it's not clear if this idea will
* persist in its current form, or at all. For more complex userspace
* language, there's a reasonable expectation that it, rather than the kernel,
* will want to manage the idea of a "trusted stack".
*
* XXXRW: This is currently part of the kernel-user ABI due to the
* CHERI_GET_STACK and CHERI_SET_STACK sysarch() calls. In due course we need
* to revise those APIs and differentiate the kernel-internal representation
* from the public one.
*/
struct cheri_stack_frame {
register_t _csf_pad0; /* Used to be MIPS program counter. */
register_t _csf_pad1;
register_t _csf_pad2;
register_t _csf_pad3;
#if !defined(_KERNEL) && __has_feature(capabilities)
__capability void *csf_pcc;
__capability void *csf_idc;
#else
# 125 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
struct chericap csf_pcc;
struct chericap csf_idc;
#endif
# 128 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
};
#define CHERI_STACK_DEPTH 8 /* XXXRW: 8 is a nice round number. */
struct cheri_stack {
register_t cs_tsp; /* Byte offset, not frame index. */
register_t cs_tsize; /* Stack size, in bytes. */
register_t _cs_pad0;
register_t _cs_pad1;
struct cheri_stack_frame cs_frames[CHERI_STACK_DEPTH];
} __aligned(CHERICAP_SIZE);
#define CHERI_FRAME_SIZE sizeof(struct cheri_stack_frame)
#define CHERI_STACK_SIZE (CHERI_STACK_DEPTH * CHERI_FRAME_SIZE)
/*
* APIs that act on C language representations of capabilities -- but not
* capabilities themselves.
*/
#ifdef _KERNEL
void cheri_capability_copy(struct chericap *cp_to,
struct chericap *cp_from);
void cheri_capability_set(struct chericap *cp, uint32_t uperms,
void *basep, size_t length, off_t off);
void cheri_capability_set_null(struct chericap *cp);
void cheri_capability_setoffset(struct chericap *cp, register_t offset);
/*
* CHERI capability utility functions.
*/
void cheri_bcopy(void *src, void *dst, size_t len);
void *cheri_memcpy(void *dst, void *src, size_t len);
/*
* CHERI context management functions.
*/
struct cheri_frame;
struct thread;
struct trapframe;
const char *cheri_exccode_string(uint8_t exccode);
void cheri_exec_setregs(struct thread *td, u_long entry_addr);
void cheri_log_cheri_frame(struct trapframe *frame);
void cheri_log_exception(struct trapframe *frame, int trap_type);
void cheri_log_exception_registers(struct trapframe *frame);
void cheri_newthread_setregs(struct thread *td);
int cheri_syscall_authorize(struct thread *td, u_int code,
int nargs, register_t *args);
int cheri_signal_sandboxed(struct thread *td);
void cheri_sendsig(struct thread *td);
void cheri_trapframe_from_cheriframe(struct trapframe *frame,
struct cheri_frame *cfp);
void cheri_trapframe_to_cheriframe(struct trapframe *frame,
struct cheri_frame *cfp);
/*
* Functions to set up and manipulate CHERI contexts and stacks.
*/
struct pcb;
struct sysarch_args;
void cheri_signal_copy(struct pcb *dst, struct pcb *src);
void cheri_stack_copy(struct pcb *dst, struct pcb *src);
void cheri_stack_init(struct pcb *pcb);
int cheri_stack_unwind(struct thread *td, struct trapframe *tf,
int signum);
int cheri_sysarch_getstack(struct thread *td, struct sysarch_args *uap);
int cheri_sysarch_gettypecap(struct thread *td, struct sysarch_args *uap);
int cheri_sysarch_setstack(struct thread *td, struct sysarch_args *uap);
void cheri_typecap_copy(struct pcb *dst, struct pcb *src);
/*
* Global sysctl definitions.
*/
SYSCTL_DECL(_security_cheri);
SYSCTL_DECL(_security_cheri_stats);
extern u_int security_cheri_debugger_on_sandbox_signal;
extern u_int security_cheri_debugger_on_sandbox_syscall;
extern u_int security_cheri_debugger_on_sandbox_unwind;
extern u_int security_cheri_debugger_on_sigprot;
extern u_int security_cheri_sandboxed_signals;
extern u_int security_cheri_syscall_violations;
/*
* Functions exposed to machine-independent code that must interact with
* CHERI-specific features; e.g., ktrace.
*/
struct ktr_ccall;
struct ktr_creturn;
struct ktr_cexception;
struct thr_param_c;
void cheriabi_thr_new_md(struct thread *parent_td,
struct thr_param_c *param);
void ktrccall_mdfill(struct pcb *pcb, struct ktr_ccall *kc);
void ktrcreturn_mdfill(struct pcb *pcb, struct ktr_creturn *kr);
void ktrcexception_mdfill(struct trapframe *frame,
struct ktr_cexception *ke);
#endif /* !_KERNEL */
# 223 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
/*
* Nested include of machine-dependent definitions, which likely depend on
* first having defined chericap.h.
*/
#if 0 /* expanded by -frewrite-includes */
#include <machine/cheri.h>
#endif /* expanded by -frewrite-includes */
# 228 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 1 3 4
/*-
* Copyright (c) 2011-2016 Robert N. M. Watson
* Copyright (c) 2015 SRI International
* All rights reserved.
*
* This software was developed by SRI International and the University of
* Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
* ("CTSRD"), as part of the DARPA CRASH research programme.
*
* 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 _MIPS_INCLUDE_CHERI_H_
#define _MIPS_INCLUDE_CHERI_H_
#ifdef _KERNEL
#if 0 /* expanded by -frewrite-includes */
#include <sys/sysctl.h> /* SYSCTL_DECL() */
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/systm.h> /* CTASSERT() */
#endif /* expanded by -frewrite-includes */
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
#endif
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <machine/cherireg.h>
#endif /* expanded by -frewrite-includes */
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/types.h>
#endif /* expanded by -frewrite-includes */
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
/*
* In the past, struct cheri_frame was the in-kernel and kernel<->user
* structure holding CHERI register state for context switching. It is now a
* public structure for kernel<->user interaction (e.g., signals), and struct
* trapframe is used within the kernel. Regardless, correct preservation of
* state in this structure is critical to both correctness and security.
*/
struct cheri_frame {
/* DDC has special properties for MIPS load/store instructions. */
#if !defined(_KERNEL) && __has_feature(capabilities)
__capability void *cf_ddc;
#else
# 56 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
struct chericap cf_ddc;
#endif
# 58 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
/*
* General-purpose capabilities -- note, numbering is from v1.17 of
* the CHERI ISA spec (ISAv5 draft).
*/
#if !defined(_KERNEL) && __has_feature(capabilities)
__capability void *cf_c1, *cf_c2, *cf_c3, *cf_c4;
__capability void *cf_c5, *cf_c6, *cf_c7;
__capability void *cf_c8, *cf_c9, *cf_c10, *cf_stc, *cf_c12;
__capability void *cf_c13, *cf_c14, *cf_c15, *cf_c16, *cf_c17;
__capability void *cf_c18, *cf_c19, *cf_c20, *cf_c21, *cf_c22;
__capability void *cf_c23, *cf_c24, *cf_c25, *cf_idc;
#else
# 71 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
struct chericap cf_c1, cf_c2, cf_c3, cf_c4;
struct chericap cf_c5, cf_c6, cf_c7;
struct chericap cf_c8, cf_c9, cf_c10, cf_stc, cf_c12;
struct chericap cf_c13, cf_c14, cf_c15, cf_c16, cf_c17;
struct chericap cf_c18, cf_c19, cf_c20, cf_c21, cf_c22;
struct chericap cf_c23, cf_c24, cf_c25, cf_idc;
#endif
# 78 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
/*
* Program counter capability -- extracted from exception frame EPCC.
*/
#if !defined(_KERNEL) && __has_feature(capabilities)
__capability void *cf_pcc;
#else
# 85 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
struct chericap cf_pcc;
#endif
# 87 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
/*
* Padded out non-capability registers.
*
* XXXRW: The comment below on only updating for CP2 exceptions is
* incorrect, but should be made correct.
*/
register_t cf_capcause; /* Updated only on CP2 exceptions. */
register_t _cf_pad0[1];
#if (defined(CPU_CHERI) && !defined(CPU_CHERI128)) || (defined(_MIPS_SZCAP) && (_MIPS_SZCAP == 256))
register_t _cf_pad1[2];
#endif
# 99 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
};
#ifdef _KERNEL
/* 28 capability registers + capcause + padding. */
CTASSERT(sizeof(struct cheri_frame) == (29 * CHERICAP_SIZE));
#endif
# 105 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
#ifdef _KERNEL
/*
* Data structure defining kernel per-thread caller-save state used in
* voluntary context switches. This is morally equivalent to pcb_context[].
*/
struct cheri_kframe {
struct chericap ckf_c17;
struct chericap ckf_c18;
struct chericap ckf_c19;
struct chericap ckf_c20;
struct chericap ckf_c21;
struct chericap ckf_c22;
struct chericap ckf_c23;
struct chericap ckf_c24;
};
#endif
# 122 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
/*
* CHERI capability register manipulation macros.
*/
#define CHERI_CGETBASE(v, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cgetbase %0, $c%1\n" \
".set pop\n" \
: "=r" (v) : "i" (cb)); \
} while (0)
#define CHERI_CGETLEN(v, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cgetlen %0, $c%1\n" \
".set pop\n" \
: "=r" (v) :"i" (cb)); \
} while (0)
#define CHERI_CGETOFFSET(v, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cgetoffset %0, $c%1\n" \
".set pop\n" \
: "=r" (v) : "i" (cb)); \
} while (0)
#define CHERI_CGETTAG(v, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cgettag %0, $c%1\n" \
".set pop\n" \
: "=r" (v) : "i" (cb)); \
} while (0)
#define CHERI_CGETSEALED(v, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cgetsealed %0, $c%1\n" \
".set pop\n" \
: "=r" (v) : "i" (cb)); \
} while (0)
#define CHERI_CGETPERM(v, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cgetperm %0, $c%1\n" \
".set pop\n" \
: "=r" (v) : "i" (cb)); \
} while (0)
#define CHERI_CGETTYPE(v, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cgettype %0, $c%1\n" \
".set pop\n" \
: "=r" (v) : "i" (cb)); \
} while (0)
#define CHERI_CGETCAUSE(v) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cgetcause %0\n" \
".set pop\n" \
: "=r" (v)); \
} while (0)
#define CHERI_CTOPTR(v, cb, ct) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"ctoptr %0, $c%1, $c%2\n" \
".set pop\n" \
: "=r" (v) : "i" (cb), "i" (ct)); \
} while (0)
/*
* Implement a CToInt similar to CToPtr but without the tag check, which will
* be useful to extract integer interpretations of untagged capabilities. One
* property of this conversion is that, since the capability might be
* untagged, we can't assume that (base + offset) < (max capability address),
* and so significant care should be taken -- ideally this variant would only
* be used when we know that the capability is untagged and holds a value that
* must be an integer (due to types or other compile-time information).
*
* This may someday be an instruction. If so, it could directly return the
* cursor, rather than extract (base, offset).
*/
#define CHERI_CTOINT(v, cb) do { \
register_t _base, _offset; \
\
CHERI_CGETBASE(_base, cb); \
CHERI_CGETOFFSET(_offset, cb); \
v = (__typeof__(v))(_base + _offset); \
} while (0)
/*
* Note that despite effectively being a CMove, CGetDefault doesn't require a
* memory clobber: if it's writing to $ddc, it's a nop; otherwise, it's not
* writing to $ddc so no clobber is needed.
*/
#define CHERI_CGETDEFAULT(cd) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cgetdefault $c%0\n" \
".set pop\n" \
: : "i" (cd)); \
} while (0)
/*
* Instructions that check capability values and could throw exceptions; no
* capability-register value changes, so no clobbers required.
*/
#define CHERI_CCHECKPERM(cs, v) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"ccheckperm $c%0, %1\n" \
".set pop\n" \
: : "i" (cd), "r" (v)); \
} while (0)
#define CHERI_CCHECKTYPE(cs, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cchecktype $c%0, $c%1\n" \
".set pop\n" \
: : "i" (cs), "i" (cb)); \
} while (0)
/*
* Instructions relating to capability invocation, return, sealing, and
* unsealing. Memory clobbers are required for register manipulation when
* targeting $ddc. They are also required for both CCall and CReturn to
* ensure that any memory write-back is done before invocation.
*
* XXXRW: Is the latter class of cases required?
*/
#define CHERI_CSEAL(cd, cs, ct) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cseal $c%0, $c%1, $c%2\n" \
".set pop\n" \
: : "i" (cd), "i" (cs), "i" (ct) : "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cseal $c%0, $c%1, $c%2\n" \
".set pop\n" \
: : "i" (cd), "i" (cs), "i" (ct)); \
} while (0)
#define CHERI_CUNSEAL(cd, cb, ct) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cunseal $c%0, $c%1, $c%2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "i" (ct) : "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cunseal $c%0, $c%1, $c%2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "i" (ct)); \
} while (0)
#define CHERI_CCALL(cs, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"ccall $c%0, $c%1\n" \
".set pop\n" \
: : "i" (cs), "i" (cb) : "memory"); \
} while (0)
#define CHERI_CRETURN() do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"creturn\n" \
".set pop\n" \
: : : "memory"); \
} while (0)
/*
* Capability store; while this doesn't muck with $ddc, it does require a
* memory clobber.
*/
#define CHERI_CSC(cs, cb, regbase, offset) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"csc $c%0, %1, %2($c%3)\n" \
".set pop\n" \
: : "i" (cs), "r" (regbase), "i" (offset), "i" (cb) : \
"memory"); \
} while (0)
/*
* Data stores; while these don't muck with $ddc, they do require memory
* clobbers.
*/
#define CHERI_CSB(rs, rt, offset, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"csb %0, %1, %2($c%3)\n" \
".set pop\n" \
: : "r" (rs), "r" (rt), "i" (offset), "i" (cb) : "memory"); \
} while (0)
#define CHERI_CSH(rs, rt, offset, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"csh %0, %1, %2($c%3)\n" \
".set pop\n" \
: : "r" (rs), "r" (rt), "i" (offset), "i" (cb) : "memory"); \
} while (0)
#define CHERI_CSW(rs, rt, offset, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"csw %0, %1, %2($c%3)\n" \
".set pop\n" \
: : "r" (rs), "r" (rt), "i" (offset), "i" (cb) : "memory"); \
} while (0)
#define CHERI_CSD(rs, rt, offset, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"csd %0, %1, %2($c%3)\n" \
".set pop\n" \
: : "r" (rs), "r" (rt), "i" (offset), "i" (cb) : "memory"); \
} while (0)
/*
* Data loads: while these don't much with $ddc, they do require memory
* clobbers.
*/
#define CHERI_CLB(rd, rt, offset, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"clb %0, %1, %2($c%3)\n" \
".set pop\n" \
: "=r" (rd) : "r" (rt), "i" (offset),"i" (cb) : "memory"); \
} while (0)
#define CHERI_CLH(rd, rt, offset, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"clh %0, %1, %2($c%3)\n" \
".set pop\n" \
: "=r" (rd) : "r" (rt), "i" (offset), "i" (cb) : "memory"); \
} while (0)
#define CHERI_CLW(rd, rt, offset, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"clw %0, %1, %2($c%3)\n" \
".set pop\n" \
: "=r" (rd) : "r" (rt), "i" (offset), "i" (cb) : "memory"); \
} while (0)
#define CHERI_CLD(rd, rt, offset, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cld %0, %1, %2($c%3)\n" \
".set pop\n" \
: "=r" (rd) : "r" (rt), "i" (offset), "i" (cb) : "memory"); \
} while (0)
#define CHERI_CLBU(rd, rt, offset, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"clbu %0, %1, %2($c%3)\n" \
".set pop\n" \
: "=r" (rd) : "r" (rt), "i" (offset), "i" (cb) : "memory"); \
} while (0)
#define CHERI_CLHU(rd, rt, offset, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"clhu %0, %1, %2($c%3)\n" \
".set pop\n" \
: "=r" (rd) : "r" (rt), "i" (offset), "i" (cb) : "memory"); \
} while (0)
#define CHERI_CLWU(rd, rt, offset, cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"clwu %0, %1, %2($c%3)\n" \
".set pop\n" \
: "=r" (rd) : "r" (rt), "i" (offset), "i" (cb) : "memory"); \
} while (0)
/*
* Routines that modify or replace values in capability registers, and that if
* if used on $ddc, require the compiler to write registers back to memory,
* and reload afterwards, since we may effectively be changing the compiler-
* visible address space. This is also necessary for permissions changes as
* well, to ensure that write-back occurs before a possible loss of store
* permission.
*/
#define CHERI_CGETPCC(v, cd) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cgetpcc %0, $c%1\n" \
".set pop\n" \
: "=r" (v) : "i" (cd) : "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cgetpcc %0, $c%1\n" \
".set pop\n" \
: "=r" (v) : "i" (cd)); \
} while (0)
#define CHERI_CINCBASE(cd, cb, v) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cincbase $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v) : "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cincbase $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v)); \
} while (0)
#define CHERI_CINCOFFSET(cd, cb, v) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cincoffset $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v) : "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cincoffset $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v)); \
} while (0)
#if (defined(CPU_CHERI) && !defined(CPU_CHERI128)) || (defined(_MIPS_SZCAP) && (_MIPS_SZCAP == 256))
#define CHERI_CMOVE(cd, cb) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cmove $c%0, $c%1\n" \
".set pop\n" \
: : "i" (cd), "i" (cb) : "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cmove $c%0, $c%1\n" \
".set pop\n" \
: : "i" (cd), "i" (cb)); \
} while (0)
#else /* 128-bit CHERI */
# 521 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
#define CHERI_CMOVE(cd, cb) CHERI_CINCOFFSET(cd, cb, 0)
#endif /* 128-bit CHERI */
# 523 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
#define CHERI_CSETDEFAULT(cb) do { \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"csetdefault %c%0\n" \
".set pop\n" \
: : "i" (cb) : "memory"); \
} while (0)
#define CHERI_CSETLEN(cd, cb, v) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"csetlen $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v) : "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"csetlen $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v)); \
} while (0)
#define CHERI_CSETOFFSET(cd, cb, v) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"csetoffset $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v) : "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"csetoffset $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v)); \
} while (0)
#define CHERI_CCLEARTAG(cd, cb) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"ccleartag $c%0, $c%1\n" \
".set pop\n" \
: : "i" (cd), "i" (cb) : "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"ccleartag $c%0, $c%1\n" \
".set pop\n" \
: : "i" (cd), "i" (cb)); \
} while (0)
#define CHERI_CANDPERM(cd, cb, v) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"candperm $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v) : "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"candperm $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v)); \
} while (0)
#define CHERI_CSETBOUNDS(cd, cb, v) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"csetbounds $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v) : "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"csetbounds $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v)); \
} while (0)
#define CHERI_CFROMPTR(cd, cb, v) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cfromptr $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v) : "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"cfromptr $c%0, $c%1, %2\n" \
".set pop\n" \
: : "i" (cd), "i" (cb), "r" (v)); \
} while (0)
#define CHERI_CLC(cd, cb, regbase, offset) do { \
if ((cd) == 0) \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"clc $c%0, %1, %2($c%3)\n" \
".set pop\n" \
: : "i" (cd), "r" (regbase), "i" (offset), "i" (cb) \
: "memory"); \
else \
__asm__ __volatile__ ( \
".set push\n" \
".set noreorder\n" \
"clc $c%0, %1, %2($c%3)\n" \
".set pop\n" \
: : "i" (cd), "r" (regbase), "i" (offset), \
"i" (cb)); \
} while (0)
/*
* Utility functions for the kernel -- as they depend on $kdc.
*/
#ifdef _KERNEL
static inline void
cheri_capability_load(u_int crn_to, struct chericap *cp)
{
CHERI_CLC(crn_to, CHERI_CR_KDC, cp, 0);
}
static inline void
cheri_capability_store(u_int crn_from, struct chericap *cp)
{
CHERI_CSC(crn_from, CHERI_CR_KDC, cp, 0);
}
#endif
# 672 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
/*
* Routines for measuring time -- depends on a later MIPS userspace cycle
* counter.
*/
static __inline uint32_t
cheri_get_cyclecount(void)
{
uint64_t _time;
__asm__ __volatile__ (
".set push\n"
".set noreorder\n"
"rdhwr %0, $2\n"
".set pop\n"
: "=r" (_time));
return (_time & 0xffffffff);
}
/*
* Special marker NOPs recognised by analyse_trace.py to start / stop region
* of interest in trace.
*/
#define CHERI_START_TRACE do { \
__asm__ __volatile__("li $0, 0xbeef"); \
} while(0)
#define CHERI_STOP_TRACE do { \
__asm__ __volatile__("li $0, 0xdead"); \
} while(0)
#ifdef _KERNEL
#define CHERI_CAP_PRINT(crn) do { \
uintmax_t c_perms, c_otype, c_base, c_length, c_offset; \
u_int ctag, c_sealed; \
\
CHERI_CGETTAG(ctag, (crn)); \
CHERI_CGETSEALED(c_sealed, (crn)); \
CHERI_CGETPERM(c_perms, (crn)); \
CHERI_CGETTYPE(c_otype, (crn)); \
CHERI_CGETBASE(c_base, (crn)); \
CHERI_CGETLEN(c_length, (crn)); \
CHERI_CGETOFFSET(c_offset, (crn)); \
printf("v:%u s:%u p:%08jx b:%016jx l:%016jx o:%jx t:%jx\n", \
ctag, c_sealed, c_perms, c_base, c_length, c_offset, \
c_otype); \
} while (0)
#define CHERI_REG_PRINT(crn, num) do { \
printf("$c%02u: ", num); \
CHERI_CAP_PRINT(crn); \
} while (0)
#ifdef DDB
#define DB_CHERI_CAP_PRINT(crn) do { \
uintmax_t c_perms, c_otype, c_base, c_length, c_offset; \
u_int ctag, c_sealed; \
\
CHERI_CGETTAG(ctag, (crn)); \
CHERI_CGETSEALED(c_sealed, (crn)); \
CHERI_CGETPERM(c_perms, (crn)); \
CHERI_CGETTYPE(c_otype, (crn)); \
CHERI_CGETBASE(c_base, (crn)); \
CHERI_CGETLEN(c_length, (crn)); \
CHERI_CGETOFFSET(c_offset, (crn)); \
db_printf("v:%u s:%u p:%08jx b:%016jx l:%016jx o:%jx t:%jx\n", \
ctag, c_sealed, c_perms, c_base, c_length, c_offset, \
c_otype); \
} while (0)
#define DB_CHERI_REG_PRINT(crn, num) do { \
db_printf("$c%02u: ", num); \
DB_CHERI_CAP_PRINT(crn); \
} while (0)
#endif /* !DDB */
# 746 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
#endif /* !_KERNEL */
# 747 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
#endif /* _MIPS_INCLUDE_CHERI_H_ */
# 749 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheri.h" 3 4
# 229 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 2 3 4
#endif /* _SYS_CHERI_H_ */
# 231 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri.h" 3 4
# 36 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <cheri/cheric.h>
#endif /* expanded by -frewrite-includes */
# 36 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 1 3 4
/*-
* Copyright (c) 2013-2016 Robert N. M. Watson
* All rights reserved.
*
* This software was developed by SRI International and the University of
* Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
* ("CTSRD"), as part of the DARPA CRASH research programme.
*
* 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_CHERIC_H_
#define _SYS_CHERIC_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 34 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 3 4
# 35 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/types.h>
#endif /* expanded by -frewrite-includes */
# 35 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 3 4
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <machine/cherireg.h> /* Permission definitions. */
#endif /* expanded by -frewrite-includes */
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 3 4
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 3 4
#if !defined(_KERNEL) && __has_feature(capabilities)
/*
* Programmer-friendly macros for CHERI-aware C code -- requires use of
* CHERI-aware Clang/LLVM, and full capability context switching, so not yet
* usable in the kernel.
*/
#define cheri_getlen(x) __builtin_cheri_get_cap_length( \
__DECONST(__capability void *, (x)))
#define cheri_getbase(x) __builtin_cheri_get_cap_base( \
__DECONST(__capability void *, (x)))
#define cheri_getoffset(x) __builtin_cheri_cap_offset_get( \
__DECONST(__capability void *, (x)))
#define cheri_getperm(x) __builtin_cheri_get_cap_perms( \
__DECONST(__capability void *, (x)))
#define cheri_getsealed(x) __builtin_cheri_get_cap_sealed( \
__DECONST(__capability void *, (x)))
#define cheri_gettag(x) __builtin_cheri_get_cap_tag( \
__DECONST(__capability void *, (x)))
#define cheri_gettype(x) __builtin_cheri_get_cap_type( \
__DECONST(__capability void *, (x)))
#define cheri_andperm(x, y) __builtin_cheri_and_cap_perms( \
__DECONST(__capability void *, (x)), (y))
#define cheri_cleartag(x) __builtin_cheri_clear_cap_tag( \
__DECONST(__capability void *, (x)))
#define cheri_incoffset(x, y) __builtin_cheri_cap_offset_increment( \
__DECONST(__capability void *, (x)), (y))
#define cheri_setoffset(x, y) __builtin_cheri_cap_offset_set( \
__DECONST(__capability void *, (x)), (y))
#define cheri_seal(x, y) __builtin_cheri_seal_cap( \
__DECONST(__capability void *, (x)), \
__DECONST(__capability void *, (y)))
#define cheri_unseal(x, y) __builtin_cheri_unseal_cap( \
__DECONST(__capability void *, (x)), \
__DECONST(__capability void *, (y)))
#define cheri_getcause() __builtin_cheri_get_cause()
#define cheri_setcause(x) __builtin_cheri_set_cause(x)
#define cheri_ccheckperm(c, p) __builtin_cheri_check_perms( \
__DECONST(__capability void *, (c)), (p))
#define cheri_cchecktype(c, t) __builtin_cheri_check_type( \
__DECONST(__capability void *, (c)), (t))
#define cheri_getdefault() __builtin_cheri_get_global_data_cap()
#define cheri_getidc() __builtin_cheri_get_invoke_data_cap()
#define cheri_getkr0c() __builtin_cheri_get_kernel_cap1()
#define cheri_getkr1c() __builtin_cheri_get_kernel_cap2()
#define cheri_getkcc() __builtin_cheri_get_kernel_code_cap()
#define cheri_getkdc() __builtin_cheri_get_kernel_data_cap()
#define cheri_getepcc() __builtin_cheri_get_exception_program_counter_cap()
#define cheri_getpcc() __builtin_cheri_get_program_counter_cap()
#define cheri_getstack() __builtin_memcap_stack_get()
#define cheri_local(c) cheri_andperm((c), ~CHERI_PERM_GLOBAL)
#define cheri_csetbounds(x, y) __builtin_memcap_bounds_set( \
__DECONST(__capability void *, (x)), (y))
/*
* Two variations on cheri_ptr() based on whether we are looking for a code or
* data capability. The compiler's use of CFromPtr will be with respect to
* $ddc or $pcc depending on the type of the pointer derived, so we need to
* use types to differentiate the two versions at compile time. We don't
* provide the full set of function variations for code pointers as they
* haven't proven necessary as yet.
*
* XXXRW: Ideally, casting via a function pointer would cause the compiler to
* derive the capability using CFromPtr on $pcc rather than on $ddc. This
* appears not currently to be the case, so manually derive using
* cheri_getpcc() for now.
*/
static __inline __capability void *
cheri_codeptr(const void *ptr, size_t len)
{
#ifdef NOTYET
__capability void (*c)(void) = ptr;
#else
# 118 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 3 4
__capability void *c = cheri_setoffset(cheri_getpcc(),
(register_t)ptr);
#endif
# 121 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 3 4
/* Assume CFromPtr without base set, availability of CSetBounds. */
return (cheri_csetbounds(c, len));
}
static __inline __capability void *
cheri_codeptrperm(const void *ptr, size_t len, register_t perm)
{
return (cheri_andperm(cheri_codeptr(ptr, len),
perm | CHERI_PERM_GLOBAL));
}
static __inline __capability void *
cheri_ptr(const void *ptr, size_t len)
{
/* Assume CFromPtr without base set, availability of CSetBounds. */
return (cheri_csetbounds((const __capability void *)ptr, len));
}
static __inline __capability void *
cheri_ptrperm(const void *ptr, size_t len, register_t perm)
{
return (cheri_andperm(cheri_ptr(ptr, len), perm | CHERI_PERM_GLOBAL));
}
static __inline __capability void *
cheri_ptrpermoff(const void *ptr, size_t len, register_t perm, off_t off)
{
return (cheri_setoffset(cheri_ptrperm(ptr, len, perm), off));
}
/*
* Construct a capability suitable to describe a type identified by 'ptr';
* set it to zero-length with the offset equal to the base. The caller must
* provide a root capability (in the old world order, derived from $ddc, but
* in the new world order, likely extracted from the kernel using sysarch(2)).
*
* The caller may wish to assert various properties about the returned
* capability, including that CHERI_PERM_SEAL is set.
*/
static __inline __capability void *
cheri_maketype(__capability void *root_type, register_t type)
{
__capability void *c;
c = root_type;
c = cheri_setoffset(c, type); /* Set type as desired. */
c = cheri_csetbounds(c, 1); /* ISA implies length of 1. */
c = cheri_andperm(c, CHERI_PERM_GLOBAL | CHERI_PERM_SEAL); /* Perms. */
return (c);
}
static __inline __capability void *
cheri_zerocap(void)
{
return (__capability void *)0;
}
#define CHERI_PRINT_PTR(ptr) \
printf("%s: " #ptr " b:%016jx l:%016zx o:%jx\n", __func__, \
cheri_getbase((const __capability void *)(ptr)), \
cheri_getlen((const __capability void *)(ptr)), \
cheri_getoffset((const __capability void *)(ptr)))
#endif
# 189 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <machine/cheric.h>
#endif /* expanded by -frewrite-includes */
# 190 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheric.h" 1 3 4
/*-
* Copyright (c) 2013-2016 Robert N. M. Watson
* All rights reserved.
*
* This software was developed by SRI International and the University of
* Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
* ("CTSRD"), as part of the DARPA CRASH research programme.
*
* 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 _MIPS_INCLUDE_CHERIC_H_
#define _MIPS_INCLUDE_CHERIC_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 34 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheric.h" 3 4
# 35 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheric.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <cheri/cheri.h>
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheric.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheric.h" 3 4
#if !defined(_KERNEL) && __has_feature(capabilities)
#define cheri_getreg(x) ({ \
__capability void *_cap; \
__asm __volatile ("cmove %0, $c" #x : "=C" (_cap)); \
_cap; \
})
#define cheri_setreg(x, cap) do { \
if ((x) == 0) \
__asm __volatile ("cmove $c" #x ", %0" : : "C" (cap) : \
"memory"); \
else \
__asm __volatile ("cmove $c" #x ", %0" : : "C" (cap)); \
} while (0)
#endif
# 53 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheric.h" 3 4
#endif /* _MIPS_INCLUDE_CHERIC_H_ */
# 55 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/cheric.h" 3 4
# 191 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 2 3 4
#endif /* _SYS_CHERIC_H_ */
# 193 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheric.h" 3 4
# 37 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <cheri/cheri_enter.h>
#endif /* expanded by -frewrite-includes */
# 37 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_enter.h" 1 3 4
/*-
* Copyright (c) 2014-2015 Robert N. M. Watson
* All rights reserved.
*
* This software was developed by SRI International and the University of
* Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
* ("CTSRD"), as part of the DARPA CRASH research programme.
*
* 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 _CHERI_ENTER_H_
#define _CHERI_ENTER_H_
typedef register_t (*cheri_system_user_fn_t)(struct cheri_object system_object,
register_t methodnum,
register_t a0, register_t a1, register_t a2, register_t a3,
register_t a4, register_t a5, register_t a6, register_t a7,
__capability void *c3, __capability void *c4,
__capability void *c5, __capability void *c6,
__capability void *c7)
__attribute__((cheri_ccall)); /* XXXRW: Will be ccheri_ccallee. */
void cheri_system_user_register_fn(cheri_system_user_fn_t fn_ptr);
/*
* Method numbers used by the sandbox runtime itself.
*
* WARNING: These values must match those currently hard coded in the sandbox
* C runtime (lib/csu/cheri/crt_sb.S).
*
* NB: In the future, these should be via a reserved entry point rather than
* the primary object-capability 'invoke' entry point, so that they can be
* called only by the runtime.
*/
#define SANDBOX_RUNTIME_CONSTRUCTORS (-1)
#define SANDBOX_RUNTIME_DESTROCTORS (-2)
#define CHERI_SYSTEM_USER_BASE 1000
#define CHERI_SYSTEM_USER_CEILING 2000
#endif /* !_CHERI_ENTER_H_ */
# 62 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_enter.h" 3 4
# 38 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <cheri/cheri_fd.h>
#endif /* expanded by -frewrite-includes */
# 38 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_fd.h" 1 3 4
/*-
* Copyright (c) 2014-2015 Robert N. M. Watson
* All rights reserved.
*
* This software was developed by SRI International and the University of
* Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
* ("CTSRD"), as part of the DARPA CRASH research programme.
*
* 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 _CHERI_FD_H_
#define _CHERI_FD_H_
extern __capability vm_offset_t *cheri_fd_vtable;
extern struct cheri_object cheri_fd;
#ifdef CHERI_FD_INTERNAL
#define CHERI_FD_CCALL \
__attribute__((cheri_ccallee)) \
__attribute__((cheri_method_suffix("_c"))) \
__attribute__((cheri_method_class(cheri_fd)))
#else
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_fd.h" 3 4
#define CHERI_FD_CCALL \
__attribute__((cheri_ccall)) \
__attribute__((cheri_method_suffix("_c"))) \
__attribute__((cheri_method_class(cheri_fd)))
#endif
# 48 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_fd.h" 3 4
/*
* Interfaces to create/revoke/destroy cheri_fd objects with ambient
* authority.
*/
int cheri_fd_new(int fd, struct cheri_object *cop);
void cheri_fd_revoke(struct cheri_object co);
void cheri_fd_destroy(struct cheri_object co);
/*
* All methods return the following structure, which fits in register return
* values for the calling convention. In practice, retval0 is what we think
* of as the normal return value for each method; retval1 holds an errno value
* if retval0 == -1. This is near-identical to the semantics of the kernel's
* td_retval[0,1].
*/
struct cheri_fd_ret {
register_t cfr_retval0; /* Actual return value. */
register_t cfr_retval1; /* errno if cfr_retval0 == -1. */
};
/*
* Methods that can be invoked on cheri_fd objects regardless of ambient
* authority.
*/
struct stat;
CHERI_FD_CCALL
struct cheri_fd_ret cheri_fd_fstat(__capability struct stat *sb_c);
CHERI_FD_CCALL
struct cheri_fd_ret cheri_fd_lseek(off_t offset, int whence);
CHERI_FD_CCALL
struct cheri_fd_ret cheri_fd_read(__capability void *buf_c,
size_t nbytes);
CHERI_FD_CCALL
struct cheri_fd_ret cheri_fd_write(__capability const void *buf_c,
size_t nbytes);
#endif /* !_CHERI_FD_H_ */
# 87 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_fd.h" 3 4
# 39 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <cheri/cheri_invoke.h>
#endif /* expanded by -frewrite-includes */
# 39 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_invoke.h" 1 3 4
/*-
* Copyright (c) 2013-2015 Robert N. M. Watson
* All rights reserved.
*
* This software was developed by SRI International and the University of
* Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
* ("CTSRD"), as part of the DARPA CRASH research programme.
*
* 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 _CHERI_INVOKE_H_
#define _CHERI_INVOKE_H_
#define CHERI_INVOKE_METHOD_LEGACY_INVOKE -1
#if __has_feature(capabilities)
register_t cheri_invoke(struct cheri_object co, register_t v0,
register_t a0, register_t a1, register_t a2,
register_t a3, register_t a4, register_t a5,
register_t a6, register_t a7, __capability void *c3,
__capability void *c4, __capability void *c5,
__capability void *c6, __capability void *c7,
__capability void *c8, __capability void *c9,
__capability void *c10) __attribute__((cheri_ccall));
#endif
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_invoke.h" 3 4
#endif /* !_CHERI_INVOKE_H_ */
# 48 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_invoke.h" 3 4
# 40 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <cheri/cheri_memcpy.h>
#endif /* expanded by -frewrite-includes */
# 40 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_memcpy.h" 1 3 4
/*-
* Copyright (c) 2012 Robert N. M. Watson
* All rights reserved.
*
* This software was developed by SRI International and the University of
* Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
* ("CTSRD"), as part of the DARPA CRASH research programme.
*
* 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 _CMEMCPY_H_
#define _CMEMCPY_H_
static inline void
memcpy_tocap(u_int creg, const void *src, off_t off, size_t len)
{
size_t count;
const uint8_t *v;
for (v = src, count = 0; count < len; v++, count++)
CHERI_CSB(*v, off + count, 0, creg);
}
static inline void
memcpy_fromcap(void *dst, u_int creg, off_t off, size_t len)
{
size_t count;
uint8_t *v;
for (v = dst, count = 0; count < len; v++, count++)
CHERI_CLB(*v, off + count, 0, creg);
}
#endif /* !_CMEMCPY_H_ */
# 55 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_memcpy.h" 3 4
# 41 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <cheri/cheri_system.h>
#endif /* expanded by -frewrite-includes */
# 41 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_system.h" 1 3 4
/*-
* Copyright (c) 2014 Robert N. M. Watson
* Copyright (c) 2014 SRI International
* All rights reserved.
*
* This software was developed by SRI International and the University of
* Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
* ("CTSRD"), as part of the DARPA CRASH research programme.
*
* 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 _CHERI_SYSTEM_H_
#define _CHERI_SYSTEM_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/syscall.h>
#endif /* expanded by -frewrite-includes */
# 35 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_system.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/syscall.h" 1 3 4
/*
* System call numbers.
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
* created from FreeBSD: head/sys/kern/syscalls.master 310638 2016-12-27 20:21:11Z jhb
*/
#define SYS_syscall 0
#define SYS_exit 1
#define SYS_fork 2
#define SYS_read 3
#define SYS_write 4
#define SYS_open 5
#define SYS_close 6
#define SYS_wait4 7
/* 8 is old creat */
#define SYS_link 9
#define SYS_unlink 10
/* 11 is obsolete execv */
#define SYS_chdir 12
#define SYS_fchdir 13
#define SYS_mknod 14
#define SYS_chmod 15
#define SYS_chown 16
#define SYS_break 17
/* 18 is freebsd4 getfsstat */
/* 19 is old lseek */
#define SYS_getpid 20
#define SYS_mount 21
#define SYS_unmount 22
#define SYS_setuid 23
#define SYS_getuid 24
#define SYS_geteuid 25
#define SYS_ptrace 26
#define SYS_recvmsg 27
#define SYS_sendmsg 28
#define SYS_recvfrom 29
#define SYS_accept 30
#define SYS_getpeername 31
#define SYS_getsockname 32
#define SYS_access 33
#define SYS_chflags 34
#define SYS_fchflags 35
#define SYS_sync 36
#define SYS_kill 37
/* 38 is old stat */
#define SYS_getppid 39
/* 40 is old lstat */
#define SYS_dup 41
#define SYS_freebsd10_pipe 42
#define SYS_getegid 43
#define SYS_profil 44
#define SYS_ktrace 45
/* 46 is old sigaction */
#define SYS_getgid 47
/* 48 is old sigprocmask */
#define SYS_getlogin 49
#define SYS_setlogin 50
#define SYS_acct 51
/* 52 is old sigpending */
#define SYS_sigaltstack 53
#define SYS_ioctl 54
#define SYS_reboot 55
#define SYS_revoke 56
#define SYS_symlink 57
#define SYS_readlink 58
#define SYS_execve 59
#define SYS_umask 60
#define SYS_chroot 61
/* 62 is old fstat */
/* 63 is old getkerninfo */
/* 64 is old getpagesize */
#define SYS_msync 65
#define SYS_vfork 66
/* 67 is obsolete vread */
/* 68 is obsolete vwrite */
#define SYS_sbrk 69
#define SYS_sstk 70
/* 71 is old mmap */
#define SYS_vadvise 72
#define SYS_munmap 73
#define SYS_mprotect 74
#define SYS_madvise 75
/* 76 is obsolete vhangup */
/* 77 is obsolete vlimit */
#define SYS_mincore 78
#define SYS_getgroups 79
#define SYS_setgroups 80
#define SYS_getpgrp 81
#define SYS_setpgid 82
#define SYS_setitimer 83
/* 84 is old wait */
#define SYS_swapon 85
#define SYS_getitimer 86
/* 87 is old gethostname */
/* 88 is old sethostname */
#define SYS_getdtablesize 89
#define SYS_dup2 90
#define SYS_fcntl 92
#define SYS_select 93
#define SYS_fsync 95
#define SYS_setpriority 96
#define SYS_socket 97
#define SYS_connect 98
/* 99 is old accept */
#define SYS_getpriority 100
/* 101 is old send */
/* 102 is old recv */
/* 103 is old sigreturn */
#define SYS_bind 104
#define SYS_setsockopt 105
#define SYS_listen 106
/* 107 is obsolete vtimes */
/* 108 is old sigvec */
/* 109 is old sigblock */
/* 110 is old sigsetmask */
/* 111 is old sigsuspend */
/* 112 is old sigstack */
/* 113 is old recvmsg */
/* 114 is old sendmsg */
/* 115 is obsolete vtrace */
#define SYS_gettimeofday 116
#define SYS_getrusage 117
#define SYS_getsockopt 118
#define SYS_readv 120
#define SYS_writev 121
#define SYS_settimeofday 122
#define SYS_fchown 123
#define SYS_fchmod 124
/* 125 is old recvfrom */
#define SYS_setreuid 126
#define SYS_setregid 127
#define SYS_rename 128
/* 129 is old truncate */
/* 130 is old ftruncate */
#define SYS_flock 131
#define SYS_mkfifo 132
#define SYS_sendto 133
#define SYS_shutdown 134
#define SYS_socketpair 135
#define SYS_mkdir 136
#define SYS_rmdir 137
#define SYS_utimes 138
/* 139 is obsolete 4.2 sigreturn */
#define SYS_adjtime 140
/* 141 is old getpeername */
/* 142 is old gethostid */
/* 143 is old sethostid */
/* 144 is old getrlimit */
/* 145 is old setrlimit */
/* 146 is old killpg */
#define SYS_setsid 147
#define SYS_quotactl 148
/* 149 is old quota */
/* 150 is old getsockname */
#define SYS_nlm_syscall 154
#define SYS_nfssvc 155
/* 156 is old getdirentries */
/* 157 is freebsd4 statfs */
/* 158 is freebsd4 fstatfs */
#define SYS_lgetfh 160
#define SYS_getfh 161
/* 162 is freebsd4 getdomainname */
/* 163 is freebsd4 setdomainname */
/* 164 is freebsd4 uname */
#define SYS_sysarch 165
#define SYS_rtprio 166
#define SYS_semsys 169
#define SYS_msgsys 170
#define SYS_shmsys 171
/* 173 is freebsd6 pread */
/* 174 is freebsd6 pwrite */
#define SYS_setfib 175
#define SYS_ntp_adjtime 176
#define SYS_setgid 181
#define SYS_setegid 182
#define SYS_seteuid 183
#define SYS_stat 188
#define SYS_fstat 189
#define SYS_lstat 190
#define SYS_pathconf 191
#define SYS_fpathconf 192
#define SYS_getrlimit 194
#define SYS_setrlimit 195
#define SYS_getdirentries 196
/* 197 is freebsd6 mmap */
#define SYS___syscall 198
/* 199 is freebsd6 lseek */
/* 200 is freebsd6 truncate */
/* 201 is freebsd6 ftruncate */
#define SYS___sysctl 202
#define SYS_mlock 203
#define SYS_munlock 204
#define SYS_undelete 205
#define SYS_futimes 206
#define SYS_getpgid 207
#define SYS_poll 209
#define SYS_freebsd7___semctl 220
#define SYS_semget 221
#define SYS_semop 222
#define SYS_freebsd7_msgctl 224
#define SYS_msgget 225
#define SYS_msgsnd 226
#define SYS_msgrcv 227
#define SYS_shmat 228
#define SYS_freebsd7_shmctl 229
#define SYS_shmdt 230
#define SYS_shmget 231
#define SYS_clock_gettime 232
#define SYS_clock_settime 233
#define SYS_clock_getres 234
#define SYS_ktimer_create 235
#define SYS_ktimer_delete 236
#define SYS_ktimer_settime 237
#define SYS_ktimer_gettime 238
#define SYS_ktimer_getoverrun 239
#define SYS_nanosleep 240
#define SYS_ffclock_getcounter 241
#define SYS_ffclock_setestimate 242
#define SYS_ffclock_getestimate 243
#define SYS_clock_getcpuclockid2 247
#define SYS_ntp_gettime 248
#define SYS_minherit 250
#define SYS_rfork 251
/* 252 is obsolete openbsd_poll */
#define SYS_issetugid 253
#define SYS_lchown 254
#define SYS_aio_read 255
#define SYS_aio_write 256
#define SYS_lio_listio 257
#define SYS_getdents 272
#define SYS_lchmod 274
#define SYS_netbsd_lchown 275
#define SYS_lutimes 276
#define SYS_netbsd_msync 277
#define SYS_nstat 278
#define SYS_nfstat 279
#define SYS_nlstat 280
#define SYS_preadv 289
#define SYS_pwritev 290
/* 297 is freebsd4 fhstatfs */
#define SYS_fhopen 298
#define SYS_fhstat 299
#define SYS_modnext 300
#define SYS_modstat 301
#define SYS_modfnext 302
#define SYS_modfind 303
#define SYS_kldload 304
#define SYS_kldunload 305
#define SYS_kldfind 306
#define SYS_kldnext 307
#define SYS_kldstat 308
#define SYS_kldfirstmod 309
#define SYS_getsid 310
#define SYS_setresuid 311
#define SYS_setresgid 312
/* 313 is obsolete signanosleep */
#define SYS_aio_return 314
#define SYS_aio_suspend 315
#define SYS_aio_cancel 316
#define SYS_aio_error 317
/* 318 is freebsd6 aio_read */
/* 319 is freebsd6 aio_write */
/* 320 is freebsd6 lio_listio */
#define SYS_yield 321
/* 322 is obsolete thr_sleep */
/* 323 is obsolete thr_wakeup */
#define SYS_mlockall 324
#define SYS_munlockall 325
#define SYS___getcwd 326
#define SYS_sched_setparam 327
#define SYS_sched_getparam 328
#define SYS_sched_setscheduler 329
#define SYS_sched_getscheduler 330
#define SYS_sched_yield 331
#define SYS_sched_get_priority_max 332
#define SYS_sched_get_priority_min 333
#define SYS_sched_rr_get_interval 334
#define SYS_utrace 335
/* 336 is freebsd4 sendfile */
#define SYS_kldsym 337
#define SYS_jail 338
#define SYS_nnpfs_syscall 339
#define SYS_sigprocmask 340
#define SYS_sigsuspend 341
/* 342 is freebsd4 sigaction */
#define SYS_sigpending 343
/* 344 is freebsd4 sigreturn */
#define SYS_sigtimedwait 345
#define SYS_sigwaitinfo 346
#define SYS___acl_get_file 347
#define SYS___acl_set_file 348
#define SYS___acl_get_fd 349
#define SYS___acl_set_fd 350
#define SYS___acl_delete_file 351
#define SYS___acl_delete_fd 352
#define SYS___acl_aclcheck_file 353
#define SYS___acl_aclcheck_fd 354
#define SYS_extattrctl 355
#define SYS_extattr_set_file 356
#define SYS_extattr_get_file 357
#define SYS_extattr_delete_file 358
#define SYS_aio_waitcomplete 359
#define SYS_getresuid 360
#define SYS_getresgid 361
#define SYS_kqueue 362
#define SYS_kevent 363
#define SYS_extattr_set_fd 371
#define SYS_extattr_get_fd 372
#define SYS_extattr_delete_fd 373
#define SYS___setugid 374
#define SYS_eaccess 376
#define SYS_afs3_syscall 377
#define SYS_nmount 378
#define SYS___mac_get_proc 384
#define SYS___mac_set_proc 385
#define SYS___mac_get_fd 386
#define SYS___mac_get_file 387
#define SYS___mac_set_fd 388
#define SYS___mac_set_file 389
#define SYS_kenv 390
#define SYS_lchflags 391
#define SYS_uuidgen 392
#define SYS_sendfile 393
#define SYS_mac_syscall 394
#define SYS_getfsstat 395
#define SYS_statfs 396
#define SYS_fstatfs 397
#define SYS_fhstatfs 398
#define SYS_ksem_close 400
#define SYS_ksem_post 401
#define SYS_ksem_wait 402
#define SYS_ksem_trywait 403
#define SYS_ksem_init 404
#define SYS_ksem_open 405
#define SYS_ksem_unlink 406
#define SYS_ksem_getvalue 407
#define SYS_ksem_destroy 408
#define SYS___mac_get_pid 409
#define SYS___mac_get_link 410
#define SYS___mac_set_link 411
#define SYS_extattr_set_link 412
#define SYS_extattr_get_link 413
#define SYS_extattr_delete_link 414
#define SYS___mac_execve 415
#define SYS_sigaction 416
#define SYS_sigreturn 417
#define SYS_getcontext 421
#define SYS_setcontext 422
#define SYS_swapcontext 423
#define SYS_swapoff 424
#define SYS___acl_get_link 425
#define SYS___acl_set_link 426
#define SYS___acl_delete_link 427
#define SYS___acl_aclcheck_link 428
#define SYS_sigwait 429
#define SYS_thr_create 430
#define SYS_thr_exit 431
#define SYS_thr_self 432
#define SYS_thr_kill 433
#define SYS_jail_attach 436
#define SYS_extattr_list_fd 437
#define SYS_extattr_list_file 438
#define SYS_extattr_list_link 439
#define SYS_ksem_timedwait 441
#define SYS_thr_suspend 442
#define SYS_thr_wake 443
#define SYS_kldunloadf 444
#define SYS_audit 445
#define SYS_auditon 446
#define SYS_getauid 447
#define SYS_setauid 448
#define SYS_getaudit 449
#define SYS_setaudit 450
#define SYS_getaudit_addr 451
#define SYS_setaudit_addr 452
#define SYS_auditctl 453
#define SYS__umtx_op 454
#define SYS_thr_new 455
#define SYS_sigqueue 456
#define SYS_kmq_open 457
#define SYS_kmq_setattr 458
#define SYS_kmq_timedreceive 459
#define SYS_kmq_timedsend 460
#define SYS_kmq_notify 461
#define SYS_kmq_unlink 462
#define SYS_abort2 463
#define SYS_thr_set_name 464
#define SYS_aio_fsync 465
#define SYS_rtprio_thread 466
#define SYS_sctp_peeloff 471
#define SYS_sctp_generic_sendmsg 472
#define SYS_sctp_generic_sendmsg_iov 473
#define SYS_sctp_generic_recvmsg 474
#define SYS_pread 475
#define SYS_pwrite 476
#define SYS_mmap 477
#define SYS_lseek 478
#define SYS_truncate 479
#define SYS_ftruncate 480
#define SYS_thr_kill2 481
#define SYS_shm_open 482
#define SYS_shm_unlink 483
#define SYS_cpuset 484
#define SYS_cpuset_setid 485
#define SYS_cpuset_getid 486
#define SYS_cpuset_getaffinity 487
#define SYS_cpuset_setaffinity 488
#define SYS_faccessat 489
#define SYS_fchmodat 490
#define SYS_fchownat 491
#define SYS_fexecve 492
#define SYS_fstatat 493
#define SYS_futimesat 494
#define SYS_linkat 495
#define SYS_mkdirat 496
#define SYS_mkfifoat 497
#define SYS_mknodat 498
#define SYS_openat 499
#define SYS_readlinkat 500
#define SYS_renameat 501
#define SYS_symlinkat 502
#define SYS_unlinkat 503
#define SYS_posix_openpt 504
#define SYS_gssd_syscall 505
#define SYS_jail_get 506
#define SYS_jail_set 507
#define SYS_jail_remove 508
#define SYS_closefrom 509
#define SYS___semctl 510
#define SYS_msgctl 511
#define SYS_shmctl 512
#define SYS_lpathconf 513
/* 514 is obsolete cap_new */
#define SYS___cap_rights_get 515
#define SYS_cap_enter 516
#define SYS_cap_getmode 517
#define SYS_pdfork 518
#define SYS_pdkill 519
#define SYS_pdgetpid 520
#define SYS_pselect 522
#define SYS_getloginclass 523
#define SYS_setloginclass 524
#define SYS_rctl_get_racct 525
#define SYS_rctl_get_rules 526
#define SYS_rctl_get_limits 527
#define SYS_rctl_add_rule 528
#define SYS_rctl_remove_rule 529
#define SYS_posix_fallocate 530
#define SYS_posix_fadvise 531
#define SYS_wait6 532
#define SYS_cap_rights_limit 533
#define SYS_cap_ioctls_limit 534
#define SYS_cap_ioctls_get 535
#define SYS_cap_fcntls_limit 536
#define SYS_cap_fcntls_get 537
#define SYS_bindat 538
#define SYS_connectat 539
#define SYS_chflagsat 540
#define SYS_accept4 541
#define SYS_pipe2 542
#define SYS_aio_mlock 543
#define SYS_procctl 544
#define SYS_ppoll 545
#define SYS_futimens 546
#define SYS_utimensat 547
#define SYS_numa_getaffinity 548
#define SYS_numa_setaffinity 549
#define SYS_fdatasync 550
#define SYS_MAXSYSCALL 551
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_system.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <stdarg.h>
#endif /* expanded by -frewrite-includes */
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_system.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 1 3 4
/*
* JNPR: stdarg.h,v 1.3 2006/09/15 12:52:34 katta
* $FreeBSD$
*/
#ifndef _MACHINE_STDARG_H_
#define _MACHINE_STDARG_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 8 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
# 9 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 9 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
# 10 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
#if __GNUC__ >= 3
#ifndef _VA_LIST_DECLARED
#define _VA_LIST_DECLARED
typedef __va_list va_list;
#endif
# 18 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
#define va_start(v,l) __builtin_va_start((v),l)
#define va_end __builtin_va_end
#define va_arg __builtin_va_arg
#define va_copy __builtin_va_copy
#else /* __GNUC__ */
# 24 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
/* ---------------------------------------- */
/* VARARGS for MIPS/GNU CC */
/* ---------------------------------------- */
#if 0 /* expanded by -frewrite-includes */
#include <machine/endian.h>
#endif /* expanded by -frewrite-includes */
# 30 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
# 31 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
/* These macros implement varargs for GNU C--either traditional or ANSI. */
/* Define __gnuc_va_list. */
#ifndef __GNUC_VA_LIST
#define __GNUC_VA_LIST
typedef char * __gnuc_va_list;
typedef __gnuc_va_list va_list;
#endif /* ! __GNUC_VA_LIST */
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
/* If this is for internal libc use, don't define anything but
__gnuc_va_list. */
#ifndef _VA_MIPS_H_ENUM
#define _VA_MIPS_H_ENUM
enum {
__no_type_class = -1,
__void_type_class,
__integer_type_class,
__char_type_class,
__enumeral_type_class,
__boolean_type_class,
__pointer_type_class,
__reference_type_class,
__offset_type_class,
__real_type_class,
__complex_type_class,
__function_type_class,
__method_type_class,
__record_type_class,
__union_type_class,
__array_type_class,
__string_type_class,
__set_type_class,
__file_type_class,
__lang_type_class
};
#endif
# 72 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
/* In GCC version 2, we want an ellipsis at the end of the declaration
of the argument list. GCC version 1 can't parse it. */
#if __GNUC__ > 1
#define __va_ellipsis ...
#else
# 79 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
#define __va_ellipsis
#endif
# 81 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
#define va_start(__AP, __LASTARG) \
(__AP = (__gnuc_va_list) __builtin_next_arg (__LASTARG))
#define va_end(__AP) ((void)0)
/* We cast to void * and then to TYPE * because this avoids
a warning about increasing the alignment requirement. */
/* The __mips64 cases are reversed from the 32 bit cases, because the standard
32 bit calling convention left-aligns all parameters smaller than a word,
whereas the __mips64 calling convention does not (and hence they are
right aligned). */
#ifdef __mips64
#define __va_rounded_size(__TYPE) (((sizeof (__TYPE) + 8 - 1) / 8) * 8)
#define __va_reg_size 8
#if defined(__MIPSEB__) || (BYTE_ORDER == BIG_ENDIAN)
#define va_arg(__AP, __type) \
((__type *) (void *) (__AP = (char *) \
((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \
+ __va_rounded_size (__type))))[-1]
#else /* ! __MIPSEB__ && !BYTE_ORDER == BIG_ENDIAN */
# 108 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
#define va_arg(__AP, __type) \
((__AP = (char *) ((((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8) \
+ __va_rounded_size (__type))), \
*(__type *) (void *) (__AP - __va_rounded_size (__type)))
#endif /* ! __MIPSEB__ && !BYTE_ORDER == BIG_ENDIAN */
# 113 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
#else /* ! __mips64 */
# 115 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
#define __va_rounded_size(__TYPE) \
(((sizeof (__TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
#define __va_reg_size 4
#if defined(__MIPSEB__) || (BYTE_ORDER == BIG_ENDIAN)
/* For big-endian machines. */
#define va_arg(__AP, __type) \
((__AP = (char *) ((__alignof__ (__type) > 4 \
? ((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8 \
: ((__PTRDIFF_TYPE__)__AP + 4 - 1) & -4) \
+ __va_rounded_size (__type))), \
*(__type *) (void *) (__AP - __va_rounded_size (__type)))
#else /* ! __MIPSEB__ && !BYTE_ORDER == BIG_ENDIAN */
# 130 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
/* For little-endian machines. */
#define va_arg(__AP, __type) \
((__type *) (void *) (__AP = (char *) ((__alignof__(__type) > 4 \
? ((__PTRDIFF_TYPE__)__AP + 8 - 1) & -8 \
: ((__PTRDIFF_TYPE__)__AP + 4 - 1) & -4) \
+ __va_rounded_size(__type))))[-1]
#endif /* ! __MIPSEB__ && !BYTE_ORDER == BIG_ENDIAN */
# 137 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
#endif /* ! __mips64 */
# 138 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
/* Copy __gnuc_va_list into another variable of this type. */
#define __va_copy(dest, src) (dest) = (src)
#define va_copy(dest, src) (dest) = (src)
#endif /* __GNUC__ */
# 144 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
#endif /* _MACHINE_STDARG_H_ */
# 145 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdarg.h" 3 4
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_system.h" 2 3 4
/*
* For now, expose the symbol for the system-object reference in each sandbox
* as a public symbol. At some point we will want to find a better way to do
* this.
*/
extern struct cheri_object _cheri_system_object;
#ifdef CHERI_SYSTEM_INTERNAL
#define CHERI_SYSTEM_CCALL \
__attribute__((cheri_ccallee)) \
__attribute__((cheri_method_class(_cheri_system_object)))
#else
# 51 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_system.h" 3 4
#define CHERI_SYSTEM_CCALL \
__attribute__((cheri_ccall)) \
__attribute__((cheri_method_suffix("_cap"))) \
__attribute__((cheri_method_class(_cheri_system_object)))
#endif
# 56 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_system.h" 3 4
/*
* This header defines the interface for the CHERI system class. Currently,
* it is a bit catch-all, and provides a few key service that make it easy to
* implement (and debug) sandboxed code. In the future, we anticipate the
* system class being an entry point to a number of other classes -- e.g.,
* providing an open() method that returns file-descriptor objects. We are
* definitely not yet at that point.
*/
/*
* Methods themselves.
*/
CHERI_SYSTEM_CCALL
int cheri_system_helloworld(void);
CHERI_SYSTEM_CCALL
int cheri_system_puts(__capability const char *str);
CHERI_SYSTEM_CCALL
int cheri_system_putchar(int c);
CHERI_SYSTEM_CCALL
int cheri_system_clock_gettime(clockid_t clock_id,
__capability struct timespec *tp);
CHERI_SYSTEM_CCALL
int cheri_system_calloc(size_t number, size_t size,
void __capability * __capability * ptrp);
CHERI_SYSTEM_CCALL
int cheri_system_free(__capability void *ptr);
CHERI_SYSTEM_CCALL
register_t cheri_system_user_call_fn(register_t methodnum,
register_t a0, register_t a1, register_t a2,
register_t a3, register_t a4, register_t a5,
register_t a6,
__capability void *c3, __capability void *c4,
__capability void *c5, __capability void *c6,
__capability void *c7);
/*
* XXXRW: Probably should be library-private: the CHERI type of the system
* library.
*/
extern __capability void *cheri_system_type;
typedef int(*syscall_check_t)(int *ret, __capability int *stub_errno);
extern syscall_check_t syscall_checks[SYS_MAXSYSCALL];
/*
* Vtable for cheri_system methods.
*/
extern __capability vm_offset_t *cheri_system_vtable;
#define SYS_STUB(_num, _ret, _sys, \
_protoargs, _protoargs_chk, _protoargs_err, \
_callargs, _callargs_chk, _callargs_err, _localcheck) \
CHERI_SYSTEM_CCALL _ret __cheri_system_sys_##_sys _protoargs_err;
#define SYS_STUB_ARGHASPTRS SYS_STUB
#define SYS_STUB_VA(_num, _ret, _sys, _lastarg, \
_protoargs, _vprotoargs, _protoargs_chk, _protoargs_err, \
_callargs, _callargs_chk, _callargs_err, _localcheck) \
CHERI_SYSTEM_CCALL _ret __cheri_system_sys_##_sys _protoargs_err;
#if 0 /* expanded by -frewrite-includes */
#include <compat/cheriabi/cheriabi_sysstubs.h>
#endif /* expanded by -frewrite-includes */
# 116 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_system.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 1 3 4
/*
* System call stub generation macros.
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
* created fromFreeBSD$
*/
#if 0 /* expanded by -frewrite-includes */
#include <sys/acl.h>
#endif /* expanded by -frewrite-includes */
# 9 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 1 3 4
/*-
* Copyright (c) 1999-2001 Robert N. M. Watson
* Copyright (c) 2008 Edward Tomasz Napierała <trasz@FreeBSD.org>
* All rights reserved.
*
* This software was developed by Robert Watson for the TrustedBSD Project.
*
* 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.
*
* $FreeBSD$
*/
/*
* Developed by the TrustedBSD Project.
* Support for POSIX.1e and NFSv4 access control lists.
*/
#ifndef _SYS_ACL_H_
#define _SYS_ACL_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/param.h>
#endif /* expanded by -frewrite-includes */
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 1 3 4
/*-
* 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.
* 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.
*
* @(#)param.h 8.3 (Berkeley) 4/4/95
* $FreeBSD$
*/
#ifndef _SYS_PARAM_H_
#define _SYS_PARAM_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/_null.h>
#endif /* expanded by -frewrite-includes */
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#define BSD 199506 /* System version (year & month). */
#define BSD4_3 1
#define BSD4_4 1
/*
* __FreeBSD_version numbers are documented in the Porter's Handbook.
* If you bump the version for any reason, you should update the documentation
* there.
* Currently this lives here in the doc/ repository:
*
* head/en_US.ISO8859-1/books/porters-handbook/versions/chapter.xml
*
* scheme is: <major><two digit minor>Rxx
* 'R' is in the range 0 to 4 if this is a release branch or
* x.0-CURRENT before RELENG_*_0 is created, otherwise 'R' is
* in the range 5 to 9.
*/
#undef __FreeBSD_version
#define __FreeBSD_version 1200019 /* Master, propagated to newvers */
/*
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
* which by definition is always true on FreeBSD. This macro is also defined
* on other systems that use the kernel of FreeBSD, such as GNU/kFreeBSD.
*
* It is tempting to use this macro in userland code when we want to enable
* kernel-specific routines, and in fact it's fine to do this in code that
* is part of FreeBSD itself. However, be aware that as presence of this
* macro is still not widespread (e.g. older FreeBSD versions, 3rd party
* compilers, etc), it is STRONGLY DISCOURAGED to check for this macro in
* external applications without also checking for __FreeBSD__ as an
* alternative.
*/
#undef __FreeBSD_kernel__
#define __FreeBSD_kernel__
#ifdef _KERNEL
#define P_OSREL_SIGWAIT 700000
#define P_OSREL_SIGSEGV 700004
#define P_OSREL_MAP_ANON 800104
#define P_OSREL_MAP_FSTRICT 1100036
#define P_OSREL_SHUTDOWN_ENOTCONN 1100077
#define P_OSREL_MAJOR(x) ((x) / 100000)
#endif
# 88 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef LOCORE
#if 0 /* expanded by -frewrite-includes */
#include <sys/types.h>
#endif /* expanded by -frewrite-includes */
# 90 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
# 91 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#endif
# 92 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
/*
* Machine-independent constants (some used in following include files).
* Redefined constants are from POSIX 1003.1 limits file.
*
* MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>)
*/
#if 0 /* expanded by -frewrite-includes */
#include <sys/syslimits.h>
#endif /* expanded by -frewrite-includes */
# 99 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/syslimits.h" 1 3 4
/*-
* 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.
* 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.
*
* @(#)syslimits.h 8.1 (Berkeley) 6/2/93
* $FreeBSD$
*/
#ifndef _SYS_SYSLIMITS_H_
#define _SYS_SYSLIMITS_H_
#if !defined(_KERNEL) && !defined(_LIMITS_H_) && !defined(_SYS_PARAM_H_)
#ifndef _SYS_CDEFS_H_
#error this file needs sys/cdefs.h as a prerequisite
#endif
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/syslimits.h" 3 4
#ifdef __CC_SUPPORTS_WARNING
#warning "No user-serviceable parts inside."
#endif
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/syslimits.h" 3 4
#endif
# 44 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/syslimits.h" 3 4
/*
* Do not add any new variables here. (See the comment at the end of
* the file for why.)
*/
#define ARG_MAX 262144 /* max bytes for an exec function */
#ifndef CHILD_MAX
#define CHILD_MAX 40 /* max simultaneous processes */
#endif
# 53 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/syslimits.h" 3 4
#define LINK_MAX 32767 /* max file link count */
#define MAX_CANON 255 /* max bytes in term canon input line */
#define MAX_INPUT 255 /* max bytes in terminal input */
#define NAME_MAX 255 /* max bytes in a file name */
#ifndef NGROUPS_MAX
#define NGROUPS_MAX 1023 /* max supplemental group id's */
#endif
# 60 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/syslimits.h" 3 4
#ifndef OPEN_MAX
#define OPEN_MAX 64 /* max open files per process */
#endif
# 63 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/syslimits.h" 3 4
#define PATH_MAX 1024 /* max bytes in pathname */
#define PIPE_BUF 512 /* max bytes for atomic pipe writes */
#define IOV_MAX 1024 /* max elements in i/o vector */
/*
* We leave the following values undefined to force applications to either
* assume conservative values or call sysconf() to get the current value.
*
* HOST_NAME_MAX
*
* (We should do this for most of the values currently defined here,
* but many programs are not prepared to deal with this yet.)
*/
#endif
# 77 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/syslimits.h" 3 4
# 100 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 2 3 4
#define MAXCOMLEN 19 /* max command name remembered */
#define MAXINTERP PATH_MAX /* max interpreter file name length */
#define MAXLOGNAME 33 /* max login name length (incl. NUL) */
#define MAXUPRC CHILD_MAX /* max simultaneous processes */
#define NCARGS ARG_MAX /* max bytes for an exec function */
#define NGROUPS (NGROUPS_MAX+1) /* max number groups */
#define NOFILE OPEN_MAX /* max open files per process */
#define NOGROUP 65535 /* marker for empty group set member */
#define MAXHOSTNAMELEN 256 /* max hostname size */
#define SPECNAMELEN 63 /* max length of devicename */
/* More types and definitions used throughout the kernel. */
#ifdef _KERNEL
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 114 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
# 115 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/errno.h>
#endif /* expanded by -frewrite-includes */
# 115 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
# 116 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef LOCORE
#if 0 /* expanded by -frewrite-includes */
#include <sys/time.h>
#endif /* expanded by -frewrite-includes */
# 117 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
# 118 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/priority.h>
#endif /* expanded by -frewrite-includes */
# 118 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
# 119 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#endif
# 120 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef FALSE
#define FALSE 0
#endif
# 124 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef TRUE
#define TRUE 1
#endif
# 127 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#endif
# 128 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef _KERNEL
/* Signals. */
#if 0 /* expanded by -frewrite-includes */
#include <sys/signal.h>
#endif /* expanded by -frewrite-includes */
# 131 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 1 3 4
/*-
* 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.
* 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.
*
* @(#)signal.h 8.4 (Berkeley) 5/4/95
* $FreeBSD$
*/
#ifndef _SYS_SIGNAL_H_
#define _SYS_SIGNAL_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_sigset.h>
#endif /* expanded by -frewrite-includes */
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
# 44 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <machine/_limits.h> /* __MINSIGSTKSZ */
#endif /* expanded by -frewrite-includes */
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_limits.h" 1 3 4
/*-
* 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.
* 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.
*
* @(#)limits.h 8.3 (Berkeley) 1/4/94
* from: src/sys/i386/include/_limits.h,v 1.27 2005/01/06 22:18:15 imp
* $FreeBSD$
*/
#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 __mips_n64
#define __ULONG_MAX 0xffffffffffffffff
#define __LONG_MAX 0x7fffffffffffffff
#define __LONG_MIN (-0x7fffffffffffffff - 1)
#define __LONG_BIT 64
#else
# 67 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_limits.h" 3 4
#define __ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
#define __LONG_MAX 0x7fffffffL /* max value for a long */
#define __LONG_MIN (-0x7fffffffL - 1) /* min value for a long */
#define __LONG_BIT 32
#endif
# 72 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_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 */
#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 __LLONG_MAX /* max value for an off_t */
#define __OFF_MIN __LLONG_MIN /* min value for an off_t */
/* Quads and long longs are the same size. Ensure they stay in sync. */
#define __UQUAD_MAX __ULLONG_MAX /* max value for a uquad_t */
#define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */
#define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */
#define __WORD_BIT 32
#define __MINSIGSTKSZ (512 * 4)
#endif /* !_MACHINE__LIMITS_H_ */
# 95 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_limits.h" 3 4
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <machine/signal.h> /* sig_atomic_t; trap codes; sigcontext */
#endif /* expanded by -frewrite-includes */
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/signal.h" 1 3 4
/* $OpenBSD: signal.h,v 1.2 1999/01/27 04:10:03 imp Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Ralph Campbell.
*
* 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.
* 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.
*
* @(#)signal.h 8.1 (Berkeley) 6/10/93
* JNPR: signal.h,v 1.4 2007/01/08 04:58:37 katta
* $FreeBSD$
*/
#ifndef _MACHINE_SIGNAL_H_
#define _MACHINE_SIGNAL_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/signal.h" 3 4
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/signal.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_sigset.h>
#endif /* expanded by -frewrite-includes */
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/signal.h" 3 4
# 44 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/signal.h" 3 4
/*
* Machine-dependent signal definitions
*/
typedef int sig_atomic_t;
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
/*
* 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.
*/
struct sigcontext {
/*
* The fields following 'sc_mask' must match the definition
* of struct __mcontext. That way we can support
* struct sigcontext and ucontext_t at the same
* time.
*/
__sigset_t sc_mask; /* signal mask to restore */
int sc_onstack; /* sigstack state to restore */
__register_t sc_pc; /* pc at time of signal */
__register_t sc_regs[32]; /* processor regs 0 to 31 */
__register_t sr; /* status register */
__register_t mullo, mulhi; /* mullo and mulhi registers... */
int sc_fpused; /* fp has been used */
f_register_t sc_fpregs[33]; /* fp regs 0 to 31 and csr */
__register_t sc_fpc_eir; /* fp exception instruction reg */
void *sc_tls; /* pointer to TLS area */
__register_t cause; /* cause register */
/*
* Optional externally referenced storage for coprocessors. Modeled
* on the approach taken for extended FPU state on x86, which leaves
* some ABI concerns but appears to work in practice.
*/
__register_t sc_cp2state; /* Pointer to external state. */
__register_t sc_cp2state_len;/* Length of external state. */
/*
* XXXRW: Unfortunately, reserved space in the MIPS sigcontext was
* made an 'int' rather than '__register_t', so embedding new pointers
* changes the 32-bit vs. 64-bit versions of this structure
* differently.
*/
#if (defined(__mips_n32) || defined(__mips_n64))
int __spare__[2]; /* XXX reserved */
#else
# 96 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/signal.h" 3 4
int __spare__[5]; /* XXX reserved */
#endif
# 98 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/signal.h" 3 4
};
#endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */
# 101 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/signal.h" 3 4
#endif /* !_MACHINE_SIGNAL_H_ */
# 103 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/signal.h" 3 4
# 47 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 2 3 4
#if __POSIX_VISIBLE >= 200809
#if 0 /* expanded by -frewrite-includes */
#include <sys/_pthreadtypes.h>
#endif /* expanded by -frewrite-includes */
# 50 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
# 51 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_timespec.h>
#endif /* expanded by -frewrite-includes */
# 51 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
# 52 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#ifndef _SIZE_T_DECLARED
typedef __size_t size_t;
#define _SIZE_T_DECLARED
#endif
# 57 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#ifndef _UID_T_DECLARED
typedef __uid_t uid_t;
#define _UID_T_DECLARED
#endif
# 62 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#endif /* __POSIX_VISIBLE >= 200809 */
# 64 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
/*
* System defined signals.
*/
#if __POSIX_VISIBLE || __XSI_VISIBLE
#define SIGHUP 1 /* hangup */
#endif
# 71 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#define SIGINT 2 /* interrupt */
#if __POSIX_VISIBLE || __XSI_VISIBLE
#define SIGQUIT 3 /* quit */
#endif
# 75 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#define SIGILL 4 /* illegal instr. (not reset when caught) */
#if __XSI_VISIBLE
#define SIGTRAP 5 /* trace trap (not reset when caught) */
#endif
# 79 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#define SIGABRT 6 /* abort() */
#if __BSD_VISIBLE
#define SIGIOT SIGABRT /* compatibility */
#define SIGEMT 7 /* EMT instruction */
#endif
# 84 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#define SIGFPE 8 /* floating point exception */
#if __POSIX_VISIBLE || __XSI_VISIBLE
#define SIGKILL 9 /* kill (cannot be caught or ignored) */
#endif
# 88 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
#define SIGBUS 10 /* bus error */
#endif
# 91 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#define SIGSEGV 11 /* segmentation violation */
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
#define SIGSYS 12 /* non-existent system call invoked */
#endif
# 95 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __POSIX_VISIBLE || __XSI_VISIBLE
#define SIGPIPE 13 /* write on a pipe with no one to read it */
#define SIGALRM 14 /* alarm clock */
#endif
# 99 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#define SIGTERM 15 /* software termination signal from kill */
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
#define SIGURG 16 /* urgent condition on IO channel */
#endif
# 103 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __POSIX_VISIBLE || __XSI_VISIBLE
#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&LTOSTOP) */
#endif
# 111 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __BSD_VISIBLE
#define SIGIO 23 /* input/output possible signal */
#endif
# 114 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __XSI_VISIBLE
#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
# 120 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __BSD_VISIBLE
#define SIGWINCH 28 /* window size changes */
#define SIGINFO 29 /* information request */
#endif
# 124 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __POSIX_VISIBLE || __XSI_VISIBLE
#define SIGUSR1 30 /* user defined signal 1 */
#define SIGUSR2 31 /* user defined signal 2 */
#endif
# 128 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __BSD_VISIBLE
#define SIGTHR 32 /* reserved by thread library. */
#define SIGLWP SIGTHR
#define SIGLIBRT 33 /* reserved by real-time library. */
#define SIGPROT 34 /* in-address space security exception. */
#endif
# 134 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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 __POSIX_VISIBLE || __XSI_VISIBLE
#ifndef _SIGSET_T_DECLARED
#define _SIGSET_T_DECLARED
typedef __sigset_t sigset_t;
#endif
# 167 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#endif
# 168 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE >= 500
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;
};
#endif
# 179 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __POSIX_VISIBLE >= 199309
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 __BSD_VISIBLE
#define sigev_notify_kqueue sigev_signo
#define sigev_notify_kevent_flags _sigev_un._kevent_flags
#define sigev_notify_thread_id _sigev_un._threadid
#endif
# 204 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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 __BSD_VISIBLE
#define SIGEV_KEVENT 3 /* Generate a kevent. */
#define SIGEV_THREAD_ID 4 /* Send signal to a kernel thread. */
#endif
# 214 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#endif /* __POSIX_VISIBLE >= 199309 */
# 216 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE
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 {
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
/** 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. */
/* codes for SIGSEGV */
#define SEGV_MAPERR 1 /* Address not mapped to object. */
#define SEGV_ACCERR 2 /* Invalid permissions for mapped */
/* object. */
/* 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. */
/* 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
# 316 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __POSIX_VISIBLE || __XSI_VISIBLE
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
# 334 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __XSI_VISIBLE
/* If SA_SIGINFO is set, sa_sigaction must be used instead of sa_handler. */
#define sa_sigaction __sigaction_u.__sa_sigaction
#endif
# 339 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __POSIX_VISIBLE || __XSI_VISIBLE
#define SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */
#endif /* __POSIX_VISIBLE || __XSI_VISIBLE */
# 343 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __XSI_VISIBLE
#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
# 352 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __BSD_VISIBLE
#define NSIG 35 /* number of old signals (counting 0) */
#endif
# 356 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __POSIX_VISIBLE || __XSI_VISIBLE
#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
# 370 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __BSD_VISIBLE
#define SI_UNDEFINED 0
#endif
# 373 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __BSD_VISIBLE
typedef __sighandler_t *sig_t; /* type of pointer to a signal function */
typedef void __siginfohandler_t(int, struct __siginfo *, void *);
#endif
# 378 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __XSI_VISIBLE
#if __BSD_VISIBLE
#define __stack_t sigaltstack
#endif
# 383 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.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
# 390 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.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 */
};
#if __BSD_VISIBLE
/*
* 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
# 421 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
/* Keep this in one place only */
#if defined(_KERNEL) && defined(COMPAT_43) && \
!defined(__i386__)
struct osigcontext {
int _not_used;
};
#endif
# 429 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __XSI_VISIBLE
/*
* Structure used in sigstack call.
*/
struct sigstack {
void *ss_sp; /* signal stack pointer */
int ss_onstack; /* current status */
};
#endif
# 439 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __BSD_VISIBLE || __POSIX_VISIBLE > 0 && __POSIX_VISIBLE <= 200112
/*
* Macro for converting signal number to a mask suitable for
* sigblock().
*/
#define sigmask(m) (1 << ((m)-1))
#endif
# 447 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __BSD_VISIBLE
#define BADSIG SIG_ERR
#endif
# 451 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
#if __POSIX_VISIBLE || __XSI_VISIBLE
/*
* 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
# 460 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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_ */
# 470 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/signal.h" 3 4
# 132 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 2 3 4
#endif
# 133 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
/* Machine type dependent parameters. */
#if 0 /* expanded by -frewrite-includes */
#include <machine/param.h>
#endif /* expanded by -frewrite-includes */
# 135 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 1 3 4
/* $OpenBSD: param.h,v 1.11 1998/08/30 22:05:35 millert Exp $ */
/*-
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* the Systems Programming Group of the University of Utah Computer
* Science Department and Ralph Campbell.
*
* 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.
* 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.
*
* from: Utah Hdr: machparam.h 1.11 89/08/14
* from: @(#)param.h 8.1 (Berkeley) 6/10/93
* JNPR: param.h,v 1.6.2.1 2007/09/10 07:49:36 girish
* $FreeBSD$
*/
#ifndef _MIPS_INCLUDE_PARAM_H_
#define _MIPS_INCLUDE_PARAM_H_
#if 0 /* expanded by -frewrite-includes */
#include <machine/_align.h>
#endif /* expanded by -frewrite-includes */
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_align.h" 1 3 4
/* $OpenBSD: param.h,v 1.11 1998/08/30 22:05:35 millert Exp $ */
/*-
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* the Systems Programming Group of the University of Utah Computer
* Science Department and Ralph Campbell.
*
* 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.
* 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.
*
* from: Utah Hdr: machparam.h 1.11 89/08/14
* from: @(#)param.h 8.1 (Berkeley) 6/10/93
* JNPR: param.h,v 1.6.2.1 2007/09/10 07:49:36 girish
* $FreeBSD$
*/
#ifndef _MIPS_INCLUDE__ALIGN_H_
#define _MIPS_INCLUDE__ALIGN_H_
/*
* Round p (pointer or byte index) up to a correctly-aligned value for all
* data types (int, long, ...). The result is u_long and must be cast to
* any desired pointer type.
*
* XXXCHERI: Changed '7' to 'sizeof(void *) - 1', but likely we also need
* to change (u_long) below to (uintptr_t)?
*/
#define _ALIGNBYTES (sizeof(void *) - 1)
#define _ALIGN(p) (((uintptr_t)(p) + _ALIGNBYTES) &~ (uintptr_t)_ALIGNBYTES)
#endif /* !_MIPS_INCLUDE__ALIGN_H_ */
# 57 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_align.h" 3 4
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 47 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
# 48 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#ifdef _KERNEL
#ifndef _LOCORE
#if 0 /* expanded by -frewrite-includes */
#include <machine/cpu.h>
#endif /* expanded by -frewrite-includes */
# 50 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
# 51 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#endif
# 52 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#endif
# 53 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#define __PCI_REROUTE_INTERRUPT
#if _BYTE_ORDER == _BIG_ENDIAN
# define _EL_SUFFIX ""
#else
# 59 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
# define _EL_SUFFIX "el"
#endif
# 61 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#ifdef __mips_n64
# define _N64_SUFFIX "64"
#elif defined(__mips_n32)
# 65 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
# define _N64_SUFFIX "n32"
#else
# 67 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
# define _N64_SUFFIX ""
#endif
# 69 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#ifdef __mips_hard_float
# define _HF_SUFFIX "hf"
#else
# 73 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
# define _HF_SUFFIX ""
#endif
# 75 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#ifndef MACHINE
# define MACHINE "mips"
#endif
# 79 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#ifndef MACHINE_ARCH
# define MACHINE_ARCH "mips" _N64_SUFFIX _EL_SUFFIX _HF_SUFFIX
#endif
# 82 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#ifdef __mips_n64
# ifndef MACHINE_ARCH32
# define MACHINE_ARCH32 "mips" _EL_SUFFIX _HF_SUFFIX
# endif
# 86 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#endif
# 87 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
/*
* OBJFORMAT_NAMES is a comma-separated list of the object formats
* that are supported on the architecture.
*/
#define OBJFORMAT_NAMES "elf"
#define OBJFORMAT_DEFAULT "elf"
#define MID_MACHINE 0 /* None but has to be defined */
#ifdef SMP
#define MAXSMPCPU 32
#ifndef MAXCPU
#define MAXCPU MAXSMPCPU
#endif
# 102 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#else
# 103 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#define MAXSMPCPU 1
#define MAXCPU 1
#endif
# 106 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#ifndef MAXMEMDOM
#define MAXMEMDOM 1
#endif
# 110 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
/*
* Round p (pointer or byte index) up to a correctly-aligned value for all
* data types (int, long, ...). The result is u_int and must be cast to
* any desired pointer type.
*/
#define ALIGNBYTES _ALIGNBYTES
#define ALIGN(p) _ALIGN(p)
/*
* ALIGNED_POINTER is a boolean macro that checks whether an address
* is valid to fetch data elements of type t from on this architecture.
* This does not reflect the optimal alignment, just the possibility
* (within reasonable limits).
*/
#define ALIGNED_POINTER(p, t) ((((unsigned long)(p)) & (sizeof (t) - 1)) == 0)
/*
* CACHE_LINE_SIZE is the compile-time maximum cache line size for an
* architecture. It should be used with appropriate caution.
*/
#define CACHE_LINE_SHIFT 6
#define CACHE_LINE_SIZE (1 << CACHE_LINE_SHIFT)
#define PAGE_SHIFT 12 /* LOG2(PAGE_SIZE) */
#define PAGE_SIZE (1<<PAGE_SHIFT) /* bytes/page */
#define PAGE_MASK (PAGE_SIZE-1)
#define NPTEPG (PAGE_SIZE/(sizeof (pt_entry_t)))
#define NPDEPG (PAGE_SIZE/(sizeof (pd_entry_t)))
#if defined(__mips_n32) || defined(__mips_n64) /* PHYSADDR_64_BIT */
#define NPTEPGSHIFT 9 /* LOG2(NPTEPG) */
#else
# 144 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#define NPTEPGSHIFT 10 /* LOG2(NPTEPG) */
#endif
# 146 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#ifdef __mips_n64
#define NPDEPGSHIFT 9 /* LOG2(NPTEPG) */
#define SEGSHIFT (PAGE_SHIFT + NPTEPGSHIFT + NPDEPGSHIFT)
#define NBSEG (1ul << SEGSHIFT)
#define PDRSHIFT (PAGE_SHIFT + NPTEPGSHIFT)
#define PDRSIZE (1ul << PDRSHIFT)
#define PDRMASK ((1 << PDRSHIFT) - 1)
#else
# 155 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#define NPDEPGSHIFT 10 /* LOG2(NPTEPG) */
#define SEGSHIFT (PAGE_SHIFT + NPTEPGSHIFT)
#define NBSEG (1 << SEGSHIFT) /* bytes/segment */
#define PDRSHIFT SEGSHIFT /* alias for SEG in 32 bit */
#define PDRSIZE (1ul << PDRSHIFT)
#define PDRMASK ((1 << PDRSHIFT) - 1)
#endif
# 162 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#define NBPDR (1 << PDRSHIFT) /* bytes/pagedir */
#define SEGMASK (NBSEG - 1) /* byte offset into segment */
#define MAXPAGESIZES 1 /* max supported pagesizes */
#define MAXDUMPPGS 1 /* xxx: why is this only one? */
#ifdef KSTACK_LARGE_PAGE
/*
* For a large kernel stack page the KSTACK_SIZE needs to be a page size
* supported by the hardware (e.g. 16K).
*/
#define KSTACK_SIZE (1 << 14) /* Single 16K page */
#define KSTACK_PAGE_SIZE KSTACK_SIZE
#define KSTACK_PAGE_MASK (KSTACK_PAGE_SIZE - 1)
#define KSTACK_PAGES (KSTACK_SIZE / PAGE_SIZE)
#define KSTACK_TLBMASK_MASK ((KSTACK_PAGE_MASK >> (TLBMASK_SHIFT - 1)) \
<< TLBMASK_SHIFT)
#define KSTACK_GUARD_PAGES (KSTACK_PAGE_SIZE / PAGE_SIZE)
#else /* ! KSTACK_LARGE_PAGE */
# 183 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
/*
* The kernel stack needs to be aligned on a (PAGE_SIZE * 2) boundary.
*/
#define KSTACK_PAGES 2 /* kernel stack */
#define KSTACK_SIZE (KSTACK_PAGES * PAGE_SIZE)
#define KSTACK_PAGE_SIZE PAGE_SIZE
#define KSTACK_PAGE_MASK (PAGE_SIZE - 1)
#define KSTACK_GUARD_PAGES 2 /* pages of kstack guard; 0 disables */
#endif /* ! KSTACK_LARGE_PAGE */
# 193 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
/*
* CHERI specific define required by SysV shared memory. Depends
* on physically addressable memory.
*/
#ifdef __mips_n64
/* 1MB allows all sizes for 40-bit address spaces with ISA v5 128-bit caps. */
/* XXX-BD: only increase for compressed capabilities? */
#define CHERI_SHMLBA (1 << 20)
#endif
# 203 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
/*
* Mach derived conversion macros
*/
#define round_page(x) (((x) + PAGE_MASK) & ~PAGE_MASK)
#define trunc_page(x) ((x) & ~PAGE_MASK)
#define round_2mpage(x) (((x) + PDRMASK) & ~PDRMASK)
#define trunc_2mpage(x) ((x) & ~PDRMASK)
#define atop(x) ((x) >> PAGE_SHIFT)
#define ptoa(x) ((x) << PAGE_SHIFT)
#define pgtok(x) ((x) * (PAGE_SIZE / 1024))
#ifdef _KERNEL
#define NO_FUEWORD 1
#endif
# 220 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
#endif /* !_MIPS_INCLUDE_PARAM_H_ */
# 222 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/param.h" 3 4
# 136 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 2 3 4
#ifndef _KERNEL
#if 0 /* expanded by -frewrite-includes */
#include <sys/limits.h>
#endif /* expanded by -frewrite-includes */
# 137 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 1 3 4
/*-
* 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.
* 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.
*
* $FreeBSD$
*/
#ifndef _SYS_LIMITS_H_
#define _SYS_LIMITS_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 35 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <machine/_limits.h>
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
#define CHAR_BIT __CHAR_BIT /* number of bits in a char */
#define SCHAR_MAX __SCHAR_MAX /* max value for a signed char */
#define SCHAR_MIN __SCHAR_MIN /* min value for a signed char */
#define UCHAR_MAX __UCHAR_MAX /* max value for an unsigned char */
#ifdef __CHAR_UNSIGNED__
#define CHAR_MAX UCHAR_MAX /* max value for a char */
#define CHAR_MIN 0 /* min value for a char */
#else
# 49 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
#define CHAR_MAX SCHAR_MAX
#define CHAR_MIN SCHAR_MIN
#endif
# 52 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
#define USHRT_MAX __USHRT_MAX /* max value for an unsigned short */
#define SHRT_MAX __SHRT_MAX /* max value for a short */
#define SHRT_MIN __SHRT_MIN /* min value for a short */
#define UINT_MAX __UINT_MAX /* max value for an unsigned int */
#define INT_MAX __INT_MAX /* max value for an int */
#define INT_MIN __INT_MIN /* min value for an int */
#define ULONG_MAX __ULONG_MAX /* max for an unsigned long */
#define LONG_MAX __LONG_MAX /* max for a long */
#define LONG_MIN __LONG_MIN /* min for a long */
#ifdef __LONG_LONG_SUPPORTED
#define ULLONG_MAX __ULLONG_MAX /* max for an unsigned long long */
#define LLONG_MAX __LLONG_MAX /* max for a long long */
#define LLONG_MIN __LLONG_MIN /* min for a long long */
#endif
# 70 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
#if __POSIX_VISIBLE || __XSI_VISIBLE
#define SSIZE_MAX __SSIZE_MAX /* max value for an ssize_t */
#endif
# 74 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
#define SIZE_T_MAX __SIZE_T_MAX /* max value for a size_t */
#define OFF_MAX __OFF_MAX /* max value for an off_t */
#define OFF_MIN __OFF_MIN /* min value for an off_t */
#endif
# 81 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
#if __BSD_VISIBLE
#define GID_MAX UINT_MAX /* max value for a gid_t */
#define UID_MAX UINT_MAX /* max value for a uid_t */
#define UQUAD_MAX (__UQUAD_MAX) /* max value for a uquad_t */
#define QUAD_MAX (__QUAD_MAX) /* max value for a quad_t */
#define QUAD_MIN (__QUAD_MIN) /* min value for a quad_t */
#endif
# 90 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
#define LONG_BIT __LONG_BIT
#define WORD_BIT __WORD_BIT
#endif
# 95 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
#if __POSIX_VISIBLE
#define MQ_PRIO_MAX 64
#endif
# 99 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
#endif /* !_SYS_LIMITS_H_ */
# 101 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/limits.h" 3 4
# 138 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 2 3 4
#endif
# 139 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef DEV_BSHIFT
#define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
#endif
# 143 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#define DEV_BSIZE (1<<DEV_BSHIFT)
#ifndef BLKDEV_IOSIZE
#define BLKDEV_IOSIZE PAGE_SIZE /* default block device I/O size */
#endif
# 148 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef DFLTPHYS
#define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */
#endif
# 151 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef MAXPHYS
#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */
#endif
# 154 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef MAXDUMPPGS
#define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE)
#endif
# 157 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
/*
* Constants related to network buffer management.
* MCLBYTES must be no larger than PAGE_SIZE.
*/
#ifndef MSIZE
#define MSIZE 256 /* size of an mbuf */
#endif
# 165 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef MCLSHIFT
#define MCLSHIFT 11 /* convert bytes to mbuf clusters */
#endif /* MCLSHIFT */
# 169 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */
#if PAGE_SIZE < 2048
#define MJUMPAGESIZE MCLBYTES
#elif PAGE_SIZE <= 8192
# 175 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#define MJUMPAGESIZE PAGE_SIZE
#else
# 177 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#define MJUMPAGESIZE (8 * 1024)
#endif
# 179 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#define MJUM9BYTES (9 * 1024) /* jumbo cluster 9k */
#define MJUM16BYTES (16 * 1024) /* jumbo cluster 16k */
/*
* Some macros for units conversion
*/
/* clicks to bytes */
#ifndef ctob
#define ctob(x) ((x)<<PAGE_SHIFT)
#endif
# 191 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
/* bytes to clicks */
#ifndef btoc
#define btoc(x) (((vm_offset_t)(x)+PAGE_MASK)>>PAGE_SHIFT)
#endif
# 196 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
/*
* btodb() is messy and perhaps slow because `bytes' may be an off_t. We
* want to shift an unsigned type to avoid sign extension and we don't
* want to widen `bytes' unnecessarily. Assume that the result fits in
* a daddr_t.
*/
#ifndef btodb
#define btodb(bytes) /* calculates (bytes / DEV_BSIZE) */ \
(sizeof (bytes) > sizeof(long) \
? (daddr_t)((unsigned long long)(bytes) >> DEV_BSHIFT) \
: (daddr_t)((unsigned long)(bytes) >> DEV_BSHIFT))
#endif
# 209 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef dbtob
#define dbtob(db) /* calculates (db * DEV_BSIZE) */ \
((off_t)(db) << DEV_BSHIFT)
#endif
# 214 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#define PRIMASK 0x0ff
#define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */
#define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */
#define NZERO 0 /* default "nice" */
#define NBBY 8 /* number of bits in a byte */
#define NBPW sizeof(int) /* number of bytes per word (integer) */
#define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */
#define NODEV (dev_t)(-1) /* non-existent device */
/*
* File system parameters and macros.
*
* MAXBSIZE - Filesystems are made out of blocks of at most MAXBSIZE bytes
* per block. MAXBSIZE may be made larger without effecting
* any existing filesystems as long as it does not exceed MAXPHYS,
* and may be made smaller at the risk of not being able to use
* filesystems which require a block size exceeding MAXBSIZE.
*
* MAXBCACHEBUF - Maximum size of a buffer in the buffer cache. This must
* be >= MAXBSIZE and can be set differently for different
* architectures by defining it in <machine/param.h>.
* Making this larger allows NFS to do larger reads/writes.
*
* BKVASIZE - Nominal buffer space per buffer, in bytes. BKVASIZE is the
* minimum KVM memory reservation the kernel is willing to make.
* Filesystems can of course request smaller chunks. Actual
* backing memory uses a chunk size of a page (PAGE_SIZE).
* The default value here can be overridden on a per-architecture
* basis by defining it in <machine/param.h>. This should
* probably be done to increase its value, when MAXBCACHEBUF is
* defined as a larger value in <machine/param.h>.
*
* If you make BKVASIZE too small you risk seriously fragmenting
* the buffer KVM map which may slow things down a bit. If you
* make it too big the kernel will not be able to optimally use
* the KVM memory reserved for the buffer cache and will wind
* up with too-few buffers.
*
* The default is 16384, roughly 2x the block size used by a
* normal UFS filesystem.
*/
#define MAXBSIZE 65536 /* must be power of 2 */
#ifndef MAXBCACHEBUF
#define MAXBCACHEBUF MAXBSIZE /* must be a power of 2 >= MAXBSIZE */
#endif
# 264 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef BKVASIZE
#define BKVASIZE 16384 /* must be power of 2 */
#endif
# 267 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#define BKVAMASK (BKVASIZE-1)
/*
* MAXPATHLEN defines the longest permissible path length after expanding
* symbolic links. It is used to allocate a temporary buffer from the buffer
* pool in which to do the name expansion, hence should be a power of two,
* and must be less than or equal to MAXBSIZE. MAXSYMLINKS defines the
* maximum number of symbolic links that may be expanded in a path name.
* It should be set high enough to allow all legitimate uses, but halt
* infinite loops reasonably quickly.
*/
#define MAXPATHLEN PATH_MAX
#define MAXSYMLINKS 32
/* Bit map related macros. */
#define setbit(a,i) (((unsigned char *)(a))[(i)/NBBY] |= 1<<((i)%NBBY))
#define clrbit(a,i) (((unsigned char *)(a))[(i)/NBBY] &= ~(1<<((i)%NBBY)))
#define isset(a,i) \
(((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY)))
#define isclr(a,i) \
((((const unsigned char *)(a))[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
/* Macros for counting and rounding. */
#ifndef howmany
#define howmany(x, y) (((x)+((y)-1))/(y))
#endif
# 293 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#define nitems(x) (sizeof((x)) / sizeof((x)[0]))
#define rounddown(x, y) (((x)/(y))*(y))
#define rounddown2(x, y) ((x)&(~((y)-1))) /* if y is power of two */
#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) /* to any y */
#define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */
#define powerof2(x) ((((x)-1)&(x))==0)
/* Macros for min/max. */
#define MIN(a,b) (((a)<(b))?(a):(b))
#define MAX(a,b) (((a)>(b))?(a):(b))
#ifdef _KERNEL
/*
* Basic byte order function prototypes for non-inline functions.
*/
#ifndef LOCORE
#ifndef _BYTEORDER_PROTOTYPED
#define _BYTEORDER_PROTOTYPED
__BEGIN_DECLS
__uint32_t htonl(__uint32_t);
__uint16_t htons(__uint16_t);
__uint32_t ntohl(__uint32_t);
__uint16_t ntohs(__uint16_t);
__END_DECLS
#endif
# 318 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#endif
# 319 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#ifndef lint
#ifndef _BYTEORDER_FUNC_DEFINED
#define _BYTEORDER_FUNC_DEFINED
#define htonl(x) __htonl(x)
#define htons(x) __htons(x)
#define ntohl(x) __ntohl(x)
#define ntohs(x) __ntohs(x)
#endif /* !_BYTEORDER_FUNC_DEFINED */
# 328 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#endif /* lint */
# 329 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
#endif /* _KERNEL */
# 330 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
/*
* Scale factor for scaled integers used to count %cpu time and load avgs.
*
* The number of CPU `tick's that map to a unique `%age' can be expressed
* by the formula (1 / (2 ^ (FSHIFT - 11))). The maximum load average that
* can be calculated (assuming 32 bits) can be closely approximated using
* the formula (2 ^ (2 * (16 - FSHIFT))) for (FSHIFT < 15).
*
* For the scheduler to maintain a 1:1 mapping of CPU `tick' to `%age',
* FSHIFT must be at least 11; this gives us a maximum load avg of ~1024.
*/
#define FSHIFT 11 /* bits to right of fixed binary point */
#define FSCALE (1<<FSHIFT)
#define dbtoc(db) /* calculates devblks to pages */ \
((db + (ctodb(1) - 1)) >> (PAGE_SHIFT - DEV_BSHIFT))
#define ctodb(db) /* calculates pages to devblks */ \
((db) << (PAGE_SHIFT - DEV_BSHIFT))
/*
* Old spelling of __containerof().
*/
#define member2struct(s, m, x) \
((struct s *)(void *)((char *)(x) - offsetof(struct s, m)))
/*
* Access a variable length array that has been declared as a fixed
* length array.
*/
#define __PAST_END(array, offset) (((__typeof__(*(array)) *)(array))[offset])
#endif /* _SYS_PARAM_H_ */
# 364 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/param.h" 3 4
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/queue.h>
#endif /* expanded by -frewrite-includes */
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 1 3 4
/*-
* Copyright (c) 1991, 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.
* 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.
*
* @(#)queue.h 8.5 (Berkeley) 8/20/94
* $FreeBSD$
*/
#ifndef _SYS_QUEUE_H_
#define _SYS_QUEUE_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
/*
* This file defines four types of data structures: singly-linked lists,
* singly-linked tail queues, lists and tail queues.
*
* A singly-linked list is headed by a single forward pointer. The elements
* are singly linked for minimum space and pointer manipulation overhead at
* the expense of O(n) removal for arbitrary elements. New elements can be
* added to the list after an existing element or at the head of the list.
* Elements being removed from the head of the list should use the explicit
* macro for this purpose for optimum efficiency. A singly-linked list may
* only be traversed in the forward direction. Singly-linked lists are ideal
* for applications with large datasets and few or no removals or for
* implementing a LIFO queue.
*
* A singly-linked tail queue is headed by a pair of pointers, one to the
* head of the list and the other to the tail of the list. The elements are
* singly linked for minimum space and pointer manipulation overhead at the
* expense of O(n) removal for arbitrary elements. New elements can be added
* to the list after an existing element, at the head of the list, or at the
* end of the list. Elements being removed from the head of the tail queue
* should use the explicit macro for this purpose for optimum efficiency.
* A singly-linked tail queue may only be traversed in the forward direction.
* Singly-linked tail queues are ideal for applications with large datasets
* and few or no removals or for implementing a FIFO queue.
*
* A list is headed by a single forward pointer (or an array of forward
* pointers for a hash table header). The elements are doubly linked
* so that an arbitrary element can be removed without a need to
* traverse the list. New elements can be added to the list before
* or after an existing element or at the head of the list. A list
* may be traversed in either direction.
*
* A tail queue is headed by a pair of pointers, one to the head of the
* list and the other to the tail of the list. The elements are doubly
* linked so that an arbitrary element can be removed without a need to
* traverse the list. New elements can be added to the list before or
* after an existing element, at the head of the list, or at the end of
* the list. A tail queue may be traversed in either direction.
*
* For details on the use of these macros, see the queue(3) manual page.
*
* Below is a summary of implemented functions where:
* + means the macro is available
* - means the macro is not available
* s means the macro is available but is slow (runs in O(n) time)
*
* SLIST LIST STAILQ TAILQ
* _HEAD + + + +
* _CLASS_HEAD + + + +
* _HEAD_INITIALIZER + + + +
* _ENTRY + + + +
* _CLASS_ENTRY + + + +
* _INIT + + + +
* _EMPTY + + + +
* _FIRST + + + +
* _NEXT + + + +
* _PREV - + - +
* _LAST - - + +
* _FOREACH + + + +
* _FOREACH_FROM + + + +
* _FOREACH_SAFE + + + +
* _FOREACH_FROM_SAFE + + + +
* _FOREACH_REVERSE - - - +
* _FOREACH_REVERSE_FROM - - - +
* _FOREACH_REVERSE_SAFE - - - +
* _FOREACH_REVERSE_FROM_SAFE - - - +
* _INSERT_HEAD + + + +
* _INSERT_BEFORE - + - +
* _INSERT_AFTER + + + +
* _INSERT_TAIL - - + +
* _CONCAT s s + +
* _REMOVE_AFTER + - + -
* _REMOVE_HEAD + - + -
* _REMOVE s + s +
* _SWAP + + + +
*
*/
#ifdef QUEUE_MACRO_DEBUG
#warn Use QUEUE_MACRO_DEBUG_TRACE and/or QUEUE_MACRO_DEBUG_TRASH
#define QUEUE_MACRO_DEBUG_TRACE
#define QUEUE_MACRO_DEBUG_TRASH
#endif
# 120 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#ifdef QUEUE_MACRO_DEBUG_TRACE
/* Store the last 2 places the queue element or head was altered */
struct qm_trace {
unsigned long lastline;
unsigned long prevline;
const char *lastfile;
const char *prevfile;
};
#define TRACEBUF struct qm_trace trace;
#define TRACEBUF_INITIALIZER { __LINE__, 0, __FILE__, NULL } ,
#define QMD_TRACE_HEAD(head) do { \
(head)->trace.prevline = (head)->trace.lastline; \
(head)->trace.prevfile = (head)->trace.lastfile; \
(head)->trace.lastline = __LINE__; \
(head)->trace.lastfile = __FILE__; \
} while (0)
#define QMD_TRACE_ELEM(elem) do { \
(elem)->trace.prevline = (elem)->trace.lastline; \
(elem)->trace.prevfile = (elem)->trace.lastfile; \
(elem)->trace.lastline = __LINE__; \
(elem)->trace.lastfile = __FILE__; \
} while (0)
#else /* !QUEUE_MACRO_DEBUG_TRACE */
# 148 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#define QMD_TRACE_ELEM(elem)
#define QMD_TRACE_HEAD(head)
#define TRACEBUF
#define TRACEBUF_INITIALIZER
#endif /* QUEUE_MACRO_DEBUG_TRACE */
# 153 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#ifdef QUEUE_MACRO_DEBUG_TRASH
#define TRASHIT(x) do {(x) = (void *)-1;} while (0)
#define QMD_IS_TRASHED(x) ((x) == (void *)(intptr_t)-1)
#else /* !QUEUE_MACRO_DEBUG_TRASH */
# 158 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#define TRASHIT(x)
#define QMD_IS_TRASHED(x) 0
#endif /* QUEUE_MACRO_DEBUG_TRASH */
# 161 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#if defined(QUEUE_MACRO_DEBUG_TRACE) || defined(QUEUE_MACRO_DEBUG_TRASH)
#define QMD_SAVELINK(name, link) void **name = (void *)&(link)
#else /* !QUEUE_MACRO_DEBUG_TRACE && !QUEUE_MACRO_DEBUG_TRASH */
# 165 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#define QMD_SAVELINK(name, link)
#endif /* QUEUE_MACRO_DEBUG_TRACE || QUEUE_MACRO_DEBUG_TRASH */
# 167 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#ifdef __cplusplus
/*
* In C++ there can be structure lists and class lists:
*/
#define QUEUE_TYPEOF(type) type
#else
# 174 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#define QUEUE_TYPEOF(type) struct type
#endif
# 176 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
/*
* Singly-linked List declarations.
*/
#define SLIST_HEAD(name, type) \
struct name { \
struct type *slh_first; /* first element */ \
}
#define SLIST_CLASS_HEAD(name, type) \
struct name { \
class type *slh_first; /* first element */ \
}
#define SLIST_HEAD_INITIALIZER(head) \
{ NULL }
#define SLIST_ENTRY(type) \
struct { \
struct type *sle_next; /* next element */ \
}
#define SLIST_CLASS_ENTRY(type) \
struct { \
class type *sle_next; /* next element */ \
}
/*
* Singly-linked List functions.
*/
#if (defined(_KERNEL) && defined(INVARIANTS))
#define QMD_SLIST_CHECK_PREVPTR(prevp, elm) do { \
if (*(prevp) != (elm)) \
panic("Bad prevptr *(%p) == %p != %p", \
(prevp), *(prevp), (elm)); \
} while (0)
#else
# 213 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#define QMD_SLIST_CHECK_PREVPTR(prevp, elm)
#endif
# 215 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#define SLIST_CONCAT(head1, head2, type, field) do { \
QUEUE_TYPEOF(type) *curelm = SLIST_FIRST(head1); \
if (curelm == NULL) { \
if ((SLIST_FIRST(head1) = SLIST_FIRST(head2)) != NULL) \
SLIST_INIT(head2); \
} else if (SLIST_FIRST(head2) != NULL) { \
while (SLIST_NEXT(curelm, field) != NULL) \
curelm = SLIST_NEXT(curelm, field); \
SLIST_NEXT(curelm, field) = SLIST_FIRST(head2); \
SLIST_INIT(head2); \
} \
} while (0)
#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
#define SLIST_FIRST(head) ((head)->slh_first)
#define SLIST_FOREACH(var, head, field) \
for ((var) = SLIST_FIRST((head)); \
(var); \
(var) = SLIST_NEXT((var), field))
#define SLIST_FOREACH_FROM(var, head, field) \
for ((var) = ((var) ? (var) : SLIST_FIRST((head))); \
(var); \
(var) = SLIST_NEXT((var), field))
#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
for ((var) = SLIST_FIRST((head)); \
(var) && ((tvar) = SLIST_NEXT((var), field), 1); \
(var) = (tvar))
#define SLIST_FOREACH_FROM_SAFE(var, head, field, tvar) \
for ((var) = ((var) ? (var) : SLIST_FIRST((head))); \
(var) && ((tvar) = SLIST_NEXT((var), field), 1); \
(var) = (tvar))
#define SLIST_FOREACH_PREVPTR(var, varp, head, field) \
for ((varp) = &SLIST_FIRST((head)); \
((var) = *(varp)) != NULL; \
(varp) = &SLIST_NEXT((var), field))
#define SLIST_INIT(head) do { \
SLIST_FIRST((head)) = NULL; \
} while (0)
#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field); \
SLIST_NEXT((slistelm), field) = (elm); \
} while (0)
#define SLIST_INSERT_HEAD(head, elm, field) do { \
SLIST_NEXT((elm), field) = SLIST_FIRST((head)); \
SLIST_FIRST((head)) = (elm); \
} while (0)
#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
#define SLIST_REMOVE(head, elm, type, field) do { \
QMD_SAVELINK(oldnext, (elm)->field.sle_next); \
if (SLIST_FIRST((head)) == (elm)) { \
SLIST_REMOVE_HEAD((head), field); \
} \
else { \
QUEUE_TYPEOF(type) *curelm = SLIST_FIRST(head); \
while (SLIST_NEXT(curelm, field) != (elm)) \
curelm = SLIST_NEXT(curelm, field); \
SLIST_REMOVE_AFTER(curelm, field); \
} \
TRASHIT(*oldnext); \
} while (0)
#define SLIST_REMOVE_AFTER(elm, field) do { \
SLIST_NEXT(elm, field) = \
SLIST_NEXT(SLIST_NEXT(elm, field), field); \
} while (0)
#define SLIST_REMOVE_HEAD(head, field) do { \
SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \
} while (0)
#define SLIST_REMOVE_PREVPTR(prevp, elm, field) do { \
QMD_SLIST_CHECK_PREVPTR(prevp, elm); \
*(prevp) = SLIST_NEXT(elm, field); \
TRASHIT((elm)->field.sle_next); \
} while (0)
#define SLIST_SWAP(head1, head2, type) do { \
QUEUE_TYPEOF(type) *swap_first = SLIST_FIRST(head1); \
SLIST_FIRST(head1) = SLIST_FIRST(head2); \
SLIST_FIRST(head2) = swap_first; \
} while (0)
/*
* Singly-linked Tail queue declarations.
*/
#define STAILQ_HEAD(name, type) \
struct name { \
struct type *stqh_first;/* first element */ \
struct type **stqh_last;/* addr of last next element */ \
}
#define STAILQ_CLASS_HEAD(name, type) \
struct name { \
class type *stqh_first; /* first element */ \
class type **stqh_last; /* addr of last next element */ \
}
#define STAILQ_HEAD_INITIALIZER(head) \
{ NULL, &(head).stqh_first }
#define STAILQ_ENTRY(type) \
struct { \
struct type *stqe_next; /* next element */ \
}
#define STAILQ_CLASS_ENTRY(type) \
struct { \
class type *stqe_next; /* next element */ \
}
/*
* Singly-linked Tail queue functions.
*/
#define STAILQ_CONCAT(head1, head2) do { \
if (!STAILQ_EMPTY((head2))) { \
*(head1)->stqh_last = (head2)->stqh_first; \
(head1)->stqh_last = (head2)->stqh_last; \
STAILQ_INIT((head2)); \
} \
} while (0)
#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL)
#define STAILQ_FIRST(head) ((head)->stqh_first)
#define STAILQ_FOREACH(var, head, field) \
for((var) = STAILQ_FIRST((head)); \
(var); \
(var) = STAILQ_NEXT((var), field))
#define STAILQ_FOREACH_FROM(var, head, field) \
for ((var) = ((var) ? (var) : STAILQ_FIRST((head))); \
(var); \
(var) = STAILQ_NEXT((var), field))
#define STAILQ_FOREACH_SAFE(var, head, field, tvar) \
for ((var) = STAILQ_FIRST((head)); \
(var) && ((tvar) = STAILQ_NEXT((var), field), 1); \
(var) = (tvar))
#define STAILQ_FOREACH_FROM_SAFE(var, head, field, tvar) \
for ((var) = ((var) ? (var) : STAILQ_FIRST((head))); \
(var) && ((tvar) = STAILQ_NEXT((var), field), 1); \
(var) = (tvar))
#define STAILQ_INIT(head) do { \
STAILQ_FIRST((head)) = NULL; \
(head)->stqh_last = &STAILQ_FIRST((head)); \
} while (0)
#define STAILQ_INSERT_AFTER(head, tqelm, elm, field) do { \
if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\
(head)->stqh_last = &STAILQ_NEXT((elm), field); \
STAILQ_NEXT((tqelm), field) = (elm); \
} while (0)
#define STAILQ_INSERT_HEAD(head, elm, field) do { \
if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \
(head)->stqh_last = &STAILQ_NEXT((elm), field); \
STAILQ_FIRST((head)) = (elm); \
} while (0)
#define STAILQ_INSERT_TAIL(head, elm, field) do { \
STAILQ_NEXT((elm), field) = NULL; \
*(head)->stqh_last = (elm); \
(head)->stqh_last = &STAILQ_NEXT((elm), field); \
} while (0)
#define STAILQ_LAST(head, type, field) \
(STAILQ_EMPTY((head)) ? NULL : \
__containerof((head)->stqh_last, \
QUEUE_TYPEOF(type), field.stqe_next))
#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
#define STAILQ_REMOVE(head, elm, type, field) do { \
QMD_SAVELINK(oldnext, (elm)->field.stqe_next); \
if (STAILQ_FIRST((head)) == (elm)) { \
STAILQ_REMOVE_HEAD((head), field); \
} \
else { \
QUEUE_TYPEOF(type) *curelm = STAILQ_FIRST(head); \
while (STAILQ_NEXT(curelm, field) != (elm)) \
curelm = STAILQ_NEXT(curelm, field); \
STAILQ_REMOVE_AFTER(head, curelm, field); \
} \
TRASHIT(*oldnext); \
} while (0)
#define STAILQ_REMOVE_AFTER(head, elm, field) do { \
if ((STAILQ_NEXT(elm, field) = \
STAILQ_NEXT(STAILQ_NEXT(elm, field), field)) == NULL) \
(head)->stqh_last = &STAILQ_NEXT((elm), field); \
} while (0)
#define STAILQ_REMOVE_HEAD(head, field) do { \
if ((STAILQ_FIRST((head)) = \
STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \
(head)->stqh_last = &STAILQ_FIRST((head)); \
} while (0)
#define STAILQ_SWAP(head1, head2, type) do { \
QUEUE_TYPEOF(type) *swap_first = STAILQ_FIRST(head1); \
QUEUE_TYPEOF(type) **swap_last = (head1)->stqh_last; \
STAILQ_FIRST(head1) = STAILQ_FIRST(head2); \
(head1)->stqh_last = (head2)->stqh_last; \
STAILQ_FIRST(head2) = swap_first; \
(head2)->stqh_last = swap_last; \
if (STAILQ_EMPTY(head1)) \
(head1)->stqh_last = &STAILQ_FIRST(head1); \
if (STAILQ_EMPTY(head2)) \
(head2)->stqh_last = &STAILQ_FIRST(head2); \
} while (0)
/*
* List declarations.
*/
#define LIST_HEAD(name, type) \
struct name { \
struct type *lh_first; /* first element */ \
}
#define LIST_CLASS_HEAD(name, type) \
struct name { \
class type *lh_first; /* first element */ \
}
#define LIST_HEAD_INITIALIZER(head) \
{ NULL }
#define LIST_ENTRY(type) \
struct { \
struct type *le_next; /* next element */ \
struct type **le_prev; /* address of previous next element */ \
}
#define LIST_CLASS_ENTRY(type) \
struct { \
class type *le_next; /* next element */ \
class type **le_prev; /* address of previous next element */ \
}
/*
* List functions.
*/
#if (defined(_KERNEL) && defined(INVARIANTS))
/*
* QMD_LIST_CHECK_HEAD(LIST_HEAD *head, LIST_ENTRY NAME)
*
* If the list is non-empty, validates that the first element of the list
* points back at 'head.'
*/
#define QMD_LIST_CHECK_HEAD(head, field) do { \
if (LIST_FIRST((head)) != NULL && \
LIST_FIRST((head))->field.le_prev != \
&LIST_FIRST((head))) \
panic("Bad list head %p first->prev != head", (head)); \
} while (0)
/*
* QMD_LIST_CHECK_NEXT(TYPE *elm, LIST_ENTRY NAME)
*
* If an element follows 'elm' in the list, validates that the next element
* points back at 'elm.'
*/
#define QMD_LIST_CHECK_NEXT(elm, field) do { \
if (LIST_NEXT((elm), field) != NULL && \
LIST_NEXT((elm), field)->field.le_prev != \
&((elm)->field.le_next)) \
panic("Bad link elm %p next->prev != elm", (elm)); \
} while (0)
/*
* QMD_LIST_CHECK_PREV(TYPE *elm, LIST_ENTRY NAME)
*
* Validates that the previous element (or head of the list) points to 'elm.'
*/
#define QMD_LIST_CHECK_PREV(elm, field) do { \
if (*(elm)->field.le_prev != (elm)) \
panic("Bad link elm %p prev->next != elm", (elm)); \
} while (0)
#else
# 511 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#define QMD_LIST_CHECK_HEAD(head, field)
#define QMD_LIST_CHECK_NEXT(elm, field)
#define QMD_LIST_CHECK_PREV(elm, field)
#endif /* (_KERNEL && INVARIANTS) */
# 515 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#define LIST_CONCAT(head1, head2, type, field) do { \
QUEUE_TYPEOF(type) *curelm = LIST_FIRST(head1); \
if (curelm == NULL) { \
if ((LIST_FIRST(head1) = LIST_FIRST(head2)) != NULL) { \
LIST_FIRST(head2)->field.le_prev = \
&LIST_FIRST((head1)); \
LIST_INIT(head2); \
} \
} else if (LIST_FIRST(head2) != NULL) { \
while (LIST_NEXT(curelm, field) != NULL) \
curelm = LIST_NEXT(curelm, field); \
LIST_NEXT(curelm, field) = LIST_FIRST(head2); \
LIST_FIRST(head2)->field.le_prev = &LIST_NEXT(curelm, field); \
LIST_INIT(head2); \
} \
} while (0)
#define LIST_EMPTY(head) ((head)->lh_first == NULL)
#define LIST_FIRST(head) ((head)->lh_first)
#define LIST_FOREACH(var, head, field) \
for ((var) = LIST_FIRST((head)); \
(var); \
(var) = LIST_NEXT((var), field))
#define LIST_FOREACH_FROM(var, head, field) \
for ((var) = ((var) ? (var) : LIST_FIRST((head))); \
(var); \
(var) = LIST_NEXT((var), field))
#define LIST_FOREACH_SAFE(var, head, field, tvar) \
for ((var) = LIST_FIRST((head)); \
(var) && ((tvar) = LIST_NEXT((var), field), 1); \
(var) = (tvar))
#define LIST_FOREACH_FROM_SAFE(var, head, field, tvar) \
for ((var) = ((var) ? (var) : LIST_FIRST((head))); \
(var) && ((tvar) = LIST_NEXT((var), field), 1); \
(var) = (tvar))
#define LIST_INIT(head) do { \
LIST_FIRST((head)) = NULL; \
} while (0)
#define LIST_INSERT_AFTER(listelm, elm, field) do { \
QMD_LIST_CHECK_NEXT(listelm, field); \
if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\
LIST_NEXT((listelm), field)->field.le_prev = \
&LIST_NEXT((elm), field); \
LIST_NEXT((listelm), field) = (elm); \
(elm)->field.le_prev = &LIST_NEXT((listelm), field); \
} while (0)
#define LIST_INSERT_BEFORE(listelm, elm, field) do { \
QMD_LIST_CHECK_PREV(listelm, field); \
(elm)->field.le_prev = (listelm)->field.le_prev; \
LIST_NEXT((elm), field) = (listelm); \
*(listelm)->field.le_prev = (elm); \
(listelm)->field.le_prev = &LIST_NEXT((elm), field); \
} while (0)
#define LIST_INSERT_HEAD(head, elm, field) do { \
QMD_LIST_CHECK_HEAD((head), field); \
if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL) \
LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\
LIST_FIRST((head)) = (elm); \
(elm)->field.le_prev = &LIST_FIRST((head)); \
} while (0)
#define LIST_NEXT(elm, field) ((elm)->field.le_next)
#define LIST_PREV(elm, head, type, field) \
((elm)->field.le_prev == &LIST_FIRST((head)) ? NULL : \
__containerof((elm)->field.le_prev, \
QUEUE_TYPEOF(type), field.le_next))
#define LIST_REMOVE(elm, field) do { \
QMD_SAVELINK(oldnext, (elm)->field.le_next); \
QMD_SAVELINK(oldprev, (elm)->field.le_prev); \
QMD_LIST_CHECK_NEXT(elm, field); \
QMD_LIST_CHECK_PREV(elm, field); \
if (LIST_NEXT((elm), field) != NULL) \
LIST_NEXT((elm), field)->field.le_prev = \
(elm)->field.le_prev; \
*(elm)->field.le_prev = LIST_NEXT((elm), field); \
TRASHIT(*oldnext); \
TRASHIT(*oldprev); \
} while (0)
#define LIST_SWAP(head1, head2, type, field) do { \
QUEUE_TYPEOF(type) *swap_tmp = LIST_FIRST(head1); \
LIST_FIRST((head1)) = LIST_FIRST((head2)); \
LIST_FIRST((head2)) = swap_tmp; \
if ((swap_tmp = LIST_FIRST((head1))) != NULL) \
swap_tmp->field.le_prev = &LIST_FIRST((head1)); \
if ((swap_tmp = LIST_FIRST((head2))) != NULL) \
swap_tmp->field.le_prev = &LIST_FIRST((head2)); \
} while (0)
/*
* Tail queue declarations.
*/
#define TAILQ_HEAD(name, type) \
struct name { \
struct type *tqh_first; /* first element */ \
struct type **tqh_last; /* addr of last next element */ \
TRACEBUF \
}
#define TAILQ_CLASS_HEAD(name, type) \
struct name { \
class type *tqh_first; /* first element */ \
class type **tqh_last; /* addr of last next element */ \
TRACEBUF \
}
#define TAILQ_HEAD_INITIALIZER(head) \
{ NULL, &(head).tqh_first, TRACEBUF_INITIALIZER }
#define TAILQ_ENTRY(type) \
struct { \
struct type *tqe_next; /* next element */ \
struct type **tqe_prev; /* address of previous next element */ \
TRACEBUF \
}
#define TAILQ_CLASS_ENTRY(type) \
struct { \
class type *tqe_next; /* next element */ \
class type **tqe_prev; /* address of previous next element */ \
TRACEBUF \
}
/*
* Tail queue functions.
*/
#if (defined(_KERNEL) && defined(INVARIANTS))
/*
* QMD_TAILQ_CHECK_HEAD(TAILQ_HEAD *head, TAILQ_ENTRY NAME)
*
* If the tailq is non-empty, validates that the first element of the tailq
* points back at 'head.'
*/
#define QMD_TAILQ_CHECK_HEAD(head, field) do { \
if (!TAILQ_EMPTY(head) && \
TAILQ_FIRST((head))->field.tqe_prev != \
&TAILQ_FIRST((head))) \
panic("Bad tailq head %p first->prev != head", (head)); \
} while (0)
/*
* QMD_TAILQ_CHECK_TAIL(TAILQ_HEAD *head, TAILQ_ENTRY NAME)
*
* Validates that the tail of the tailq is a pointer to pointer to NULL.
*/
#define QMD_TAILQ_CHECK_TAIL(head, field) do { \
if (*(head)->tqh_last != NULL) \
panic("Bad tailq NEXT(%p->tqh_last) != NULL", (head)); \
} while (0)
/*
* QMD_TAILQ_CHECK_NEXT(TYPE *elm, TAILQ_ENTRY NAME)
*
* If an element follows 'elm' in the tailq, validates that the next element
* points back at 'elm.'
*/
#define QMD_TAILQ_CHECK_NEXT(elm, field) do { \
if (TAILQ_NEXT((elm), field) != NULL && \
TAILQ_NEXT((elm), field)->field.tqe_prev != \
&((elm)->field.tqe_next)) \
panic("Bad link elm %p next->prev != elm", (elm)); \
} while (0)
/*
* QMD_TAILQ_CHECK_PREV(TYPE *elm, TAILQ_ENTRY NAME)
*
* Validates that the previous element (or head of the tailq) points to 'elm.'
*/
#define QMD_TAILQ_CHECK_PREV(elm, field) do { \
if (*(elm)->field.tqe_prev != (elm)) \
panic("Bad link elm %p prev->next != elm", (elm)); \
} while (0)
#else
# 700 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#define QMD_TAILQ_CHECK_HEAD(head, field)
#define QMD_TAILQ_CHECK_TAIL(head, headname)
#define QMD_TAILQ_CHECK_NEXT(elm, field)
#define QMD_TAILQ_CHECK_PREV(elm, field)
#endif /* (_KERNEL && INVARIANTS) */
# 705 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
#define TAILQ_CONCAT(head1, head2, field) do { \
if (!TAILQ_EMPTY(head2)) { \
*(head1)->tqh_last = (head2)->tqh_first; \
(head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
(head1)->tqh_last = (head2)->tqh_last; \
TAILQ_INIT((head2)); \
QMD_TRACE_HEAD(head1); \
QMD_TRACE_HEAD(head2); \
} \
} while (0)
#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
#define TAILQ_FIRST(head) ((head)->tqh_first)
#define TAILQ_FOREACH(var, head, field) \
for ((var) = TAILQ_FIRST((head)); \
(var); \
(var) = TAILQ_NEXT((var), field))
#define TAILQ_FOREACH_FROM(var, head, field) \
for ((var) = ((var) ? (var) : TAILQ_FIRST((head))); \
(var); \
(var) = TAILQ_NEXT((var), field))
#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \
for ((var) = TAILQ_FIRST((head)); \
(var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
(var) = (tvar))
#define TAILQ_FOREACH_FROM_SAFE(var, head, field, tvar) \
for ((var) = ((var) ? (var) : TAILQ_FIRST((head))); \
(var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
(var) = (tvar))
#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
for ((var) = TAILQ_LAST((head), headname); \
(var); \
(var) = TAILQ_PREV((var), headname, field))
#define TAILQ_FOREACH_REVERSE_FROM(var, head, headname, field) \
for ((var) = ((var) ? (var) : TAILQ_LAST((head), headname)); \
(var); \
(var) = TAILQ_PREV((var), headname, field))
#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar) \
for ((var) = TAILQ_LAST((head), headname); \
(var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \
(var) = (tvar))
#define TAILQ_FOREACH_REVERSE_FROM_SAFE(var, head, headname, field, tvar) \
for ((var) = ((var) ? (var) : TAILQ_LAST((head), headname)); \
(var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \
(var) = (tvar))
#define TAILQ_INIT(head) do { \
TAILQ_FIRST((head)) = NULL; \
(head)->tqh_last = &TAILQ_FIRST((head)); \
QMD_TRACE_HEAD(head); \
} while (0)
#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
QMD_TAILQ_CHECK_NEXT(listelm, field); \
if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\
TAILQ_NEXT((elm), field)->field.tqe_prev = \
&TAILQ_NEXT((elm), field); \
else { \
(head)->tqh_last = &TAILQ_NEXT((elm), field); \
QMD_TRACE_HEAD(head); \
} \
TAILQ_NEXT((listelm), field) = (elm); \
(elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \
QMD_TRACE_ELEM(&(elm)->field); \
QMD_TRACE_ELEM(&(listelm)->field); \
} while (0)
#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
QMD_TAILQ_CHECK_PREV(listelm, field); \
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
TAILQ_NEXT((elm), field) = (listelm); \
*(listelm)->field.tqe_prev = (elm); \
(listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \
QMD_TRACE_ELEM(&(elm)->field); \
QMD_TRACE_ELEM(&(listelm)->field); \
} while (0)
#define TAILQ_INSERT_HEAD(head, elm, field) do { \
QMD_TAILQ_CHECK_HEAD(head, field); \
if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL) \
TAILQ_FIRST((head))->field.tqe_prev = \
&TAILQ_NEXT((elm), field); \
else \
(head)->tqh_last = &TAILQ_NEXT((elm), field); \
TAILQ_FIRST((head)) = (elm); \
(elm)->field.tqe_prev = &TAILQ_FIRST((head)); \
QMD_TRACE_HEAD(head); \
QMD_TRACE_ELEM(&(elm)->field); \
} while (0)
#define TAILQ_INSERT_TAIL(head, elm, field) do { \
QMD_TAILQ_CHECK_TAIL(head, field); \
TAILQ_NEXT((elm), field) = NULL; \
(elm)->field.tqe_prev = (head)->tqh_last; \
*(head)->tqh_last = (elm); \
(head)->tqh_last = &TAILQ_NEXT((elm), field); \
QMD_TRACE_HEAD(head); \
QMD_TRACE_ELEM(&(elm)->field); \
} while (0)
#define TAILQ_LAST(head, headname) \
(*(((struct headname *)((head)->tqh_last))->tqh_last))
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
#define TAILQ_PREV(elm, headname, field) \
(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
#define TAILQ_REMOVE(head, elm, field) do { \
QMD_SAVELINK(oldnext, (elm)->field.tqe_next); \
QMD_SAVELINK(oldprev, (elm)->field.tqe_prev); \
QMD_TAILQ_CHECK_NEXT(elm, field); \
QMD_TAILQ_CHECK_PREV(elm, field); \
if ((TAILQ_NEXT((elm), field)) != NULL) \
TAILQ_NEXT((elm), field)->field.tqe_prev = \
(elm)->field.tqe_prev; \
else { \
(head)->tqh_last = (elm)->field.tqe_prev; \
QMD_TRACE_HEAD(head); \
} \
*(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \
TRASHIT(*oldnext); \
TRASHIT(*oldprev); \
QMD_TRACE_ELEM(&(elm)->field); \
} while (0)
#define TAILQ_SWAP(head1, head2, type, field) do { \
QUEUE_TYPEOF(type) *swap_first = (head1)->tqh_first; \
QUEUE_TYPEOF(type) **swap_last = (head1)->tqh_last; \
(head1)->tqh_first = (head2)->tqh_first; \
(head1)->tqh_last = (head2)->tqh_last; \
(head2)->tqh_first = swap_first; \
(head2)->tqh_last = swap_last; \
if ((swap_first = (head1)->tqh_first) != NULL) \
swap_first->field.tqe_prev = &(head1)->tqh_first; \
else \
(head1)->tqh_last = &(head1)->tqh_first; \
if ((swap_first = (head2)->tqh_first) != NULL) \
swap_first->field.tqe_prev = &(head2)->tqh_first; \
else \
(head2)->tqh_last = &(head2)->tqh_first; \
} while (0)
#endif /* !_SYS_QUEUE_H_ */
# 859 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/queue.h" 3 4
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <vm/uma.h>
#endif /* expanded by -frewrite-includes */
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/vm/uma.h" 1 3 4
/*-
* Copyright (c) 2002, 2003, 2004, 2005 Jeffrey Roberson <jeff@FreeBSD.org>
* Copyright (c) 2004, 2005 Bosko Milekic <bmilekic@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 unmodified, 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.
*
* $FreeBSD$
*
*/
/*
* uma.h - External definitions for the Universal Memory Allocator
*
*/
#ifndef _VM_UMA_H_
#define _VM_UMA_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/param.h> /* For NULL */
#endif /* expanded by -frewrite-includes */
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/vm/uma.h" 3 4
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/vm/uma.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/malloc.h> /* For M_* */
#endif /* expanded by -frewrite-includes */
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/vm/uma.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/malloc.h" 1 3 4
/*-
* Copyright (c) 1987, 1993
* The Regents of the University of California.
* Copyright (c) 2005, 2009 Robert N. M. Watson
* 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.
* 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.
*
* @(#)malloc.h 8.5 (Berkeley) 5/3/95
* $FreeBSD$
*/
#ifndef _SYS_MALLOC_H_
#define _SYS_MALLOC_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/param.h>
#endif /* expanded by -frewrite-includes */
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/malloc.h" 3 4
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/malloc.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/queue.h>
#endif /* expanded by -frewrite-includes */
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/malloc.h" 3 4
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/malloc.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_lock.h>
#endif /* expanded by -frewrite-includes */
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/malloc.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_lock.h" 1 3 4
/*-
* Copyright (c) 1997 Berkeley Software Design, Inc. 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. Berkeley Software Design Inc's name may not be used to endorse or
* promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``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 BERKELEY SOFTWARE DESIGN INC 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.
*
* $FreeBSD$
*/
#ifndef _SYS__LOCK_H_
#define _SYS__LOCK_H_
struct lock_object {
const char *lo_name; /* Individual lock name. */
u_int lo_flags;
u_int lo_data; /* General class specific data. */
struct witness *lo_witness; /* Data for witness. */
};
#endif /* !_SYS__LOCK_H_ */
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_lock.h" 3 4
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/malloc.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_mutex.h>
#endif /* expanded by -frewrite-includes */
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/malloc.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_mutex.h" 1 3 4
/*-
* Copyright (c) 1997 Berkeley Software Design, Inc. 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. Berkeley Software Design Inc's name may not be used to endorse or
* promote products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY BERKELEY SOFTWARE DESIGN INC ``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 BERKELEY SOFTWARE DESIGN INC 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.
*
* $FreeBSD$
*/
#ifndef _SYS__MUTEX_H_
#define _SYS__MUTEX_H_
#if 0 /* expanded by -frewrite-includes */
#include <machine/param.h>
#endif /* expanded by -frewrite-includes */
# 34 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_mutex.h" 3 4
# 35 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_mutex.h" 3 4
/*
* Sleep/spin mutex.
*
* All mutex implementations must always have a member called mtx_lock.
* Other locking primitive structures are not allowed to use this name
* for their members.
* If this rule needs to change, the bits in the mutex implementation must
* be modified appropriately.
*/
struct mtx {
struct lock_object lock_object; /* Common lock properties. */
volatile uintptr_t mtx_lock; /* Owner and flags. */
};
/*
* Members of struct mtx_padalign must mirror members of struct mtx.
* mtx_padalign mutexes can use the mtx(9) API transparently without
* modification.
* Pad-aligned mutexes used within structures should generally be the
* first member of the struct. Otherwise, the compiler can generate
* additional padding for the struct to keep a correct alignment for
* the mutex.
*/
struct mtx_padalign {
struct lock_object lock_object; /* Common lock properties. */
volatile uintptr_t mtx_lock; /* Owner and flags. */
} __aligned(CACHE_LINE_SIZE);
#endif /* !_SYS__MUTEX_H_ */
# 65 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_mutex.h" 3 4
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/malloc.h" 2 3 4
#define MINALLOCSIZE UMA_SMALLEST_UNIT
/*
* flags to malloc.
*/
#define M_NOWAIT 0x0001 /* do not block */
#define M_WAITOK 0x0002 /* ok to block */
#define M_ZERO 0x0100 /* bzero the allocation */
#define M_NOVM 0x0200 /* don't ask VM for pages */
#define M_USE_RESERVE 0x0400 /* can alloc out of reserve memory */
#define M_NODUMP 0x0800 /* don't dump pages in this allocation */
#define M_FIRSTFIT 0x1000 /* Only for vmem, fast fit. */
#define M_BESTFIT 0x2000 /* Only for vmem, low fragmentation. */
#define M_MAGIC 877983977 /* time when first defined :-) */
/*
* Two malloc type structures are present: malloc_type, which is used by a
* type owner to declare the type, and malloc_type_internal, which holds
* malloc-owned statistics and other ABI-sensitive fields, such as the set of
* malloc statistics indexed by the compile-time MAXCPU constant.
* Applications should avoid introducing dependence on the allocator private
* data layout and size.
*
* The malloc_type ks_next field is protected by malloc_mtx. Other fields in
* malloc_type are static after initialization so unsynchronized.
*
* Statistics in malloc_type_stats are written only when holding a critical
* section and running on the CPU associated with the index into the stat
* array, but read lock-free resulting in possible (minor) races, which the
* monitoring app should take into account.
*/
struct malloc_type_stats {
uint64_t mts_memalloced; /* Bytes allocated on CPU. */
uint64_t mts_memfreed; /* Bytes freed on CPU. */
uint64_t mts_numallocs; /* Number of allocates on CPU. */
uint64_t mts_numfrees; /* number of frees on CPU. */
uint64_t mts_size; /* Bitmask of sizes allocated on CPU. */
uint64_t _mts_reserved1; /* Reserved field. */
uint64_t _mts_reserved2; /* Reserved field. */
uint64_t _mts_reserved3; /* Reserved field. */
};
/*
* Index definitions for the mti_probes[] array.
*/
#define DTMALLOC_PROBE_MALLOC 0
#define DTMALLOC_PROBE_FREE 1
#define DTMALLOC_PROBE_MAX 2
struct malloc_type_internal {
uint32_t mti_probes[DTMALLOC_PROBE_MAX];
/* DTrace probe ID array. */
u_char mti_zone;
struct malloc_type_stats mti_stats[MAXCPU];
};
/*
* Public data structure describing a malloc type. Private data is hung off
* of ks_handle to avoid encoding internal malloc(9) data structures in
* modules, which will statically allocate struct malloc_type.
*/
struct malloc_type {
struct malloc_type *ks_next; /* Next in global chain. */
u_long ks_magic; /* Detect programmer error. */
const char *ks_shortdesc; /* Printable type name. */
void *ks_handle; /* Priv. data, was lo_class. */
};
/*
* Statistics structure headers for user space. The kern.malloc sysctl
* exposes a structure stream consisting of a stream header, then a series of
* malloc type headers and statistics structures (quantity maxcpus). For
* convenience, the kernel will provide the current value of maxcpus at the
* head of the stream.
*/
#define MALLOC_TYPE_STREAM_VERSION 0x00000001
struct malloc_type_stream_header {
uint32_t mtsh_version; /* Stream format version. */
uint32_t mtsh_maxcpus; /* Value of MAXCPU for stream. */
uint32_t mtsh_count; /* Number of records. */
uint32_t _mtsh_pad; /* Pad/reserved field. */
};
#define MALLOC_MAX_NAME 32
struct malloc_type_header {
char mth_name[MALLOC_MAX_NAME];
};
#ifdef _KERNEL
#define MALLOC_DEFINE(type, shortdesc, longdesc) \
struct malloc_type type[1] = { \
{ NULL, M_MAGIC, shortdesc, NULL } \
}; \
SYSINIT(type##_init, SI_SUB_KMEM, SI_ORDER_THIRD, malloc_init, \
type); \
SYSUNINIT(type##_uninit, SI_SUB_KMEM, SI_ORDER_ANY, \
malloc_uninit, type)
#define MALLOC_DECLARE(type) \
extern struct malloc_type type[1]
MALLOC_DECLARE(M_CACHE);
MALLOC_DECLARE(M_DEVBUF);
MALLOC_DECLARE(M_TEMP);
/*
* Deprecated macro versions of not-quite-malloc() and free().
*/
#define MALLOC(space, cast, size, type, flags) \
((space) = (cast)malloc((u_long)(size), (type), (flags)))
#define FREE(addr, type) free((addr), (type))
/*
* XXX this should be declared in <sys/uio.h>, but that tends to fail
* because <sys/uio.h> is included in a header before the source file
* has a chance to include <sys/malloc.h> to get MALLOC_DECLARE() defined.
*/
MALLOC_DECLARE(M_IOV);
extern struct mtx malloc_mtx;
/*
* Function type used when iterating over the list of malloc types.
*/
typedef void malloc_type_list_func_t(struct malloc_type *, void *);
void contigfree(void *addr, unsigned long size, struct malloc_type *type);
void *contigmalloc(unsigned long size, struct malloc_type *type, int flags,
vm_paddr_t low, vm_paddr_t high, unsigned long alignment,
vm_paddr_t boundary) __malloc_like __result_use_check
__alloc_size(1) __alloc_align(6);
void free(void *addr, struct malloc_type *type);
void *malloc(unsigned long size, struct malloc_type *type, int flags)
__malloc_like __result_use_check __alloc_size(1);
void malloc_init(void *);
int malloc_last_fail(void);
void malloc_type_allocated(struct malloc_type *type, unsigned long size);
void malloc_type_freed(struct malloc_type *type, unsigned long size);
void malloc_type_list(malloc_type_list_func_t *, void *);
void malloc_uninit(void *);
void *realloc(void *addr, unsigned long size, struct malloc_type *type,
int flags) __result_use_check __alloc_size(2);
void *reallocf(void *addr, unsigned long size, struct malloc_type *type,
int flags) __alloc_size(2);
struct malloc_type *malloc_desc2type(const char *desc);
#endif /* _KERNEL */
# 191 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/malloc.h" 3 4
#endif /* !_SYS_MALLOC_H_ */
# 193 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/malloc.h" 3 4
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/vm/uma.h" 2 3 4
#ifdef CPU_CHERI
#if 0 /* expanded by -frewrite-includes */
#include <cheri/cheri.h>
#endif /* expanded by -frewrite-includes */
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/vm/uma.h" 3 4
# 44 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/vm/uma.h" 3 4
#endif
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/vm/uma.h" 3 4
/* User visible parameters */
#define UMA_SMALLEST_UNIT (PAGE_SIZE / 256) /* Smallest item allocated */
/* Types and type defs */
struct uma_zone;
/* Opaque type used as a handle to the zone */
typedef struct uma_zone * uma_zone_t;
void zone_drain(uma_zone_t);
/*
* Item constructor
*
* Arguments:
* item A pointer to the memory which has been allocated.
* arg The arg field passed to uma_zalloc_arg
* size The size of the allocated item
* flags See zalloc flags
*
* Returns:
* 0 on success
* errno on failure
*
* Discussion:
* The constructor is called just before the memory is returned
* to the user. It may block if necessary.
*/
typedef int (*uma_ctor)(void *mem, int size, void *arg, int flags);
/*
* Item destructor
*
* Arguments:
* item A pointer to the memory which has been allocated.
* size The size of the item being destructed.
* arg Argument passed through uma_zfree_arg
*
* Returns:
* Nothing
*
* Discussion:
* The destructor may perform operations that differ from those performed
* by the initializer, but it must leave the object in the same state.
* This IS type stable storage. This is called after EVERY zfree call.
*/
typedef void (*uma_dtor)(void *mem, int size, void *arg);
/*
* Item initializer
*
* Arguments:
* item A pointer to the memory which has been allocated.
* size The size of the item being initialized.
* flags See zalloc flags
*
* Returns:
* 0 on success
* errno on failure
*
* Discussion:
* The initializer is called when the memory is cached in the uma zone.
* The initializer and the destructor should leave the object in the same
* state.
*/
typedef int (*uma_init)(void *mem, int size, int flags);
/*
* Item discard function
*
* Arguments:
* item A pointer to memory which has been 'freed' but has not left the
* zone's cache.
* size The size of the item being discarded.
*
* Returns:
* Nothing
*
* Discussion:
* This routine is called when memory leaves a zone and is returned to the
* system for other uses. It is the counter-part to the init function.
*/
typedef void (*uma_fini)(void *mem, int size);
/*
* Import new memory into a cache zone.
*/
typedef int (*uma_import)(void *arg, void **store, int count, int flags);
/*
* Free memory from a cache zone.
*/
typedef void (*uma_release)(void *arg, void **store, int count);
/*
* What's the difference between initializing and constructing?
*
* The item is initialized when it is cached, and this is the state that the
* object should be in when returned to the allocator. The purpose of this is
* to remove some code which would otherwise be called on each allocation by
* utilizing a known, stable state. This differs from the constructor which
* will be called on EVERY allocation.
*
* For example, in the initializer you may want to initialize embedded locks,
* NULL list pointers, set up initial states, magic numbers, etc. This way if
* the object is held in the allocator and re-used it won't be necessary to
* re-initialize it.
*
* The constructor may be used to lock a data structure, link it on to lists,
* bump reference counts or total counts of outstanding structures, etc.
*
*/
/* Function proto types */
/*
* Create a new uma zone
*
* Arguments:
* name The text name of the zone for debugging and stats. This memory
* should not be freed until the zone has been deallocated.
* size The size of the object that is being created.
* ctor The constructor that is called when the object is allocated.
* dtor The destructor that is called when the object is freed.
* init An initializer that sets up the initial state of the memory.
* fini A discard function that undoes initialization done by init.
* ctor/dtor/init/fini may all be null, see notes above.
* align A bitmask that corresponds to the requested alignment
* eg 4 would be 0x3
* flags A set of parameters that control the behavior of the zone.
*
* Returns:
* A pointer to a structure which is intended to be opaque to users of
* the interface. The value may be null if the wait flag is not set.
*/
uma_zone_t uma_zcreate(const char *name, size_t size, uma_ctor ctor,
uma_dtor dtor, uma_init uminit, uma_fini fini,
int align, uint32_t flags);
/*
* Create a secondary uma zone
*
* Arguments:
* name The text name of the zone for debugging and stats. This memory
* should not be freed until the zone has been deallocated.
* ctor The constructor that is called when the object is allocated.
* dtor The destructor that is called when the object is freed.
* zinit An initializer that sets up the initial state of the memory
* as the object passes from the Keg's slab to the Zone's cache.
* zfini A discard function that undoes initialization done by init
* as the object passes from the Zone's cache to the Keg's slab.
*
* ctor/dtor/zinit/zfini may all be null, see notes above.
* Note that the zinit and zfini specified here are NOT
* exactly the same as the init/fini specified to uma_zcreate()
* when creating a master zone. These zinit/zfini are called
* on the TRANSITION from keg to zone (and vice-versa). Once
* these are set, the primary zone may alter its init/fini
* (which are called when the object passes from VM to keg)
* using uma_zone_set_init/fini()) as well as its own
* zinit/zfini (unset by default for master zone) with
* uma_zone_set_zinit/zfini() (note subtle 'z' prefix).
*
* master A reference to this zone's Master Zone (Primary Zone),
* which contains the backing Keg for the Secondary Zone
* being added.
*
* Returns:
* A pointer to a structure which is intended to be opaque to users of
* the interface. The value may be null if the wait flag is not set.
*/
uma_zone_t uma_zsecond_create(char *name, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_zone_t master);
/*
* Add a second master to a secondary zone. This provides multiple data
* backends for objects with the same size. Both masters must have
* compatible allocation flags. Presently, UMA_ZONE_MALLOC type zones are
* the only supported.
*
* Returns:
* Error on failure, 0 on success.
*/
int uma_zsecond_add(uma_zone_t zone, uma_zone_t master);
/*
* Create cache-only zones.
*
* This allows uma's per-cpu cache facilities to handle arbitrary
* pointers. Consumers must specify the import and release functions to
* fill and destroy caches. UMA does not allocate any memory for these
* zones. The 'arg' parameter is passed to import/release and is caller
* specific.
*/
uma_zone_t uma_zcache_create(char *name, int size, uma_ctor ctor, uma_dtor dtor,
uma_init zinit, uma_fini zfini, uma_import zimport,
uma_release zrelease, void *arg, int flags);
/*
* Definitions for uma_zcreate flags
*
* These flags share space with UMA_ZFLAGs in uma_int.h. Be careful not to
* overlap when adding new features. 0xf0000000 is in use by uma_int.h.
*/
#define UMA_ZONE_PAGEABLE 0x0001 /* Return items not fully backed by
physical memory XXX Not yet */
#define UMA_ZONE_ZINIT 0x0002 /* Initialize with zeros */
#define UMA_ZONE_STATIC 0x0004 /* Statically sized zone */
#define UMA_ZONE_OFFPAGE 0x0008 /* Force the slab structure allocation
off of the real memory */
#define UMA_ZONE_MALLOC 0x0010 /* For use by malloc(9) only! */
#define UMA_ZONE_NOFREE 0x0020 /* Do not free slabs of this type! */
#define UMA_ZONE_MTXCLASS 0x0040 /* Create a new lock class */
#define UMA_ZONE_VM 0x0080 /*
* Used for internal vm datastructures
* only.
*/
#define UMA_ZONE_HASH 0x0100 /*
* Use a hash table instead of caching
* information in the vm_page.
*/
#define UMA_ZONE_SECONDARY 0x0200 /* Zone is a Secondary Zone */
/* 0x0400 Unused */
#define UMA_ZONE_MAXBUCKET 0x0800 /* Use largest buckets */
#define UMA_ZONE_CACHESPREAD 0x1000 /*
* Spread memory start locations across
* all possible cache lines. May
* require many virtually contiguous
* backend pages and can fail early.
*/
#define UMA_ZONE_VTOSLAB 0x2000 /* Zone uses vtoslab for lookup. */
#define UMA_ZONE_NODUMP 0x4000 /*
* Zone's pages will not be included in
* mini-dumps.
*/
#define UMA_ZONE_PCPU 0x8000 /*
* Allocates mp_maxid + 1 slabs sized to
* sizeof(struct pcpu).
*/
/*
* These flags are shared between the keg and zone. In zones wishing to add
* new kegs these flags must be compatible. Some are determined based on
* physical parameters of the request and may not be provided by the consumer.
*/
#define UMA_ZONE_INHERIT \
(UMA_ZONE_OFFPAGE | UMA_ZONE_MALLOC | UMA_ZONE_NOFREE | \
UMA_ZONE_HASH | UMA_ZONE_VTOSLAB | UMA_ZONE_PCPU)
/* Definitions for align */
#ifndef CPU_CHERI
#define UMA_ALIGN_PTR (sizeof(void *) - 1) /* Alignment fit for ptr */
#else
# 300 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/vm/uma.h" 3 4
#define UMA_ALIGN_PTR (CHERICAP_SIZE - 1)
#endif
# 302 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/vm/uma.h" 3 4
#define UMA_ALIGN_LONG (sizeof(long) - 1) /* "" long */
#define UMA_ALIGN_INT (sizeof(int) - 1) /* "" int */
#define UMA_ALIGN_SHORT (sizeof(short) - 1) /* "" short */
#define UMA_ALIGN_CHAR (sizeof(char) - 1) /* "" char */
#define UMA_ALIGN_CACHE (0 - 1) /* Cache line size align */
/*
* Destroys an empty uma zone. If the zone is not empty uma complains loudly.
*
* Arguments:
* zone The zone we want to destroy.
*
*/
void uma_zdestroy(uma_zone_t zone);
/*
* Allocates an item out of a zone
*
* Arguments:
* zone The zone we are allocating from
* arg This data is passed to the ctor function
* flags See sys/malloc.h for available flags.
*
* Returns:
* A non-null pointer to an initialized element from the zone is
* guaranteed if the wait flag is M_WAITOK. Otherwise a null pointer
* may be returned if the zone is empty or the ctor failed.
*/
void *uma_zalloc_arg(uma_zone_t zone, void *arg, int flags);
/*
* Allocates an item out of a zone without supplying an argument
*
* This is just a wrapper for uma_zalloc_arg for convenience.
*
*/
static __inline void *uma_zalloc(uma_zone_t zone, int flags);
static __inline void *
uma_zalloc(uma_zone_t zone, int flags)
{
return uma_zalloc_arg(zone, NULL, flags);
}
/*
* Frees an item back into the specified zone.
*
* Arguments:
* zone The zone the item was originally allocated out of.
* item The memory to be freed.
* arg Argument passed to the destructor
*
* Returns:
* Nothing.
*/
void uma_zfree_arg(uma_zone_t zone, void *item, void *arg);
/*
* Frees an item back to a zone without supplying an argument
*
* This is just a wrapper for uma_zfree_arg for convenience.
*
*/
static __inline void uma_zfree(uma_zone_t zone, void *item);
static __inline void
uma_zfree(uma_zone_t zone, void *item)
{
uma_zfree_arg(zone, item, NULL);
}
/*
* XXX The rest of the prototypes in this header are h0h0 magic for the VM.
* If you think you need to use it for a normal zone you're probably incorrect.
*/
/*
* Backend page supplier routines
*
* Arguments:
* zone The zone that is requesting pages.
* size The number of bytes being requested.
* pflag Flags for these memory pages, see below.
* wait Indicates our willingness to block.
*
* Returns:
* A pointer to the allocated memory or NULL on failure.
*/
typedef void *(*uma_alloc)(uma_zone_t zone, vm_size_t size, uint8_t *pflag,
int wait);
/*
* Backend page free routines
*
* Arguments:
* item A pointer to the previously allocated pages.
* size The original size of the allocation.
* pflag The flags for the slab. See UMA_SLAB_* below.
*
* Returns:
* None
*/
typedef void (*uma_free)(void *item, vm_size_t size, uint8_t pflag);
/*
* Sets up the uma allocator. (Called by vm_mem_init)
*
* Arguments:
* bootmem A pointer to memory used to bootstrap the system.
*
* Returns:
* Nothing
*
* Discussion:
* This memory is used for zones which allocate things before the
* backend page supplier can give us pages. It should be
* UMA_SLAB_SIZE * boot_pages bytes. (see uma_int.h)
*
*/
void uma_startup(void *bootmem, int boot_pages);
/*
* Finishes starting up the allocator. This should
* be called when kva is ready for normal allocs.
*
* Arguments:
* None
*
* Returns:
* Nothing
*
* Discussion:
* uma_startup2 is called by kmeminit() to enable us of uma for malloc.
*/
void uma_startup2(void);
/*
* Reclaims unused memory for all zones
*
* Arguments:
* None
* Returns:
* None
*
* This should only be called by the page out daemon.
*/
void uma_reclaim(void);
/*
* Sets the alignment mask to be used for all zones requesting cache
* alignment. Should be called by MD boot code prior to starting VM/UMA.
*
* Arguments:
* align The alignment mask
*
* Returns:
* Nothing
*/
void uma_set_align(int align);
/*
* Set a reserved number of items to hold for M_USE_RESERVE allocations. All
* other requests must allocate new backing pages.
*/
void uma_zone_reserve(uma_zone_t zone, int nitems);
/*
* Reserves the maximum KVA space required by the zone and configures the zone
* to use a VM_ALLOC_NOOBJ-based backend allocator.
*
* Arguments:
* zone The zone to update.
* nitems The upper limit on the number of items that can be allocated.
*
* Returns:
* 0 if KVA space can not be allocated
* 1 if successful
*
* Discussion:
* When the machine supports a direct map and the zone's items are smaller
* than a page, the zone will use the direct map instead of allocating KVA
* space.
*/
int uma_zone_reserve_kva(uma_zone_t zone, int nitems);
/*
* Sets a high limit on the number of items allowed in a zone
*
* Arguments:
* zone The zone to limit
* nitems The requested upper limit on the number of items allowed
*
* Returns:
* int The effective value of nitems after rounding up based on page size
*/
int uma_zone_set_max(uma_zone_t zone, int nitems);
/*
* Obtains the effective limit on the number of items in a zone
*
* Arguments:
* zone The zone to obtain the effective limit from
*
* Return:
* 0 No limit
* int The effective limit of the zone
*/
int uma_zone_get_max(uma_zone_t zone);
/*
* Sets a warning to be printed when limit is reached
*
* Arguments:
* zone The zone we will warn about
* warning Warning content
*
* Returns:
* Nothing
*/
void uma_zone_set_warning(uma_zone_t zone, const char *warning);
/*
* Sets a function to run when limit is reached
*
* Arguments:
* zone The zone to which this applies
* fx The function ro run
*
* Returns:
* Nothing
*/
typedef void (*uma_maxaction_t)(uma_zone_t, int);
void uma_zone_set_maxaction(uma_zone_t zone, uma_maxaction_t);
/*
* Obtains the approximate current number of items allocated from a zone
*
* Arguments:
* zone The zone to obtain the current allocation count from
*
* Return:
* int The approximate current number of items allocated from the zone
*/
int uma_zone_get_cur(uma_zone_t zone);
/*
* The following two routines (uma_zone_set_init/fini)
* are used to set the backend init/fini pair which acts on an
* object as it becomes allocated and is placed in a slab within
* the specified zone's backing keg. These should probably not
* be changed once allocations have already begun, but only be set
* immediately upon zone creation.
*/
void uma_zone_set_init(uma_zone_t zone, uma_init uminit);
void uma_zone_set_fini(uma_zone_t zone, uma_fini fini);
/*
* The following two routines (uma_zone_set_zinit/zfini) are
* used to set the zinit/zfini pair which acts on an object as
* it passes from the backing Keg's slab cache to the
* specified Zone's bucket cache. These should probably not
* be changed once allocations have already begun, but only be set
* immediately upon zone creation.
*/
void uma_zone_set_zinit(uma_zone_t zone, uma_init zinit);
void uma_zone_set_zfini(uma_zone_t zone, uma_fini zfini);
/*
* Replaces the standard backend allocator for this zone.
*
* Arguments:
* zone The zone whose backend allocator is being changed.
* allocf A pointer to the allocation function
*
* Returns:
* Nothing
*
* Discussion:
* This could be used to implement pageable allocation, or perhaps
* even DMA allocators if used in conjunction with the OFFPAGE
* zone flag.
*/
void uma_zone_set_allocf(uma_zone_t zone, uma_alloc allocf);
/*
* Used for freeing memory provided by the allocf above
*
* Arguments:
* zone The zone that intends to use this free routine.
* freef The page freeing routine.
*
* Returns:
* Nothing
*/
void uma_zone_set_freef(uma_zone_t zone, uma_free freef);
/*
* These flags are setable in the allocf and visible in the freef.
*/
#define UMA_SLAB_BOOT 0x01 /* Slab alloced from boot pages */
#define UMA_SLAB_KMEM 0x02 /* Slab alloced from kmem_map */
#define UMA_SLAB_KERNEL 0x04 /* Slab alloced from kernel_map */
#define UMA_SLAB_PRIV 0x08 /* Slab alloced from priv allocator */
#define UMA_SLAB_OFFP 0x10 /* Slab is managed separately */
#define UMA_SLAB_MALLOC 0x20 /* Slab is a large malloc slab */
/* 0x40 and 0x80 are available */
/*
* Used to pre-fill a zone with some number of items
*
* Arguments:
* zone The zone to fill
* itemcnt The number of items to reserve
*
* Returns:
* Nothing
*
* NOTE: This is blocking and should only be done at startup
*/
void uma_prealloc(uma_zone_t zone, int itemcnt);
/*
* Used to determine if a fixed-size zone is exhausted.
*
* Arguments:
* zone The zone to check
*
* Returns:
* Non-zero if zone is exhausted.
*/
int uma_zone_exhausted(uma_zone_t zone);
int uma_zone_exhausted_nolock(uma_zone_t zone);
/*
* Common UMA_ZONE_PCPU zones.
*/
extern uma_zone_t pcpu_zone_64;
extern uma_zone_t pcpu_zone_ptr;
/*
* Exported statistics structures to be used by user space monitoring tools.
* Statistics stream consists of a uma_stream_header, followed by a series of
* alternative uma_type_header and uma_type_stat structures.
*/
#define UMA_STREAM_VERSION 0x00000001
struct uma_stream_header {
uint32_t ush_version; /* Stream format version. */
uint32_t ush_maxcpus; /* Value of MAXCPU for stream. */
uint32_t ush_count; /* Number of records. */
uint32_t _ush_pad; /* Pad/reserved field. */
};
#define UTH_MAX_NAME 32
#define UTH_ZONE_SECONDARY 0x00000001
struct uma_type_header {
/*
* Static per-zone data, some extracted from the supporting keg.
*/
char uth_name[UTH_MAX_NAME];
uint32_t uth_align; /* Keg: alignment. */
uint32_t uth_size; /* Keg: requested size of item. */
uint32_t uth_rsize; /* Keg: real size of item. */
uint32_t uth_maxpages; /* Keg: maximum number of pages. */
uint32_t uth_limit; /* Keg: max items to allocate. */
/*
* Current dynamic zone/keg-derived statistics.
*/
uint32_t uth_pages; /* Keg: pages allocated. */
uint32_t uth_keg_free; /* Keg: items free. */
uint32_t uth_zone_free; /* Zone: items free. */
uint32_t uth_bucketsize; /* Zone: desired bucket size. */
uint32_t uth_zone_flags; /* Zone: flags. */
uint64_t uth_allocs; /* Zone: number of allocations. */
uint64_t uth_frees; /* Zone: number of frees. */
uint64_t uth_fails; /* Zone: number of alloc failures. */
uint64_t uth_sleeps; /* Zone: number of alloc sleeps. */
uint64_t _uth_reserved1[2]; /* Reserved. */
};
struct uma_percpu_stat {
uint64_t ups_allocs; /* Cache: number of allocations. */
uint64_t ups_frees; /* Cache: number of frees. */
uint64_t ups_cache_free; /* Cache: free items in cache. */
uint64_t _ups_reserved[5]; /* Reserved. */
};
void uma_reclaim_wakeup(void);
void uma_reclaim_worker(void *);
#endif /* _VM_UMA_H_ */
# 703 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/vm/uma.h" 3 4
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 2 3 4
/*
* POSIX.1e and NFSv4 ACL types and related constants.
*/
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 int acl_type_t;
typedef int *acl_permset_t;
typedef uint16_t *acl_flagset_t;
/*
* With 254 entries, "struct acl_t_struct" is exactly one 4kB page big.
* Note that with NFSv4 ACLs, the maximum number of ACL entries one
* may set on file or directory is about half of ACL_MAX_ENTRIES.
*
* If you increase this, you might also need to increase
* _ACL_T_ALIGNMENT_BITS in lib/libc/posix1e/acl_support.h.
*
* The maximum number of POSIX.1e ACLs is controlled
* by OLDACL_MAX_ENTRIES. Changing that one will break binary
* compatibility with pre-8.0 userland and change on-disk ACL layout.
*/
#define ACL_MAX_ENTRIES 254
#if defined(_KERNEL) || defined(_ACL_PRIVATE)
#define POSIX1E_ACL_ACCESS_EXTATTR_NAMESPACE EXTATTR_NAMESPACE_SYSTEM
#define POSIX1E_ACL_ACCESS_EXTATTR_NAME "posix1e.acl_access"
#define POSIX1E_ACL_DEFAULT_EXTATTR_NAMESPACE EXTATTR_NAMESPACE_SYSTEM
#define POSIX1E_ACL_DEFAULT_EXTATTR_NAME "posix1e.acl_default"
#define NFS4_ACL_EXTATTR_NAMESPACE EXTATTR_NAMESPACE_SYSTEM
#define NFS4_ACL_EXTATTR_NAME "nfs4.acl"
#define OLDACL_MAX_ENTRIES 32
/*
* "struct oldacl" is used in compatibility ACL syscalls and for on-disk
* storage of POSIX.1e ACLs.
*/
typedef int oldacl_tag_t;
typedef mode_t oldacl_perm_t;
struct oldacl_entry {
oldacl_tag_t ae_tag;
uid_t ae_id;
oldacl_perm_t ae_perm;
};
typedef struct oldacl_entry *oldacl_entry_t;
struct oldacl {
int acl_cnt;
struct oldacl_entry acl_entry[OLDACL_MAX_ENTRIES];
};
/*
* Current "struct acl".
*/
struct acl_entry {
acl_tag_t ae_tag;
uid_t ae_id;
acl_perm_t ae_perm;
/* NFSv4 entry type, "allow" or "deny". Unused in POSIX.1e ACLs. */
acl_entry_type_t ae_entry_type;
/* NFSv4 ACL inheritance. Unused in POSIX.1e ACLs. */
acl_flag_t ae_flags;
};
typedef struct acl_entry *acl_entry_t;
/*
* Internal ACL structure, used in libc, kernel APIs and for on-disk
* storage of NFSv4 ACLs. POSIX.1e ACLs use "struct oldacl" for on-disk
* storage.
*/
struct acl {
unsigned int acl_maxcnt;
unsigned int acl_cnt;
/* Will be required e.g. to implement NFSv4.1 ACL inheritance. */
int acl_spare[4];
struct acl_entry acl_entry[ACL_MAX_ENTRIES];
};
/*
* ACL structure internal to libc.
*/
struct acl_t_struct {
struct acl ats_acl;
int ats_cur_entry;
/*
* ats_brand is for libc internal bookkeeping only.
* Applications should use acl_get_brand_np(3).
* Kernel code should use the "type" argument passed
* to VOP_SETACL, VOP_GETACL or VOP_ACLCHECK calls;
* ACL_TYPE_ACCESS or ACL_TYPE_DEFAULT mean POSIX.1e
* ACL, ACL_TYPE_NFS4 means NFSv4 ACL.
*/
int ats_brand;
};
typedef struct acl_t_struct *acl_t;
#else /* _KERNEL || _ACL_PRIVATE */
# 144 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 3 4
typedef void *acl_entry_t;
typedef void *acl_t;
#endif /* !_KERNEL && !_ACL_PRIVATE */
# 149 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 3 4
/*
* Possible valid values for ats_brand field.
*/
#define ACL_BRAND_UNKNOWN 0
#define ACL_BRAND_POSIX 1
#define ACL_BRAND_NFS4 2
/*
* Possible valid values for ae_tag field. For explanation, see acl(9).
*/
#define ACL_UNDEFINED_TAG 0x00000000
#define ACL_USER_OBJ 0x00000001
#define ACL_USER 0x00000002
#define ACL_GROUP_OBJ 0x00000004
#define ACL_GROUP 0x00000008
#define ACL_MASK 0x00000010
#define ACL_OTHER 0x00000020
#define ACL_OTHER_OBJ ACL_OTHER
#define ACL_EVERYONE 0x00000040
/*
* Possible valid values for ae_entry_type field, valid only for NFSv4 ACLs.
*/
#define ACL_ENTRY_TYPE_ALLOW 0x0100
#define ACL_ENTRY_TYPE_DENY 0x0200
#define ACL_ENTRY_TYPE_AUDIT 0x0400
#define ACL_ENTRY_TYPE_ALARM 0x0800
/*
* Possible valid values for acl_type_t arguments. First two
* are provided only for backwards binary compatibility.
*/
#define ACL_TYPE_ACCESS_OLD 0x00000000
#define ACL_TYPE_DEFAULT_OLD 0x00000001
#define ACL_TYPE_ACCESS 0x00000002
#define ACL_TYPE_DEFAULT 0x00000003
#define ACL_TYPE_NFS4 0x00000004
/*
* Possible bits in ae_perm field for POSIX.1e ACLs. Note
* that ACL_EXECUTE may be used in both NFSv4 and POSIX.1e ACLs.
*/
#define ACL_EXECUTE 0x0001
#define ACL_WRITE 0x0002
#define ACL_READ 0x0004
#define ACL_PERM_NONE 0x0000
#define ACL_PERM_BITS (ACL_EXECUTE | ACL_WRITE | ACL_READ)
#define ACL_POSIX1E_BITS (ACL_EXECUTE | ACL_WRITE | ACL_READ)
/*
* Possible bits in ae_perm field for NFSv4 ACLs.
*/
#define ACL_READ_DATA 0x00000008
#define ACL_LIST_DIRECTORY 0x00000008
#define ACL_WRITE_DATA 0x00000010
#define ACL_ADD_FILE 0x00000010
#define ACL_APPEND_DATA 0x00000020
#define ACL_ADD_SUBDIRECTORY 0x00000020
#define ACL_READ_NAMED_ATTRS 0x00000040
#define ACL_WRITE_NAMED_ATTRS 0x00000080
/* ACL_EXECUTE is defined above. */
#define ACL_DELETE_CHILD 0x00000100
#define ACL_READ_ATTRIBUTES 0x00000200
#define ACL_WRITE_ATTRIBUTES 0x00000400
#define ACL_DELETE 0x00000800
#define ACL_READ_ACL 0x00001000
#define ACL_WRITE_ACL 0x00002000
#define ACL_WRITE_OWNER 0x00004000
#define ACL_SYNCHRONIZE 0x00008000
#define ACL_FULL_SET (ACL_READ_DATA | ACL_WRITE_DATA | \
ACL_APPEND_DATA | ACL_READ_NAMED_ATTRS | ACL_WRITE_NAMED_ATTRS | \
ACL_EXECUTE | ACL_DELETE_CHILD | ACL_READ_ATTRIBUTES | \
ACL_WRITE_ATTRIBUTES | ACL_DELETE | ACL_READ_ACL | ACL_WRITE_ACL | \
ACL_WRITE_OWNER | ACL_SYNCHRONIZE)
#define ACL_MODIFY_SET (ACL_FULL_SET & \
~(ACL_WRITE_ACL | ACL_WRITE_OWNER))
#define ACL_READ_SET (ACL_READ_DATA | ACL_READ_NAMED_ATTRS | \
ACL_READ_ATTRIBUTES | ACL_READ_ACL)
#define ACL_WRITE_SET (ACL_WRITE_DATA | ACL_APPEND_DATA | \
ACL_WRITE_NAMED_ATTRS | ACL_WRITE_ATTRIBUTES)
#define ACL_NFS4_PERM_BITS ACL_FULL_SET
/*
* Possible entry_id values for acl_get_entry(3).
*/
#define ACL_FIRST_ENTRY 0
#define ACL_NEXT_ENTRY 1
/*
* Possible values in ae_flags field; valid only for NFSv4 ACLs.
*/
#define ACL_ENTRY_FILE_INHERIT 0x0001
#define ACL_ENTRY_DIRECTORY_INHERIT 0x0002
#define ACL_ENTRY_NO_PROPAGATE_INHERIT 0x0004
#define ACL_ENTRY_INHERIT_ONLY 0x0008
#define ACL_ENTRY_SUCCESSFUL_ACCESS 0x0010
#define ACL_ENTRY_FAILED_ACCESS 0x0020
#define ACL_ENTRY_INHERITED 0x0080
#define ACL_FLAGS_BITS (ACL_ENTRY_FILE_INHERIT | \
ACL_ENTRY_DIRECTORY_INHERIT | ACL_ENTRY_NO_PROPAGATE_INHERIT | \
ACL_ENTRY_INHERIT_ONLY | ACL_ENTRY_SUCCESSFUL_ACCESS | \
ACL_ENTRY_FAILED_ACCESS | ACL_ENTRY_INHERITED)
/*
* Undefined value in ae_id field. ae_id should be set to this value
* iff ae_tag is ACL_USER_OBJ, ACL_GROUP_OBJ, ACL_OTHER or ACL_EVERYONE.
*/
#define ACL_UNDEFINED_ID ((uid_t)-1)
/*
* Possible values for _flags parameter in acl_to_text_np(3).
*/
#define ACL_TEXT_VERBOSE 0x01
#define ACL_TEXT_NUMERIC_IDS 0x02
#define ACL_TEXT_APPEND_ID 0x04
/*
* POSIX.1e ACLs are capable of expressing the read, write, and execute bits
* of the POSIX mode field. We provide two masks: one that defines the bits
* the ACL will replace in the mode, and the other that defines the bits that
* must be preseved when an ACL is updating a mode.
*/
#define ACL_OVERRIDE_MASK (S_IRWXU | S_IRWXG | S_IRWXO)
#define ACL_PRESERVE_MASK (~ACL_OVERRIDE_MASK)
#ifdef _KERNEL
/*
* Filesystem-independent code to move back and forth between POSIX mode and
* POSIX.1e ACL representations.
*/
acl_perm_t acl_posix1e_mode_to_perm(acl_tag_t tag, mode_t mode);
struct acl_entry acl_posix1e_mode_to_entry(acl_tag_t tag, uid_t uid,
gid_t gid, mode_t mode);
mode_t acl_posix1e_perms_to_mode(
struct acl_entry *acl_user_obj_entry,
struct acl_entry *acl_group_obj_entry,
struct acl_entry *acl_other_entry);
mode_t acl_posix1e_acl_to_mode(struct acl *acl);
mode_t acl_posix1e_newfilemode(mode_t cmode,
struct acl *dacl);
struct acl *acl_alloc(int flags);
void acl_free(struct acl *aclp);
void acl_nfs4_sync_acl_from_mode(struct acl *aclp,
mode_t mode, int file_owner_id);
void acl_nfs4_sync_mode_from_acl(mode_t *mode,
const struct acl *aclp);
int acl_nfs4_is_trivial(const struct acl *aclp,
int file_owner_id);
void acl_nfs4_compute_inherited_acl(
const struct acl *parent_aclp,
struct acl *child_aclp, mode_t mode,
int file_owner_id, int is_directory);
int acl_copy_oldacl_into_acl(const struct oldacl *source,
struct acl *dest);
int acl_copy_acl_into_oldacl(const struct acl *source,
struct oldacl *dest);
/*
* To allocate 'struct acl', use acl_alloc()/acl_free() instead of this.
*/
MALLOC_DECLARE(M_ACL);
/*
* Filesystem-independent syntax check for a POSIX.1e ACL.
*/
int acl_posix1e_check(struct acl *acl);
int acl_nfs4_check(const struct acl *aclp, int is_directory);
#else /* !_KERNEL */
# 326 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 3 4
#if defined(_ACL_PRIVATE)
/*
* Syscall interface -- use the library calls instead as the syscalls have
* strict ACL entry ordering requirements.
*/
__BEGIN_DECLS
int __acl_aclcheck_fd(int _filedes, acl_type_t _type, struct acl *_aclp);
int __acl_aclcheck_file(const char *_path, acl_type_t _type,
struct acl *_aclp);
int __acl_aclcheck_link(const char *_path, acl_type_t _type,
struct acl *_aclp);
int __acl_delete_fd(int _filedes, acl_type_t _type);
int __acl_delete_file(const char *_path_p, acl_type_t _type);
int __acl_delete_link(const char *_path_p, acl_type_t _type);
int __acl_get_fd(int _filedes, acl_type_t _type, struct acl *_aclp);
int __acl_get_file(const char *_path, acl_type_t _type, struct acl *_aclp);
int __acl_get_link(const char *_path, acl_type_t _type, struct acl *_aclp);
int __acl_set_fd(int _filedes, acl_type_t _type, struct acl *_aclp);
int __acl_set_file(const char *_path, acl_type_t _type, struct acl *_aclp);
int __acl_set_link(const char *_path, acl_type_t _type, struct acl *_aclp);
__END_DECLS
#endif /* _ACL_PRIVATE */
# 351 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 3 4
/*
* Supported POSIX.1e ACL manipulation and assignment/retrieval API _np calls
* are local extensions that reflect an environment capable of opening file
* descriptors of directories, and allowing additional ACL type for different
* filesystems (i.e., AFS).
*/
__BEGIN_DECLS
int acl_add_flag_np(acl_flagset_t _flagset_d, acl_flag_t _flag);
int acl_add_perm(acl_permset_t _permset_d, acl_perm_t _perm);
int acl_calc_mask(acl_t *_acl_p);
int acl_clear_flags_np(acl_flagset_t _flagset_d);
int acl_clear_perms(acl_permset_t _permset_d);
int acl_copy_entry(acl_entry_t _dest_d, acl_entry_t _src_d);
ssize_t acl_copy_ext(void *_buf_p, acl_t _acl, ssize_t _size);
acl_t acl_copy_int(const void *_buf_p);
int acl_create_entry(acl_t *_acl_p, acl_entry_t *_entry_p);
int acl_create_entry_np(acl_t *_acl_p, acl_entry_t *_entry_p, int _index);
int acl_delete_entry(acl_t _acl, acl_entry_t _entry_d);
int acl_delete_entry_np(acl_t _acl, int _index);
int acl_delete_fd_np(int _filedes, acl_type_t _type);
int acl_delete_file_np(const char *_path_p, acl_type_t _type);
int acl_delete_link_np(const char *_path_p, acl_type_t _type);
int acl_delete_def_file(const char *_path_p);
int acl_delete_def_link_np(const char *_path_p);
int acl_delete_flag_np(acl_flagset_t _flagset_d, acl_flag_t _flag);
int acl_delete_perm(acl_permset_t _permset_d, acl_perm_t _perm);
acl_t acl_dup(acl_t _acl);
int acl_free(void *_obj_p);
acl_t acl_from_text(const char *_buf_p);
int acl_get_brand_np(acl_t _acl, int *_brand_p);
int acl_get_entry(acl_t _acl, int _entry_id, acl_entry_t *_entry_p);
acl_t acl_get_fd(int _fd);
acl_t acl_get_fd_np(int fd, acl_type_t _type);
acl_t acl_get_file(const char *_path_p, acl_type_t _type);
int acl_get_entry_type_np(acl_entry_t _entry_d, acl_entry_type_t *_entry_type_p);
acl_t acl_get_link_np(const char *_path_p, acl_type_t _type);
void *acl_get_qualifier(acl_entry_t _entry_d);
int acl_get_flag_np(acl_flagset_t _flagset_d, acl_flag_t _flag);
int acl_get_perm_np(acl_permset_t _permset_d, acl_perm_t _perm);
int acl_get_flagset_np(acl_entry_t _entry_d, acl_flagset_t *_flagset_p);
int acl_get_permset(acl_entry_t _entry_d, acl_permset_t *_permset_p);
int acl_get_tag_type(acl_entry_t _entry_d, acl_tag_t *_tag_type_p);
acl_t acl_init(int _count);
int acl_set_fd(int _fd, acl_t _acl);
int acl_set_fd_np(int _fd, acl_t _acl, acl_type_t _type);
int acl_set_file(const char *_path_p, acl_type_t _type, acl_t _acl);
int acl_set_entry_type_np(acl_entry_t _entry_d, acl_entry_type_t _entry_type);
int acl_set_link_np(const char *_path_p, acl_type_t _type, acl_t _acl);
int acl_set_flagset_np(acl_entry_t _entry_d, acl_flagset_t _flagset_d);
int acl_set_permset(acl_entry_t _entry_d, acl_permset_t _permset_d);
int acl_set_qualifier(acl_entry_t _entry_d, const void *_tag_qualifier_p);
int acl_set_tag_type(acl_entry_t _entry_d, acl_tag_t _tag_type);
ssize_t acl_size(acl_t _acl);
char *acl_to_text(acl_t _acl, ssize_t *_len_p);
char *acl_to_text_np(acl_t _acl, ssize_t *_len_p, int _flags);
int acl_valid(acl_t _acl);
int acl_valid_fd_np(int _fd, acl_type_t _type, acl_t _acl);
int acl_valid_file_np(const char *_path_p, acl_type_t _type, acl_t _acl);
int acl_valid_link_np(const char *_path_p, acl_type_t _type, acl_t _acl);
int acl_is_trivial_np(const acl_t _acl, int *_trivialp);
acl_t acl_strip_np(const acl_t _acl, int recalculate_mask);
__END_DECLS
#endif /* !_KERNEL */
# 416 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 3 4
#endif /* !_SYS_ACL_H_ */
# 418 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/acl.h" 3 4
# 10 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/cpuset.h>
#endif /* expanded by -frewrite-includes */
# 10 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cpuset.h" 1 3 4
/*-
* Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org>
* All rights reserved.
*
* Copyright (c) 2008 Nokia Corporation
* 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 unmodified, 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.
*
* $FreeBSD$
*/
#ifndef _SYS_CPUSET_H_
#define _SYS_CPUSET_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/_cpuset.h>
#endif /* expanded by -frewrite-includes */
# 35 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cpuset.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_cpuset.h" 1 3 4
/*-
* Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org>
* All rights reserved.
*
* Copyright (c) 2008 Nokia Corporation
* 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 unmodified, 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.
*
* $FreeBSD$
*/
#ifndef _SYS__CPUSET_H_
#define _SYS__CPUSET_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/_bitset.h>
#endif /* expanded by -frewrite-includes */
# 35 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_cpuset.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_bitset.h" 1 3 4
/*-
* Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org>
* All rights reserved.
*
* Copyright (c) 2008 Nokia Corporation
* 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 unmodified, 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.
*
* $FreeBSD$
*/
#ifndef _SYS__BITSET_H_
#define _SYS__BITSET_H_
/*
* Macros addressing word and bit within it, tuned to make compiler
* optimize cases when SETSIZE fits into single machine word.
*/
#define _BITSET_BITS (sizeof(long) * 8)
#define __howmany(x, y) (((x) + ((y) - 1)) / (y))
#define __bitset_words(_s) (__howmany(_s, _BITSET_BITS))
#define BITSET_DEFINE(t, _s) \
struct t { \
long __bits[__bitset_words((_s))]; \
}
/*
* Helper to declare a bitset without it's size being a constant.
*
* Sadly we cannot declare a bitset struct with '__bits[]', because it's
* the only member of the struct and the compiler complains.
*/
#define BITSET_DEFINE_VAR(t) BITSET_DEFINE(t, 1)
#endif /* !_SYS__BITSET_H_ */
# 59 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_bitset.h" 3 4
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_cpuset.h" 2 3 4
#ifdef _KERNEL
#define CPU_SETSIZE MAXCPU
#endif
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_cpuset.h" 3 4
#define CPU_MAXSIZE 256
#ifndef CPU_SETSIZE
#define CPU_SETSIZE CPU_MAXSIZE
#endif
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_cpuset.h" 3 4
BITSET_DEFINE(_cpuset, CPU_SETSIZE);
typedef struct _cpuset cpuset_t;
#endif /* !_SYS__CPUSET_H_ */
# 51 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_cpuset.h" 3 4
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cpuset.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/bitset.h>
#endif /* expanded by -frewrite-includes */
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cpuset.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/bitset.h" 1 3 4
/*-
* Copyright (c) 2008, Jeffrey Roberson <jeff@freebsd.org>
* All rights reserved.
*
* Copyright (c) 2008 Nokia Corporation
* 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 unmodified, 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.
*
* $FreeBSD$
*/
#ifndef _SYS_BITSET_H_
#define _SYS_BITSET_H_
#define __bitset_mask(_s, n) \
(1L << ((__bitset_words((_s)) == 1) ? \
(__size_t)(n) : ((n) % _BITSET_BITS)))
#define __bitset_word(_s, n) \
((__bitset_words((_s)) == 1) ? 0 : ((n) / _BITSET_BITS))
#define BIT_CLR(_s, n, p) \
((p)->__bits[__bitset_word(_s, n)] &= ~__bitset_mask((_s), (n)))
#define BIT_COPY(_s, f, t) (void)(*(t) = *(f))
#define BIT_ISSET(_s, n, p) \
((((p)->__bits[__bitset_word(_s, n)] & __bitset_mask((_s), (n))) != 0))
#define BIT_SET(_s, n, p) \
((p)->__bits[__bitset_word(_s, n)] |= __bitset_mask((_s), (n)))
#define BIT_ZERO(_s, p) do { \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
(p)->__bits[__i] = 0L; \
} while (0)
#define BIT_FILL(_s, p) do { \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
(p)->__bits[__i] = -1L; \
} while (0)
#define BIT_SETOF(_s, n, p) do { \
BIT_ZERO(_s, p); \
(p)->__bits[__bitset_word(_s, n)] = __bitset_mask((_s), (n)); \
} while (0)
/* Is p empty. */
#define BIT_EMPTY(_s, p) __extension__ ({ \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
if ((p)->__bits[__i]) \
break; \
__i == __bitset_words((_s)); \
})
/* Is p full set. */
#define BIT_ISFULLSET(_s, p) __extension__ ({ \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
if ((p)->__bits[__i] != (long)-1) \
break; \
__i == __bitset_words((_s)); \
})
/* Is c a subset of p. */
#define BIT_SUBSET(_s, p, c) __extension__ ({ \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
if (((c)->__bits[__i] & \
(p)->__bits[__i]) != \
(c)->__bits[__i]) \
break; \
__i == __bitset_words((_s)); \
})
/* Are there any common bits between b & c? */
#define BIT_OVERLAP(_s, p, c) __extension__ ({ \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
if (((c)->__bits[__i] & \
(p)->__bits[__i]) != 0) \
break; \
__i != __bitset_words((_s)); \
})
/* Compare two sets, returns 0 if equal 1 otherwise. */
#define BIT_CMP(_s, p, c) __extension__ ({ \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
if (((c)->__bits[__i] != \
(p)->__bits[__i])) \
break; \
__i != __bitset_words((_s)); \
})
#define BIT_OR(_s, d, s) do { \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
(d)->__bits[__i] |= (s)->__bits[__i]; \
} while (0)
#define BIT_AND(_s, d, s) do { \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
(d)->__bits[__i] &= (s)->__bits[__i]; \
} while (0)
#define BIT_NAND(_s, d, s) do { \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
(d)->__bits[__i] &= ~(s)->__bits[__i]; \
} while (0)
#define BIT_CLR_ATOMIC(_s, n, p) \
atomic_clear_long(&(p)->__bits[__bitset_word(_s, n)], \
__bitset_mask((_s), n))
#define BIT_SET_ATOMIC(_s, n, p) \
atomic_set_long(&(p)->__bits[__bitset_word(_s, n)], \
__bitset_mask((_s), n))
#define BIT_SET_ATOMIC_ACQ(_s, n, p) \
atomic_set_acq_long(&(p)->__bits[__bitset_word(_s, n)], \
__bitset_mask((_s), n))
/* Convenience functions catering special cases. */
#define BIT_AND_ATOMIC(_s, d, s) do { \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
atomic_clear_long(&(d)->__bits[__i], \
~(s)->__bits[__i]); \
} while (0)
#define BIT_OR_ATOMIC(_s, d, s) do { \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
atomic_set_long(&(d)->__bits[__i], \
(s)->__bits[__i]); \
} while (0)
#define BIT_COPY_STORE_REL(_s, f, t) do { \
__size_t __i; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
atomic_store_rel_long(&(t)->__bits[__i], \
(f)->__bits[__i]); \
} while (0)
#define BIT_FFS(_s, p) __extension__ ({ \
__size_t __i; \
int __bit; \
\
__bit = 0; \
for (__i = 0; __i < __bitset_words((_s)); __i++) { \
if ((p)->__bits[__i] != 0) { \
__bit = ffsl((p)->__bits[__i]); \
__bit += __i * _BITSET_BITS; \
break; \
} \
} \
__bit; \
})
#define BIT_COUNT(_s, p) __extension__ ({ \
__size_t __i; \
int __count; \
\
__count = 0; \
for (__i = 0; __i < __bitset_words((_s)); __i++) \
__count += __bitcountl((p)->__bits[__i]); \
__count; \
})
#define BITSET_T_INITIALIZER(x) \
{ .__bits = { x } }
#define BITSET_FSET(n) \
[ 0 ... ((n) - 1) ] = (-1L)
/*
* Dynamically allocate a bitset.
*/
#define BITSET_ALLOC(_s, mt, mf) \
malloc(__bitset_words(_s) * sizeof(long), mt, (mf))
#endif /* !_SYS_BITSET_H_ */
# 209 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/bitset.h" 3 4
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cpuset.h" 2 3 4
#define _NCPUBITS _BITSET_BITS
#define _NCPUWORDS __bitset_words(CPU_SETSIZE)
#define CPUSETBUFSIZ ((2 + sizeof(long) * 2) * _NCPUWORDS)
#define CPU_CLR(n, p) BIT_CLR(CPU_SETSIZE, n, p)
#define CPU_COPY(f, t) BIT_COPY(CPU_SETSIZE, f, t)
#define CPU_ISSET(n, p) BIT_ISSET(CPU_SETSIZE, n, p)
#define CPU_SET(n, p) BIT_SET(CPU_SETSIZE, n, p)
#define CPU_ZERO(p) BIT_ZERO(CPU_SETSIZE, p)
#define CPU_FILL(p) BIT_FILL(CPU_SETSIZE, p)
#define CPU_SETOF(n, p) BIT_SETOF(CPU_SETSIZE, n, p)
#define CPU_EMPTY(p) BIT_EMPTY(CPU_SETSIZE, p)
#define CPU_ISFULLSET(p) BIT_ISFULLSET(CPU_SETSIZE, p)
#define CPU_SUBSET(p, c) BIT_SUBSET(CPU_SETSIZE, p, c)
#define CPU_OVERLAP(p, c) BIT_OVERLAP(CPU_SETSIZE, p, c)
#define CPU_CMP(p, c) BIT_CMP(CPU_SETSIZE, p, c)
#define CPU_OR(d, s) BIT_OR(CPU_SETSIZE, d, s)
#define CPU_AND(d, s) BIT_AND(CPU_SETSIZE, d, s)
#define CPU_NAND(d, s) BIT_NAND(CPU_SETSIZE, d, s)
#define CPU_CLR_ATOMIC(n, p) BIT_CLR_ATOMIC(CPU_SETSIZE, n, p)
#define CPU_SET_ATOMIC(n, p) BIT_SET_ATOMIC(CPU_SETSIZE, n, p)
#define CPU_SET_ATOMIC_ACQ(n, p) BIT_SET_ATOMIC_ACQ(CPU_SETSIZE, n, p)
#define CPU_AND_ATOMIC(n, p) BIT_AND_ATOMIC(CPU_SETSIZE, n, p)
#define CPU_OR_ATOMIC(d, s) BIT_OR_ATOMIC(CPU_SETSIZE, d, s)
#define CPU_COPY_STORE_REL(f, t) BIT_COPY_STORE_REL(CPU_SETSIZE, f, t)
#define CPU_FFS(p) BIT_FFS(CPU_SETSIZE, p)
#define CPU_COUNT(p) BIT_COUNT(CPU_SETSIZE, p)
#define CPUSET_FSET BITSET_FSET(_NCPUWORDS)
#define CPUSET_T_INITIALIZER BITSET_T_INITIALIZER
/*
* Valid cpulevel_t values.
*/
#define CPU_LEVEL_ROOT 1 /* All system cpus. */
#define CPU_LEVEL_CPUSET 2 /* Available cpus for which. */
#define CPU_LEVEL_WHICH 3 /* Actual mask/id for which. */
/*
* Valid cpuwhich_t values.
*/
#define CPU_WHICH_TID 1 /* Specifies a thread id. */
#define CPU_WHICH_PID 2 /* Specifies a process id. */
#define CPU_WHICH_CPUSET 3 /* Specifies a set id. */
#define CPU_WHICH_IRQ 4 /* Specifies an irq #. */
#define CPU_WHICH_JAIL 5 /* Specifies a jail id. */
#define CPU_WHICH_DOMAIN 6 /* Specifies a NUMA domain id. */
/*
* Reserved cpuset identifiers.
*/
#define CPUSET_INVALID -1
#define CPUSET_DEFAULT 0
#ifdef _KERNEL
#if 0 /* expanded by -frewrite-includes */
#include <sys/queue.h>
#endif /* expanded by -frewrite-includes */
# 94 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cpuset.h" 3 4
# 95 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cpuset.h" 3 4
LIST_HEAD(setlist, cpuset);
/*
* cpusets encapsulate cpu binding information for one or more threads.
*
* a - Accessed with atomics.
* s - Set at creation, never modified. Only a ref required to read.
* c - Locked internally by a cpuset lock.
*
* The bitmask is only modified while holding the cpuset lock. It may be
* read while only a reference is held but the consumer must be prepared
* to deal with inconsistent results.
*/
struct cpuset {
cpuset_t cs_mask; /* bitmask of valid cpus. */
volatile u_int cs_ref; /* (a) Reference count. */
int cs_flags; /* (s) Flags from below. */
cpusetid_t cs_id; /* (s) Id or INVALID. */
struct cpuset *cs_parent; /* (s) Pointer to our parent. */
LIST_ENTRY(cpuset) cs_link; /* (c) All identified sets. */
LIST_ENTRY(cpuset) cs_siblings; /* (c) Sibling set link. */
struct setlist cs_children; /* (c) List of children. */
};
#define CPU_SET_ROOT 0x0001 /* Set is a root set. */
#define CPU_SET_RDONLY 0x0002 /* No modification allowed. */
extern cpuset_t *cpuset_root;
struct prison;
struct proc;
struct thread;
struct cpuset *cpuset_thread0(void);
struct cpuset *cpuset_ref(struct cpuset *);
void cpuset_rel(struct cpuset *);
int cpuset_setthread(lwpid_t id, cpuset_t *);
int cpuset_setithread(lwpid_t id, int cpu);
int cpuset_create_root(struct prison *, struct cpuset **);
int cpuset_setproc_update_set(struct proc *, struct cpuset *);
int cpuset_which(cpuwhich_t, id_t, struct proc **,
struct thread **, struct cpuset **);
char *cpusetobj_strprint(char *, const cpuset_t *);
int cpusetobj_strscan(cpuset_t *, const char *);
#ifdef DDB
void ddb_display_cpuset(const cpuset_t *);
#endif
# 143 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cpuset.h" 3 4
#else
# 145 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cpuset.h" 3 4
__BEGIN_DECLS
int cpuset(cpusetid_t *);
int cpuset_setid(cpuwhich_t, id_t, cpusetid_t);
int cpuset_getid(cpulevel_t, cpuwhich_t, id_t, cpusetid_t *);
int cpuset_getaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, cpuset_t *);
int cpuset_setaffinity(cpulevel_t, cpuwhich_t, id_t, size_t, const cpuset_t *);
__END_DECLS
#endif
# 153 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cpuset.h" 3 4
#endif /* !_SYS_CPUSET_H_ */
# 154 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/cpuset.h" 3 4
# 11 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_ffcounter.h>
#endif /* expanded by -frewrite-includes */
# 11 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_ffcounter.h" 1 3 4
/*-
* Copyright (c) 2011 The University of Melbourne
* All rights reserved.
*
* This software was developed by Julien Ridoux at the University of Melbourne
* 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.
*
* $FreeBSD$
*/
#ifndef _SYS__FFCOUNTER_H_
#define _SYS__FFCOUNTER_H_
/*
* The feed-forward clock counter. The fundamental element of a feed-forward
* clock is a wide monotonically increasing counter that accumulates at the same
* rate as the selected timecounter.
*/
typedef uint64_t ffcounter;
#endif /* _SYS__FFCOUNTER_H_ */
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_ffcounter.h" 3 4
# 12 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_semaphore.h>
#endif /* expanded by -frewrite-includes */
# 12 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_semaphore.h" 1 3 4
/*-
* Copyright (c) 2002 Alfred Perlstein <alfred@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.
*
* $FreeBSD$
*/
#ifndef __SEMAPHORE_H_
#define __SEMAPHORE_H_
typedef intptr_t semid_t;
struct timespec;
#define SEM_VALUE_MAX __INT_MAX
#ifndef _KERNEL
__BEGIN_DECLS
int ksem_close(semid_t id);
int ksem_post(semid_t id);
int ksem_wait(semid_t id);
int ksem_trywait(semid_t id);
int ksem_timedwait(semid_t id, const struct timespec *abstime);
int ksem_init(semid_t *idp, unsigned int value);
int ksem_open(semid_t *idp, const char *name, int oflag, mode_t mode,
unsigned int value);
int ksem_unlink(const char *name);
int ksem_getvalue(semid_t id, int *val);
int ksem_destroy(semid_t id);
__END_DECLS
#endif /* !_KERNEL */
# 55 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_semaphore.h" 3 4
#endif /* __SEMAPHORE_H_ */
# 57 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_semaphore.h" 3 4
# 13 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/socket.h>
#endif /* expanded by -frewrite-includes */
# 13 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 1 3 4
/*-
* Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
* 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.
* 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.
*
* @(#)socket.h 8.4 (Berkeley) 2/21/94
* $FreeBSD$
*/
#ifndef _SYS_SOCKET_H_
#define _SYS_SOCKET_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_iovec.h>
#endif /* expanded by -frewrite-includes */
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_iovec.h" 1 3 4
/*-
* Copyright (c) 1982, 1986, 1993, 1994
* 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.
* 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.
*
* @(#)uio.h 8.5 (Berkeley) 2/22/94
* $FreeBSD$
*/
#ifndef _SYS__IOVEC_H_
#define _SYS__IOVEC_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_iovec.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_iovec.h" 3 4
#ifndef _SIZE_T_DECLARED
typedef __size_t size_t;
#define _SIZE_T_DECLARED
#endif
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_iovec.h" 3 4
struct iovec {
void *iov_base; /* Base address. */
size_t iov_len; /* Length. */
};
#endif /* !_SYS__IOVEC_H_ */
# 49 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_iovec.h" 3 4
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <machine/_align.h>
#endif /* expanded by -frewrite-includes */
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/*
* Definitions related to sockets: types, address families, options.
*/
/*
* Data types.
*/
#if __BSD_VISIBLE
#ifndef _GID_T_DECLARED
typedef __gid_t gid_t;
#define _GID_T_DECLARED
#endif
# 53 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#ifndef _OFF_T_DECLARED
typedef __off_t off_t;
#define _OFF_T_DECLARED
#endif
# 58 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#ifndef _PID_T_DECLARED
typedef __pid_t pid_t;
#define _PID_T_DECLARED
#endif
# 63 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#endif
# 64 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#ifndef _SA_FAMILY_T_DECLARED
typedef __sa_family_t sa_family_t;
#define _SA_FAMILY_T_DECLARED
#endif
# 69 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#ifndef _SOCKLEN_T_DECLARED
typedef __socklen_t socklen_t;
#define _SOCKLEN_T_DECLARED
#endif
# 74 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#ifndef _SSIZE_T_DECLARED
typedef __ssize_t ssize_t;
#define _SSIZE_T_DECLARED
#endif
# 79 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#if __BSD_VISIBLE
#ifndef _UID_T_DECLARED
typedef __uid_t uid_t;
#define _UID_T_DECLARED
#endif
# 85 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#endif
# 86 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#ifndef _UINT32_T_DECLARED
typedef __uint32_t uint32_t;
#define _UINT32_T_DECLARED
#endif
# 91 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#ifndef _UINTPTR_T_DECLARED
typedef __uintptr_t uintptr_t;
#define _UINTPTR_T_DECLARED
#endif
# 96 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/*
* Types
*/
#define SOCK_STREAM 1 /* stream socket */
#define SOCK_DGRAM 2 /* datagram socket */
#define SOCK_RAW 3 /* raw-protocol interface */
#if __BSD_VISIBLE
#define SOCK_RDM 4 /* reliably-delivered message */
#endif
# 106 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#define SOCK_SEQPACKET 5 /* sequenced packet stream */
#if __BSD_VISIBLE
/*
* Creation flags, OR'ed into socket() and socketpair() type argument.
*/
#define SOCK_CLOEXEC 0x10000000
#define SOCK_NONBLOCK 0x20000000
#endif
# 115 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/*
* Option flags per-socket.
*/
#define SO_DEBUG 0x0001 /* turn on debugging info recording */
#define SO_ACCEPTCONN 0x0002 /* socket has had listen() */
#define SO_REUSEADDR 0x0004 /* allow local address reuse */
#define SO_KEEPALIVE 0x0008 /* keep connections alive */
#define SO_DONTROUTE 0x0010 /* just use interface addresses */
#define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */
#if __BSD_VISIBLE
#define SO_USELOOPBACK 0x0040 /* bypass hardware when possible */
#endif
# 128 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#define SO_LINGER 0x0080 /* linger on close if data present */
#define SO_OOBINLINE 0x0100 /* leave received OOB data in line */
#if __BSD_VISIBLE
#define SO_REUSEPORT 0x0200 /* allow local address & port reuse */
#define SO_TIMESTAMP 0x0400 /* timestamp received dgram traffic */
#define SO_NOSIGPIPE 0x0800 /* no SIGPIPE from EPIPE */
#define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */
#define SO_BINTIME 0x2000 /* timestamp received dgram traffic */
#endif
# 137 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#define SO_NO_OFFLOAD 0x4000 /* socket cannot be offloaded */
#define SO_NO_DDP 0x8000 /* disable direct data placement */
/*
* Additional options, not kept in so_options.
*/
#define SO_SNDBUF 0x1001 /* send buffer size */
#define SO_RCVBUF 0x1002 /* receive buffer size */
#define SO_SNDLOWAT 0x1003 /* send low-water mark */
#define SO_RCVLOWAT 0x1004 /* receive low-water mark */
#define SO_SNDTIMEO 0x1005 /* send timeout */
#define SO_RCVTIMEO 0x1006 /* receive timeout */
#define SO_ERROR 0x1007 /* get error status and clear */
#define SO_TYPE 0x1008 /* get socket type */
#if __BSD_VISIBLE
#define SO_LABEL 0x1009 /* socket's MAC label */
#define SO_PEERLABEL 0x1010 /* socket's peer's MAC label */
#define SO_LISTENQLIMIT 0x1011 /* socket's backlog limit */
#define SO_LISTENQLEN 0x1012 /* socket's complete queue length */
#define SO_LISTENINCQLEN 0x1013 /* socket's incomplete queue length */
#define SO_SETFIB 0x1014 /* use this FIB to route */
#define SO_USER_COOKIE 0x1015 /* user cookie (dummynet etc.) */
#define SO_PROTOCOL 0x1016 /* get socket protocol (Linux name) */
#define SO_PROTOTYPE SO_PROTOCOL /* alias for SO_PROTOCOL (SunOS name) */
#endif
# 162 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/*
* Space reserved for new socket options added by third-party vendors.
* This range applies to all socket option levels. New socket options
* in FreeBSD should always use an option value less than SO_VENDOR.
*/
#if __BSD_VISIBLE
#define SO_VENDOR 0x80000000
#endif
# 171 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/*
* Structure used for manipulating linger option.
*/
struct linger {
int l_onoff; /* option on/off */
int l_linger; /* linger time */
};
#if __BSD_VISIBLE
struct accept_filter_arg {
char af_name[16];
char af_arg[256-16];
};
#endif
# 186 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/*
* Level number for (get/set)sockopt() to apply to socket itself.
*/
#define SOL_SOCKET 0xffff /* options for socket level */
/*
* Address families.
*/
#define AF_UNSPEC 0 /* unspecified */
#if __BSD_VISIBLE
#define AF_LOCAL AF_UNIX /* local to host (pipes, portals) */
#endif
# 199 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#define AF_UNIX 1 /* standardized name for AF_LOCAL */
#define AF_INET 2 /* internetwork: UDP, TCP, etc. */
#if __BSD_VISIBLE
#define AF_IMPLINK 3 /* arpanet imp addresses */
#define AF_PUP 4 /* pup protocols: e.g. BSP */
#define AF_CHAOS 5 /* mit CHAOS protocols */
#define AF_NETBIOS 6 /* SMB protocols */
#define AF_ISO 7 /* ISO protocols */
#define AF_OSI AF_ISO
#define AF_ECMA 8 /* European computer manufacturers */
#define AF_DATAKIT 9 /* datakit protocols */
#define AF_CCITT 10 /* CCITT protocols, X.25 etc */
#define AF_SNA 11 /* IBM SNA */
#define AF_DECnet 12 /* DECnet */
#define AF_DLI 13 /* DEC Direct data link interface */
#define AF_LAT 14 /* LAT */
#define AF_HYLINK 15 /* NSC Hyperchannel */
#define AF_APPLETALK 16 /* Apple Talk */
#define AF_ROUTE 17 /* Internal Routing Protocol */
#define AF_LINK 18 /* Link layer interface */
#define pseudo_AF_XTP 19 /* eXpress Transfer Protocol (no AF) */
#define AF_COIP 20 /* connection-oriented IP, aka ST II */
#define AF_CNT 21 /* Computer Network Technology */
#define pseudo_AF_RTIP 22 /* Help Identify RTIP packets */
#define AF_IPX 23 /* Novell Internet Protocol */
#define AF_SIP 24 /* Simple Internet Protocol */
#define pseudo_AF_PIP 25 /* Help Identify PIP packets */
#define AF_ISDN 26 /* Integrated Services Digital Network*/
#define AF_E164 AF_ISDN /* CCITT E.164 recommendation */
#define pseudo_AF_KEY 27 /* Internal key-management function */
#endif
# 230 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#define AF_INET6 28 /* IPv6 */
#if __BSD_VISIBLE
#define AF_NATM 29 /* native ATM access */
#define AF_ATM 30 /* ATM */
#define pseudo_AF_HDRCMPLT 31 /* Used by BPF to not rewrite headers
* in interface output routine
*/
#define AF_NETGRAPH 32 /* Netgraph sockets */
#define AF_SLOW 33 /* 802.3ad slow protocol */
#define AF_SCLUSTER 34 /* Sitara cluster protocol */
#define AF_ARP 35
#define AF_BLUETOOTH 36 /* Bluetooth sockets */
#define AF_IEEE80211 37 /* IEEE 802.11 protocol */
#define AF_INET_SDP 40 /* OFED Socket Direct Protocol ipv4 */
#define AF_INET6_SDP 42 /* OFED Socket Direct Protocol ipv6 */
#define AF_MAX 42
/*
* When allocating a new AF_ constant, please only allocate
* even numbered constants for FreeBSD until 134 as odd numbered AF_
* constants 39-133 are now reserved for vendors.
*/
#define AF_VENDOR00 39
#define AF_VENDOR01 41
#define AF_VENDOR02 43
#define AF_VENDOR03 45
#define AF_VENDOR04 47
#define AF_VENDOR05 49
#define AF_VENDOR06 51
#define AF_VENDOR07 53
#define AF_VENDOR08 55
#define AF_VENDOR09 57
#define AF_VENDOR10 59
#define AF_VENDOR11 61
#define AF_VENDOR12 63
#define AF_VENDOR13 65
#define AF_VENDOR14 67
#define AF_VENDOR15 69
#define AF_VENDOR16 71
#define AF_VENDOR17 73
#define AF_VENDOR18 75
#define AF_VENDOR19 77
#define AF_VENDOR20 79
#define AF_VENDOR21 81
#define AF_VENDOR22 83
#define AF_VENDOR23 85
#define AF_VENDOR24 87
#define AF_VENDOR25 89
#define AF_VENDOR26 91
#define AF_VENDOR27 93
#define AF_VENDOR28 95
#define AF_VENDOR29 97
#define AF_VENDOR30 99
#define AF_VENDOR31 101
#define AF_VENDOR32 103
#define AF_VENDOR33 105
#define AF_VENDOR34 107
#define AF_VENDOR35 109
#define AF_VENDOR36 111
#define AF_VENDOR37 113
#define AF_VENDOR38 115
#define AF_VENDOR39 117
#define AF_VENDOR40 119
#define AF_VENDOR41 121
#define AF_VENDOR42 123
#define AF_VENDOR43 125
#define AF_VENDOR44 127
#define AF_VENDOR45 129
#define AF_VENDOR46 131
#define AF_VENDOR47 133
#endif
# 300 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/*
* Structure used by kernel to store most
* addresses.
*/
struct sockaddr {
unsigned char sa_len; /* total length */
sa_family_t sa_family; /* address family */
char sa_data[14]; /* actually longer; address value */
};
#if __BSD_VISIBLE
#define SOCK_MAXADDRLEN 255 /* longest possible addresses */
/*
* Structure used by kernel to pass protocol
* information in raw sockets.
*/
struct sockproto {
unsigned short sp_family; /* address family */
unsigned short sp_protocol; /* protocol */
};
#endif
# 322 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_sockaddr_storage.h>
#endif /* expanded by -frewrite-includes */
# 323 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_sockaddr_storage.h" 1 3 4
/*-
* Copyright (c) 1982, 1985, 1986, 1988, 1993, 1994
* 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.
* 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.
*
* @(#)socket.h 8.4 (Berkeley) 2/21/94
* $FreeBSD$
*/
#ifndef _SYS__SOCKADDR_STORAGE_H_
#define _SYS__SOCKADDR_STORAGE_H_
/*
* RFC 2553: protocol-independent placeholder for socket addresses
*/
#define _SS_MAXSIZE 128U
#define _SS_ALIGNSIZE (sizeof(__int64_t))
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(unsigned char) - \
sizeof(sa_family_t))
#define _SS_PAD2SIZE (_SS_MAXSIZE - sizeof(unsigned char) - \
sizeof(sa_family_t) - _SS_PAD1SIZE - _SS_ALIGNSIZE)
struct sockaddr_storage {
unsigned char ss_len; /* address length */
sa_family_t ss_family; /* address family */
char __ss_pad1[_SS_PAD1SIZE];
__int64_t __ss_align; /* force desired struct alignment */
char __ss_pad2[_SS_PAD2SIZE];
};
#endif /* !_SYS__SOCKADDR_STORAGE_H_ */
# 55 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_sockaddr_storage.h" 3 4
# 324 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 2 3 4
#if __BSD_VISIBLE
/*
* Protocol families, same as address families for now.
*/
#define PF_UNSPEC AF_UNSPEC
#define PF_LOCAL AF_LOCAL
#define PF_UNIX PF_LOCAL /* backward compatibility */
#define PF_INET AF_INET
#define PF_IMPLINK AF_IMPLINK
#define PF_PUP AF_PUP
#define PF_CHAOS AF_CHAOS
#define PF_NETBIOS AF_NETBIOS
#define PF_ISO AF_ISO
#define PF_OSI AF_ISO
#define PF_ECMA AF_ECMA
#define PF_DATAKIT AF_DATAKIT
#define PF_CCITT AF_CCITT
#define PF_SNA AF_SNA
#define PF_DECnet AF_DECnet
#define PF_DLI AF_DLI
#define PF_LAT AF_LAT
#define PF_HYLINK AF_HYLINK
#define PF_APPLETALK AF_APPLETALK
#define PF_ROUTE AF_ROUTE
#define PF_LINK AF_LINK
#define PF_XTP pseudo_AF_XTP /* really just proto family, no AF */
#define PF_COIP AF_COIP
#define PF_CNT AF_CNT
#define PF_SIP AF_SIP
#define PF_IPX AF_IPX
#define PF_RTIP pseudo_AF_RTIP /* same format as AF_INET */
#define PF_PIP pseudo_AF_PIP
#define PF_ISDN AF_ISDN
#define PF_KEY pseudo_AF_KEY
#define PF_INET6 AF_INET6
#define PF_NATM AF_NATM
#define PF_ATM AF_ATM
#define PF_NETGRAPH AF_NETGRAPH
#define PF_SLOW AF_SLOW
#define PF_SCLUSTER AF_SCLUSTER
#define PF_ARP AF_ARP
#define PF_BLUETOOTH AF_BLUETOOTH
#define PF_IEEE80211 AF_IEEE80211
#define PF_INET_SDP AF_INET_SDP
#define PF_INET6_SDP AF_INET6_SDP
#define PF_MAX AF_MAX
/*
* Definitions for network related sysctl, CTL_NET.
*
* Second level is protocol family.
* Third level is protocol number.
*
* Further levels are defined by the individual families.
*/
/*
* PF_ROUTE - Routing table
*
* Three additional levels are defined:
* Fourth: address family, 0 is wildcard
* Fifth: type of info, defined below
* Sixth: flag(s) to mask with for NET_RT_FLAGS
*/
#define NET_RT_DUMP 1 /* dump; may limit to a.f. */
#define NET_RT_FLAGS 2 /* by flags, e.g. RESOLVING */
#define NET_RT_IFLIST 3 /* survey interface list */
#define NET_RT_IFMALIST 4 /* return multicast address list */
#define NET_RT_IFLISTL 5 /* Survey interface list, using 'l'en
* versions of msghdr structs. */
#endif /* __BSD_VISIBLE */
# 397 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/*
* Maximum queue length specifiable by listen.
*/
#define SOMAXCONN 128
/*
* Message header for recvmsg and sendmsg calls.
* Used value-result for recvmsg, value only for sendmsg.
*/
struct msghdr {
void *msg_name; /* optional address */
socklen_t msg_namelen; /* size of address */
struct iovec *msg_iov; /* scatter/gather array */
int msg_iovlen; /* # elements in msg_iov */
void *msg_control; /* ancillary data, see below */
socklen_t msg_controllen; /* ancillary data buffer len */
int msg_flags; /* flags on received message */
};
#define MSG_OOB 0x1 /* process out-of-band data */
#define MSG_PEEK 0x2 /* peek at incoming message */
#define MSG_DONTROUTE 0x4 /* send without using routing tables */
#define MSG_EOR 0x8 /* data completes record */
#define MSG_TRUNC 0x10 /* data discarded before delivery */
#define MSG_CTRUNC 0x20 /* control data lost before delivery */
#define MSG_WAITALL 0x40 /* wait for full request or error */
#if __POSIX_VISIBLE >= 200809
#define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */
#endif
# 427 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#if __BSD_VISIBLE
#define MSG_DONTWAIT 0x80 /* this message should be nonblocking */
#define MSG_EOF 0x100 /* data completes connection */
#define MSG_NOTIFICATION 0x2000 /* SCTP notification */
#define MSG_NBIO 0x4000 /* FIONBIO mode, used by fifofs */
#define MSG_COMPAT 0x8000 /* used in sendit() */
#define MSG_CMSG_CLOEXEC 0x40000 /* make received fds close-on-exec */
#define MSG_WAITFORONE 0x80000 /* for recvmmsg() */
#endif
# 436 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#ifdef _KERNEL
#define MSG_SOCALLBCK 0x10000 /* for use by socket callbacks - soreceive (TCP) */
#endif
# 439 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/*
* Header for ancillary data objects in msg_control buffer.
* Used for additional information with/about a datagram
* not expressible by flags. The format is a sequence
* of message elements headed by cmsghdr structures.
*/
struct cmsghdr {
socklen_t cmsg_len; /* data byte count, including hdr */
int cmsg_level; /* originating protocol */
int cmsg_type; /* protocol-specific type */
/* followed by u_char cmsg_data[]; */
};
#if __BSD_VISIBLE
/*
* While we may have more groups than this, the cmsgcred struct must
* be able to fit in an mbuf and we have historically supported a
* maximum of 16 groups.
*/
#define CMGROUP_MAX 16
/*
* Credentials structure, used to verify the identity of a peer
* process that has sent us a message. This is allocated by the
* peer process but filled in by the kernel. This prevents the
* peer from lying about its identity. (Note that cmcred_groups[0]
* is the effective GID.)
*/
struct cmsgcred {
pid_t cmcred_pid; /* PID of sending process */
uid_t cmcred_uid; /* real UID of sending process */
uid_t cmcred_euid; /* effective UID of sending process */
gid_t cmcred_gid; /* real GID of sending process */
short cmcred_ngroups; /* number or groups */
gid_t cmcred_groups[CMGROUP_MAX]; /* groups */
};
/*
* Socket credentials.
*/
struct sockcred {
uid_t sc_uid; /* real user id */
uid_t sc_euid; /* effective user id */
gid_t sc_gid; /* real group id */
gid_t sc_egid; /* effective group id */
int sc_ngroups; /* number of supplemental groups */
gid_t sc_groups[1]; /* variable length */
};
/*
* Compute size of a sockcred structure with groups.
*/
#define SOCKCREDSIZE(ngrps) \
(sizeof(struct sockcred) + (sizeof(gid_t) * ((ngrps) - 1)))
#endif /* __BSD_VISIBLE */
# 496 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#ifndef __CHERI_PURE_CAPABILITY__
#define _CMSG_ALIGN(n) _ALIGN(n)
#else
# 500 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/*
* Don't align for capabilities in CheriABI. Sending them makes little
* sense and would be a major potential security hole.
*/
#define _CMSG_ALIGNBYTES (sizeof(u_long) - 1)
#define _CMSG_ALIGN(n) (((uintptr_t)(n) + _CMSG_ALIGNBYTES) &~ (uintptr_t)_CMSG_ALIGNBYTES)
#endif
# 507 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/* given pointer to struct cmsghdr, return pointer to data */
#define CMSG_DATA(cmsg) ((unsigned char *)(cmsg) + \
_CMSG_ALIGN(sizeof(struct cmsghdr)))
/* given pointer to struct cmsghdr, return pointer to next cmsghdr */
#define CMSG_NXTHDR(mhdr, cmsg) \
((char *)(cmsg) == (char *)0 ? CMSG_FIRSTHDR(mhdr) : \
((char *)(cmsg) + \
_CMSG_ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len) + \
_CMSG_ALIGN(sizeof(struct cmsghdr)) > \
(char *)(mhdr)->msg_control + (mhdr)->msg_controllen) ? \
(struct cmsghdr *)0 : \
(struct cmsghdr *)(void *)((char *)(cmsg) + \
_CMSG_ALIGN(((struct cmsghdr *)(cmsg))->cmsg_len)))
/*
* RFC 2292 requires to check msg_controllen, in case that the kernel returns
* an empty list for some reasons.
*/
#define CMSG_FIRSTHDR(mhdr) \
((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
(struct cmsghdr *)(mhdr)->msg_control : \
(struct cmsghdr *)0)
#if __BSD_VISIBLE
/* RFC 2292 additions */
#define CMSG_SPACE(l) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + _CMSG_ALIGN(l))
#define CMSG_LEN(l) (_CMSG_ALIGN(sizeof(struct cmsghdr)) + (l))
#endif
# 537 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#ifdef _KERNEL
#define CMSG_ALIGN(n) _CMSG_ALIGN(n)
#endif
# 541 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/* "Socket"-level control message types: */
#define SCM_RIGHTS 0x01 /* access rights (array of int) */
#if __BSD_VISIBLE
#define SCM_TIMESTAMP 0x02 /* timestamp (struct timeval) */
#define SCM_CREDS 0x03 /* process creds (struct cmsgcred) */
#define SCM_BINTIME 0x04 /* timestamp (struct bintime) */
#endif
# 549 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#if __BSD_VISIBLE
/*
* 4.3 compat sockaddr, move to compat file later
*/
struct osockaddr {
unsigned short sa_family; /* address family */
char sa_data[14]; /* up to 14 bytes of direct address */
};
/*
* 4.3-compat message header (move to compat file later).
*/
struct omsghdr {
char *msg_name; /* optional address */
int msg_namelen; /* size of address */
struct iovec *msg_iov; /* scatter/gather array */
int msg_iovlen; /* # elements in msg_iov */
char *msg_accrights; /* access rights sent/received */
int msg_accrightslen;
};
#endif
# 571 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/*
* howto arguments for shutdown(2), specified by Posix.1g.
*/
#define SHUT_RD 0 /* shut down the reading side */
#define SHUT_WR 1 /* shut down the writing side */
#define SHUT_RDWR 2 /* shut down both sides */
#if __BSD_VISIBLE
/* for SCTP */
/* we cheat and use the SHUT_XX defines for these */
#define PRU_FLUSH_RD SHUT_RD
#define PRU_FLUSH_WR SHUT_WR
#define PRU_FLUSH_RDWR SHUT_RDWR
#endif
# 586 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#if __BSD_VISIBLE
/*
* sendfile(2) header/trailer struct
*/
struct sf_hdtr {
struct iovec *headers; /* pointer to an array of header struct iovec's */
int hdr_cnt; /* number of header iovec's */
struct iovec *trailers; /* pointer to an array of trailer struct iovec's */
int trl_cnt; /* number of trailer iovec's */
};
/*
* Sendfile-specific flag(s)
*/
#define SF_NODISKIO 0x00000001
#define SF_MNOWAIT 0x00000002 /* obsolete */
#define SF_SYNC 0x00000004
#define SF_USER_READAHEAD 0x00000008
#define SF_NOCACHE 0x00000010
#define SF_FLAGS(rh, flags) (((rh) << 16) | (flags))
#ifdef _KERNEL
#define SF_READAHEAD(flags) ((flags) >> 16)
#endif /* _KERNEL */
# 612 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
/*
* Sendmmsg/recvmmsg specific structure(s)
*/
struct mmsghdr {
struct msghdr msg_hdr; /* message header */
ssize_t msg_len; /* message length */
};
#endif /* __BSD_VISIBLE */
# 621 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#ifndef _KERNEL
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 624 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
# 625 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
__BEGIN_DECLS
int accept(int, struct sockaddr * __restrict, socklen_t * __restrict);
int bind(int, const struct sockaddr *, socklen_t);
int connect(int, const struct sockaddr *, socklen_t);
#if __BSD_VISIBLE
int accept4(int, struct sockaddr * __restrict, socklen_t * __restrict, int);
int bindat(int, int, const struct sockaddr *, socklen_t);
int connectat(int, int, const struct sockaddr *, socklen_t);
#endif
# 635 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict);
int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict);
int getsockopt(int, int, int, void * __restrict, socklen_t * __restrict);
int listen(int, int);
ssize_t recv(int, void *, size_t, int);
ssize_t recvfrom(int, void *, size_t, int, struct sockaddr * __restrict, socklen_t * __restrict);
ssize_t recvmsg(int, struct msghdr *, int);
#if __BSD_VISIBLE
struct timespec;
ssize_t recvmmsg(int, struct mmsghdr * __restrict, size_t, int,
const struct timespec * __restrict);
#endif
# 647 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
ssize_t send(int, const void *, size_t, int);
ssize_t sendto(int, const void *,
size_t, int, const struct sockaddr *, socklen_t);
ssize_t sendmsg(int, const struct msghdr *, int);
#if __BSD_VISIBLE
int sendfile(int, int, off_t, size_t, struct sf_hdtr *, off_t *, int);
ssize_t sendmmsg(int, struct mmsghdr * __restrict, size_t, int);
int setfib(int);
#endif
# 656 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
int setsockopt(int, int, int, const void *, socklen_t);
int shutdown(int, int);
int sockatmark(int);
int socket(int, int, int);
int socketpair(int, int, int, int *);
__END_DECLS
#endif /* !_KERNEL */
# 664 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#ifdef _KERNEL
struct socket;
struct tcpcb *so_sototcpcb(struct socket *so);
struct inpcb *so_sotoinpcb(struct socket *so);
struct sockbuf *so_sockbuf_snd(struct socket *);
struct sockbuf *so_sockbuf_rcv(struct socket *);
int so_state_get(const struct socket *);
void so_state_set(struct socket *, int);
int so_options_get(const struct socket *);
void so_options_set(struct socket *, int);
int so_error_get(const struct socket *);
void so_error_set(struct socket *, int);
int so_linger_get(const struct socket *);
void so_linger_set(struct socket *, int);
struct protosw *so_protosw_get(const struct socket *);
void so_protosw_set(struct socket *, struct protosw *);
void so_sorwakeup_locked(struct socket *so);
void so_sowwakeup_locked(struct socket *so);
void so_sorwakeup(struct socket *so);
void so_sowwakeup(struct socket *so);
void so_lock(struct socket *so);
void so_unlock(struct socket *so);
void so_listeners_apply_all(struct socket *so, void (*func)(struct socket *, void *), void *arg);
#endif
# 700 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
#endif /* !_SYS_SOCKET_H_ */
# 703 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/socket.h" 3 4
# 14 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/ucontext.h>
#endif /* expanded by -frewrite-includes */
# 14 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 1 3 4
/*-
* 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.
*
* $FreeBSD$
*/
#ifndef _SYS_UCONTEXT_H_
#define _SYS_UCONTEXT_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/signal.h>
#endif /* expanded by -frewrite-includes */
# 34 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 3 4
# 35 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <machine/ucontext.h>
#endif /* expanded by -frewrite-includes */
# 35 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 1 3 4
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Ralph Campbell.
*
* 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.
* 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.
*
* @(#)ucontext.h 8.1 (Berkeley) 6/10/93
* JNPR: ucontext.h,v 1.2 2007/08/09 11:23:32 katta
* $FreeBSD$
*/
#ifndef _MACHINE_UCONTEXT_H_
#define _MACHINE_UCONTEXT_H_
#ifndef _LOCORE
#if defined(_KERNEL) && !defined(KLD_MODULE) && !defined(_STANDALONE)
#if 0 /* expanded by -frewrite-includes */
#include "opt_compat.h"
#endif /* expanded by -frewrite-includes */
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
# 44 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
#endif
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
#if defined(COMPAT_CHERIABI) || defined(__CHERI_PURE_CAPABILITY__)
#if 0 /* expanded by -frewrite-includes */
#include <cheri/cheri.h>
#endif /* expanded by -frewrite-includes */
# 47 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
# 48 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
#endif
# 49 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
typedef struct __mcontext {
/*
* These fields must match the corresponding fields in struct
* sigcontext which follow 'sc_mask'. That way we can support
* struct sigcontext and ucontext_t at the same time.
*/
int mc_onstack; /* sigstack state to restore */
__register_t mc_pc; /* pc at time of signal */
__register_t mc_regs[32]; /* processor regs 0 to 31 */
__register_t sr; /* status register */
__register_t mullo, mulhi; /* mullo and mulhi registers... */
int mc_fpused; /* fp has been used */
f_register_t mc_fpregs[33]; /* fp regs 0 to 31 and csr */
__register_t mc_fpc_eir; /* fp exception instruction reg */
void *mc_tls; /* pointer to TLS area */
__register_t cause; /* cause register */
#ifndef __CHERI_PURE_CAPABILITY__
/*
* Optional externally referenced storage for coprocessors. Modeled
* on the approach taken for extended FPU state on x86, which leaves
* some ABI concerns but appears to work in practice.
*/
__register_t mc_cp2state; /* Pointer to external state. */
__register_t mc_cp2state_len;/* Length of external state. */
/*
* XXXRW: Unfortunately, reserved space in the MIPS sigcontext was
* made an 'int' rather than '__register_t', so embedding new pointers
* changes the 32-bit vs. 64-bit versions of this structure
* differently.
*/
#if (defined(__mips_n32) || defined(__mips_n64))
int xxx[2]; /* XXX reserved */
#else
# 85 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
int xxx[5]; /* XXX reserved */
#endif
# 87 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
#else /* defined(__CHERI_PURE_CAPABILITY__) */
# 88 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
struct cheri_frame mc_cheriframe; /* capability registers */
struct chericap __spare__[8];
#endif /* defined(__CHERI_PURE_CAPABILITY__) */
# 91 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
} mcontext_t;
#if (defined(__mips_n32) || defined(__mips_n64)) && defined(COMPAT_FREEBSD32)
#if 0 /* expanded by -frewrite-includes */
#include <compat/freebsd32/freebsd32_signal.h>
#endif /* expanded by -frewrite-includes */
# 94 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
# 95 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
/*
* XXXRW: TODO: Extend with cp2-state fields even though CHERI doesn't support
* 32-bit emulation.
*/
typedef struct __mcontext32 {
int mc_onstack;
int32_t mc_pc;
int32_t mc_regs[32];
int32_t sr;
int32_t mullo, mulhi;
int mc_fpused;
int32_t mc_fpregs[33];
int32_t mc_fpc_eir;
int32_t mc_tls;
int __spare__[8];
} mcontext32_t;
typedef struct __ucontext32 {
sigset_t uc_sigmask;
mcontext32_t uc_mcontext;
uint32_t uc_link;
struct sigaltstack32 uc_stack;
uint32_t uc_flags;
uint32_t __spare__[4];
} ucontext32_t;
#endif
# 122 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
#ifdef COMPAT_CHERIABI
#if 0 /* expanded by -frewrite-includes */
#include <compat/cheriabi/cheriabi_signal.h>
#endif /* expanded by -frewrite-includes */
# 124 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
# 125 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
typedef struct __mcontext_c {
int mc_onstack; /* sigstack state to restore */
register_t mc_pc; /* pc at time of signal */
register_t mc_regs[32]; /* processor regs 0 to 31 */
register_t sr; /* status register */
register_t mullo, mulhi; /* mullo and mulhi registers... */
int mc_fpused; /* fp has been used */
f_register_t mc_fpregs[33]; /* fp regs 0 to 31 and csr */
register_t mc_fpc_eir; /* fp exception instruction reg */
struct chericap mc_tls; /* pointer to TLS area */
__register_t cause; /* cause register */
struct cheri_frame mc_cheriframe; /* capability registers */
struct chericap __spare__[8];
} mcontext_c_t;
typedef struct __ucontext_c {
sigset_t uc_sigmask;
mcontext_c_t uc_mcontext;
struct chericap uc_link;
cheriabi_stack_t uc_stack;
int uc_flags;
int __spare__[4];
} ucontext_c_t;
#endif
# 150 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
#endif
# 151 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
#ifndef SZREG
#if defined(__mips_o32)
#define SZREG 4
#else
# 156 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
#define SZREG 8
#endif
# 158 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
#endif
# 159 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
/* offsets into mcontext_t */
#define UCTX_REG(x) (4 + SZREG + (x)*SZREG)
#define UCR_ZERO UCTX_REG(0)
#define UCR_AT UCTX_REG(1)
#define UCR_V0 UCTX_REG(2)
#define UCR_V1 UCTX_REG(3)
#define UCR_A0 UCTX_REG(4)
#define UCR_A1 UCTX_REG(5)
#define UCR_A2 UCTX_REG(6)
#define UCR_A3 UCTX_REG(7)
#define UCR_T0 UCTX_REG(8)
#define UCR_T1 UCTX_REG(9)
#define UCR_T2 UCTX_REG(10)
#define UCR_T3 UCTX_REG(11)
#define UCR_T4 UCTX_REG(12)
#define UCR_T5 UCTX_REG(13)
#define UCR_T6 UCTX_REG(14)
#define UCR_T7 UCTX_REG(15)
#define UCR_S0 UCTX_REG(16)
#define UCR_S1 UCTX_REG(17)
#define UCR_S2 UCTX_REG(18)
#define UCR_S3 UCTX_REG(19)
#define UCR_S4 UCTX_REG(20)
#define UCR_S5 UCTX_REG(21)
#define UCR_S6 UCTX_REG(22)
#define UCR_S7 UCTX_REG(23)
#define UCR_T8 UCTX_REG(24)
#define UCR_T9 UCTX_REG(25)
#define UCR_K0 UCTX_REG(26)
#define UCR_K1 UCTX_REG(27)
#define UCR_GP UCTX_REG(28)
#define UCR_SP UCTX_REG(29)
#define UCR_S8 UCTX_REG(30)
#define UCR_RA UCTX_REG(31)
#define UCR_SR UCTX_REG(32)
#define UCR_MDLO UCTX_REG(33)
#define UCR_MDHI UCTX_REG(34)
#endif /* !_MACHINE_UCONTEXT_H_ */
# 200 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/ucontext.h" 3 4
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_ucontext.h>
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_ucontext.h" 1 3 4
/*-
* 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.
*
* $FreeBSD$
*/
#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/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/_ucontext.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 2 3 4
#define UCF_SWAPPED 0x00000001 /* Used by swapcontext(3). */
#if defined(_KERNEL) && defined(COMPAT_FREEBSD4)
#if defined(__i386__)
struct ucontext4 {
sigset_t uc_sigmask;
struct mcontext4 uc_mcontext;
struct ucontext4 *uc_link;
stack_t uc_stack;
int __spare__[8];
};
#else /* __i386__ */
# 50 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 3 4
#define ucontext4 ucontext
#endif /* __i386__ */
# 52 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 3 4
#endif /* _KERNEL */
# 53 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 3 4
#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 __BSD_VISIBLE
int __getcontextx_size(void);
int __fillcontextx(char *ctx) __returns_twice;
int __fillcontextx2(char *ctx);
#endif
# 70 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 3 4
__END_DECLS
#else /* _KERNEL */
# 74 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/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 */
# 89 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 3 4
#endif /* !_SYS_UCONTEXT_H_ */
# 91 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/ucontext.h" 3 4
# 15 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <compat/cheriabi/cheriabi_signal.h>
#endif /* expanded by -frewrite-includes */
# 15 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_signal.h" 1 3 4
#ifndef _COMPAT_CHERIABI_CHERIABI_SIGNAL_H_
#define _COMPAT_CHERIABI_CHERIABI_SIGNAL_H_
struct sigaltstack_c {
struct chericap ss_sp; /* signal stack base */
size_t ss_size; /* signal stack length */
int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */
};
union sigval_c {
int sival_int;
struct chericap sival_ptr;
/* XXX: no 6.0 compatibility (sigval_*) */
};
struct siginfo_c {
int si_signo;
int si_errno;
int si_code;
__pid_t si_pid;
__uid_t si_uid;
int si_status;
struct chericap si_addr; /* faulting instruction */
union sigval_c si_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 {
long __spare1__;
int __spare2__[7];
} __spare__;
} _reason;
};
struct sigevent_c {
int sigev_notify;
int sigev_signo;
union sigval_c sigev_value;
union {
__lwpid_t _threadid;
struct {
struct chericap _function; /* void (*)(union sigval); */
struct chericap *_attribute; /* void * */
} _sigev_thread;
unsigned short _kevent_flags;
long __spare__[8];
} _sigev_un;
};
typedef struct {
struct chericap ss_sp;
size_t ss_size;
int ss_flag;
} cheriabi_stack_t;
struct ucontext_c {
/*
* 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 chericap uc_link; /* struct ucontext_c * */
cheriabi_stack_t uc_stack;
int uc_flags;
int __spare__[4];
};
typedef struct ucontext_c ucontext_t_c;
struct sigevent;
int convert_sigevent_c(struct sigevent_c *sig_c, struct sigevent *sig);
void siginfo_to_siginfo_c(const siginfo_t *src, struct siginfo_c *dst);
#endif /* _COMPAT_CHERIABI_CHERIABI_SIGNAL_H_ */
# 92 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_signal.h" 3 4
# 16 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 2 3 4
#if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__))
#define PAD64_REQUIRED
#endif
# 19 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/compat/cheriabi/cheriabi_sysstubs.h" 3 4
struct __wrusage;
struct acl;
struct aiocb;
struct auditinfo;
struct auditinfo_addr;
struct chericap;
struct ffclock_estimate;
struct fhandle;
struct iovec;
struct itimerspec;
struct itimerval;
struct jail;
struct kevent;
struct kld_file_stat;
struct kld_sym_lookup;
struct mac;
struct module_stat;
struct mq_attr;
struct msghdr;
struct msqid_ds;
struct nstat;
struct ntptimeval;
struct pollfd;
struct rlimit;
struct rtprio;
struct rusage;
struct sched_param;
struct sctp_sndrcvinfo;
struct sembuf;
struct sf_hdtr;
struct shmid_ds;
struct sigaction;
struct sigevent;
struct siginfo;
struct sockaddr;
struct stat;
struct statfs;
struct thr_param;
struct timespec;
struct timeval;
struct timex;
struct timezone;
struct uuid;
struct vm_domain_policy_entry;
union semun;
SYS_STUB(0, int, syscall,
/* _protoargs */ (int number),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int number),
/* _protoargs_err */ (__capability int *stub_errno, int number),
/* _callargs */ (number),
/* _callargs_chk */ (&ret, stub_errno, number),
/* _callargs_err */ (&errno, number),
/* _localcheck */ {}
)
SYS_STUB(2, int, fork,
/* _protoargs */ (void),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(3, ssize_t, read,
/* _protoargs */ (int fd, void * buf, size_t nbyte),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int fd, __capability void * buf, size_t nbyte),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability void * buf, size_t nbyte),
/* _callargs */ (fd, (void *)buf, nbyte),
/* _callargs_chk */ (&ret, stub_errno, fd, buf, nbyte),
/* _callargs_err */ (&errno, fd, (void *)buf, nbyte),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(4, ssize_t, write,
/* _protoargs */ (int fd, const void * buf, size_t nbyte),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int fd, __capability const void * buf, size_t nbyte),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const void * buf, size_t nbyte),
/* _callargs */ (fd, (const void *)buf, nbyte),
/* _callargs_chk */ (&ret, stub_errno, fd, buf, nbyte),
/* _callargs_err */ (&errno, fd, (const void *)buf, nbyte),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB_VA(5, int, open, flags,
/* _protoargs */ (const char * path, int flags, mode_t mode),
/* _vprotoargs */ (const char * path, int flags, ...),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int flags, mode_t mode),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int flags, mode_t mode),
/* _callargs */ ((const char *)path, flags, mode),
/* _callargs_chk */ (&ret, stub_errno, path, flags, mode),
/* _callargs_err */ (&errno, (const char *)path, flags, mode),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(6, int, close,
/* _protoargs */ (int fd),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd),
/* _protoargs_err */ (__capability int *stub_errno, int fd),
/* _callargs */ (fd),
/* _callargs_chk */ (&ret, stub_errno, fd),
/* _callargs_err */ (&errno, fd),
/* _localcheck */ {}
)
SYS_STUB(7, int, wait4,
/* _protoargs */ (int pid, int * status, int options, struct rusage * rusage),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int pid, __capability int * status, int options, __capability struct rusage * rusage),
/* _protoargs_err */ (__capability int *stub_errno, int pid, __capability int * status, int options, __capability struct rusage * rusage),
/* _callargs */ (pid, (int *)status, options, (struct rusage *)rusage),
/* _callargs_chk */ (&ret, stub_errno, pid, status, options, rusage),
/* _callargs_err */ (&errno, pid, (int *)status, options, (struct rusage *)rusage),
/* _localcheck */ {if (!(cheri_getperm(status) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(rusage) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(9, int, link,
/* _protoargs */ (const char * path, const char * to),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, __capability const char * to),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, __capability const char * to),
/* _callargs */ ((const char *)path, (const char *)to),
/* _callargs_chk */ (&ret, stub_errno, path, to),
/* _callargs_err */ (&errno, (const char *)path, (const char *)to),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(to) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(10, int, unlink,
/* _protoargs */ (const char * path),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path),
/* _callargs */ ((const char *)path),
/* _callargs_chk */ (&ret, stub_errno, path),
/* _callargs_err */ (&errno, (const char *)path),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(12, int, chdir,
/* _protoargs */ (const char * path),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path),
/* _callargs */ ((const char *)path),
/* _callargs_chk */ (&ret, stub_errno, path),
/* _callargs_err */ (&errno, (const char *)path),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(13, int, fchdir,
/* _protoargs */ (int fd),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd),
/* _protoargs_err */ (__capability int *stub_errno, int fd),
/* _callargs */ (fd),
/* _callargs_chk */ (&ret, stub_errno, fd),
/* _callargs_err */ (&errno, fd),
/* _localcheck */ {}
)
SYS_STUB(14, int, mknod,
/* _protoargs */ (const char * path, mode_t mode, dev_t dev),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, mode_t mode, dev_t dev),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, mode_t mode, dev_t dev),
/* _callargs */ ((const char *)path, mode, dev),
/* _callargs_chk */ (&ret, stub_errno, path, mode, dev),
/* _callargs_err */ (&errno, (const char *)path, mode, dev),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(15, int, chmod,
/* _protoargs */ (const char * path, mode_t mode),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, mode_t mode),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, mode_t mode),
/* _callargs */ ((const char *)path, mode),
/* _callargs_chk */ (&ret, stub_errno, path, mode),
/* _callargs_err */ (&errno, (const char *)path, mode),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(16, int, chown,
/* _protoargs */ (const char * path, int uid, int gid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int uid, int gid),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int uid, int gid),
/* _callargs */ ((const char *)path, uid, gid),
/* _callargs_chk */ (&ret, stub_errno, path, uid, gid),
/* _callargs_err */ (&errno, (const char *)path, uid, gid),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(20, pid_t, getpid,
/* _protoargs */ (void),
/* _protoargs_chk */ (pid_t *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(21, int, mount,
/* _protoargs */ (const char * type, const char * path, int flags, void * data),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * type, __capability const char * path, int flags, __capability void * data),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * type, __capability const char * path, int flags, __capability void * data),
/* _callargs */ ((const char *)type, (const char *)path, flags, (void *)data),
/* _callargs_chk */ (&ret, stub_errno, type, path, flags, data),
/* _callargs_err */ (&errno, (const char *)type, (const char *)path, flags, (void *)data),
/* _localcheck */ {if (!(cheri_getperm(type) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(22, int, unmount,
/* _protoargs */ (const char * path, int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int flags),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int flags),
/* _callargs */ ((const char *)path, flags),
/* _callargs_chk */ (&ret, stub_errno, path, flags),
/* _callargs_err */ (&errno, (const char *)path, flags),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(23, int, setuid,
/* _protoargs */ (uid_t uid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, uid_t uid),
/* _protoargs_err */ (__capability int *stub_errno, uid_t uid),
/* _callargs */ (uid),
/* _callargs_chk */ (&ret, stub_errno, uid),
/* _callargs_err */ (&errno, uid),
/* _localcheck */ {}
)
SYS_STUB(24, uid_t, getuid,
/* _protoargs */ (void),
/* _protoargs_chk */ (uid_t *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(25, uid_t, geteuid,
/* _protoargs */ (void),
/* _protoargs_chk */ (uid_t *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(26, int, ptrace,
/* _protoargs */ (int req, pid_t pid, vaddr_t addr, int data),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int req, pid_t pid, vaddr_t addr, int data),
/* _protoargs_err */ (__capability int *stub_errno, int req, pid_t pid, vaddr_t addr, int data),
/* _callargs */ (req, pid, addr, data),
/* _callargs_chk */ (&ret, stub_errno, req, pid, addr, data),
/* _callargs_err */ (&errno, req, pid, addr, data),
/* _localcheck */ {}
)
SYS_STUB_ARGHASPTRS(27, ssize_t, recvmsg,
/* _protoargs */ (int s, struct msghdr* msg, int flags),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int s, __capability struct msghdr* msg, int flags),
/* _protoargs_err */ (__capability int *stub_errno, int s, __capability struct msghdr* msg, int flags),
/* _callargs */ (s, (struct msghdr*)msg, flags),
/* _callargs_chk */ (&ret, stub_errno, s, msg, flags),
/* _callargs_err */ (&errno, s, (struct msghdr*)msg, flags),
/* _localcheck */ {if (!(cheri_getperm(msg) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB_ARGHASPTRS(28, ssize_t, sendmsg,
/* _protoargs */ (int s, const struct msghdr* msg, int flags),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int s, __capability const struct msghdr* msg, int flags),
/* _protoargs_err */ (__capability int *stub_errno, int s, __capability const struct msghdr* msg, int flags),
/* _callargs */ (s, (const struct msghdr*)msg, flags),
/* _callargs_chk */ (&ret, stub_errno, s, msg, flags),
/* _callargs_err */ (&errno, s, (const struct msghdr*)msg, flags),
/* _localcheck */ {if (!(cheri_getperm(msg) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(29, ssize_t, recvfrom,
/* _protoargs */ (int s, void * buf, size_t len, int flags, struct sockaddr *__restrict from, socklen_t *__restrict fromlenaddr),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int s, __capability void * buf, size_t len, int flags, __capability struct sockaddr *__restrict from, __capability socklen_t *__restrict fromlenaddr),
/* _protoargs_err */ (__capability int *stub_errno, int s, __capability void * buf, size_t len, int flags, __capability struct sockaddr *__restrict from, __capability socklen_t *__restrict fromlenaddr),
/* _callargs */ (s, (void *)buf, len, flags, (struct sockaddr *__restrict)from, (socklen_t *__restrict)fromlenaddr),
/* _callargs_chk */ (&ret, stub_errno, s, buf, len, flags, from, fromlenaddr),
/* _callargs_err */ (&errno, s, (void *)buf, len, flags, (struct sockaddr *__restrict)from, (socklen_t *__restrict)fromlenaddr),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(from) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(fromlenaddr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(30, int, accept,
/* _protoargs */ (int s, struct sockaddr *__restrict name, socklen_t * anamelen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int s, __capability struct sockaddr *__restrict name, __capability socklen_t * anamelen),
/* _protoargs_err */ (__capability int *stub_errno, int s, __capability struct sockaddr *__restrict name, __capability socklen_t * anamelen),
/* _callargs */ (s, (struct sockaddr *__restrict)name, (socklen_t *)anamelen),
/* _callargs_chk */ (&ret, stub_errno, s, name, anamelen),
/* _callargs_err */ (&errno, s, (struct sockaddr *__restrict)name, (socklen_t *)anamelen),
/* _localcheck */ {if (!(cheri_getperm(name) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(anamelen) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(31, int, getpeername,
/* _protoargs */ (int fdes, struct sockaddr *__restrict asa, socklen_t * alen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fdes, __capability struct sockaddr *__restrict asa, __capability socklen_t * alen),
/* _protoargs_err */ (__capability int *stub_errno, int fdes, __capability struct sockaddr *__restrict asa, __capability socklen_t * alen),
/* _callargs */ (fdes, (struct sockaddr *__restrict)asa, (socklen_t *)alen),
/* _callargs_chk */ (&ret, stub_errno, fdes, asa, alen),
/* _callargs_err */ (&errno, fdes, (struct sockaddr *__restrict)asa, (socklen_t *)alen),
/* _localcheck */ {if (!(cheri_getperm(asa) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(alen) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(32, int, getsockname,
/* _protoargs */ (int fdes, struct sockaddr *__restrict asa, socklen_t * alen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fdes, __capability struct sockaddr *__restrict asa, __capability socklen_t * alen),
/* _protoargs_err */ (__capability int *stub_errno, int fdes, __capability struct sockaddr *__restrict asa, __capability socklen_t * alen),
/* _callargs */ (fdes, (struct sockaddr *__restrict)asa, (socklen_t *)alen),
/* _callargs_chk */ (&ret, stub_errno, fdes, asa, alen),
/* _callargs_err */ (&errno, fdes, (struct sockaddr *__restrict)asa, (socklen_t *)alen),
/* _localcheck */ {if (!(cheri_getperm(asa) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(alen) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(33, int, access,
/* _protoargs */ (const char * path, int amode),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int amode),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int amode),
/* _callargs */ ((const char *)path, amode),
/* _callargs_chk */ (&ret, stub_errno, path, amode),
/* _callargs_err */ (&errno, (const char *)path, amode),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(34, int, chflags,
/* _protoargs */ (const char * path, u_long flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, u_long flags),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, u_long flags),
/* _callargs */ ((const char *)path, flags),
/* _callargs_chk */ (&ret, stub_errno, path, flags),
/* _callargs_err */ (&errno, (const char *)path, flags),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(35, int, fchflags,
/* _protoargs */ (int fd, u_long flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, u_long flags),
/* _protoargs_err */ (__capability int *stub_errno, int fd, u_long flags),
/* _callargs */ (fd, flags),
/* _callargs_chk */ (&ret, stub_errno, fd, flags),
/* _callargs_err */ (&errno, fd, flags),
/* _localcheck */ {}
)
SYS_STUB(36, int, sync,
/* _protoargs */ (void),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(37, int, kill,
/* _protoargs */ (int pid, int signum),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int pid, int signum),
/* _protoargs_err */ (__capability int *stub_errno, int pid, int signum),
/* _callargs */ (pid, signum),
/* _callargs_chk */ (&ret, stub_errno, pid, signum),
/* _callargs_err */ (&errno, pid, signum),
/* _localcheck */ {}
)
SYS_STUB(39, pid_t, getppid,
/* _protoargs */ (void),
/* _protoargs_chk */ (pid_t *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(41, int, dup,
/* _protoargs */ (u_int fd),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, u_int fd),
/* _protoargs_err */ (__capability int *stub_errno, u_int fd),
/* _callargs */ (fd),
/* _callargs_chk */ (&ret, stub_errno, fd),
/* _callargs_err */ (&errno, fd),
/* _localcheck */ {}
)
SYS_STUB(43, gid_t, getegid,
/* _protoargs */ (void),
/* _protoargs_chk */ (gid_t *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(44, int, profil,
/* _protoargs */ (void * samples, size_t size, size_t offset, u_int scale),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability void * samples, size_t size, size_t offset, u_int scale),
/* _protoargs_err */ (__capability int *stub_errno, __capability void * samples, size_t size, size_t offset, u_int scale),
/* _callargs */ ((void *)samples, size, offset, scale),
/* _callargs_chk */ (&ret, stub_errno, samples, size, offset, scale),
/* _callargs_err */ (&errno, (void *)samples, size, offset, scale),
/* _localcheck */ {if (!(cheri_getperm(samples) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(45, int, ktrace,
/* _protoargs */ (const char * fname, int ops, int facs, int pid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * fname, int ops, int facs, int pid),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * fname, int ops, int facs, int pid),
/* _callargs */ ((const char *)fname, ops, facs, pid),
/* _callargs_chk */ (&ret, stub_errno, fname, ops, facs, pid),
/* _callargs_err */ (&errno, (const char *)fname, ops, facs, pid),
/* _localcheck */ {if (!(cheri_getperm(fname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(47, gid_t, getgid,
/* _protoargs */ (void),
/* _protoargs_chk */ (gid_t *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(49, int, getlogin,
/* _protoargs */ (char * namebuf, u_int namelen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability char * namebuf, u_int namelen),
/* _protoargs_err */ (__capability int *stub_errno, __capability char * namebuf, u_int namelen),
/* _callargs */ ((char *)namebuf, namelen),
/* _callargs_chk */ (&ret, stub_errno, namebuf, namelen),
/* _callargs_err */ (&errno, (char *)namebuf, namelen),
/* _localcheck */ {if (!(cheri_getperm(namebuf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(50, int, setlogin,
/* _protoargs */ (const char * namebuf),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * namebuf),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * namebuf),
/* _callargs */ ((const char *)namebuf),
/* _callargs_chk */ (&ret, stub_errno, namebuf),
/* _callargs_err */ (&errno, (const char *)namebuf),
/* _localcheck */ {if (!(cheri_getperm(namebuf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(51, int, acct,
/* _protoargs */ (const char * path),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path),
/* _callargs */ ((const char *)path),
/* _callargs_chk */ (&ret, stub_errno, path),
/* _callargs_err */ (&errno, (const char *)path),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(53, int, sigaltstack,
/* _protoargs */ (const cheriabi_stack_t * ss, cheriabi_stack_t * oss),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const cheriabi_stack_t * ss, __capability cheriabi_stack_t * oss),
/* _protoargs_err */ (__capability int *stub_errno, __capability const cheriabi_stack_t * ss, __capability cheriabi_stack_t * oss),
/* _callargs */ ((const cheriabi_stack_t *)ss, (cheriabi_stack_t *)oss),
/* _callargs_chk */ (&ret, stub_errno, ss, oss),
/* _callargs_err */ (&errno, (const cheriabi_stack_t *)ss, (cheriabi_stack_t *)oss),
/* _localcheck */ {if (!(cheri_getperm(ss) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(oss) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(55, int, reboot,
/* _protoargs */ (int opt),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int opt),
/* _protoargs_err */ (__capability int *stub_errno, int opt),
/* _callargs */ (opt),
/* _callargs_chk */ (&ret, stub_errno, opt),
/* _callargs_err */ (&errno, opt),
/* _localcheck */ {}
)
SYS_STUB(56, int, revoke,
/* _protoargs */ (const char * path),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path),
/* _callargs */ ((const char *)path),
/* _callargs_chk */ (&ret, stub_errno, path),
/* _callargs_err */ (&errno, (const char *)path),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(57, int, symlink,
/* _protoargs */ (const char * path, const char * link),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, __capability const char * link),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, __capability const char * link),
/* _callargs */ ((const char *)path, (const char *)link),
/* _callargs_chk */ (&ret, stub_errno, path, link),
/* _callargs_err */ (&errno, (const char *)path, (const char *)link),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(link) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(58, ssize_t, readlink,
/* _protoargs */ (const char * path, char * buf, size_t count),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, __capability const char * path, __capability char * buf, size_t count),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, __capability char * buf, size_t count),
/* _callargs */ ((const char *)path, (char *)buf, count),
/* _callargs_chk */ (&ret, stub_errno, path, buf, count),
/* _callargs_err */ (&errno, (const char *)path, (char *)buf, count),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(59, int, execve,
/* _protoargs */ (const char * fname, struct chericap * argv, struct chericap * envv),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * fname, __capability struct chericap * argv, __capability struct chericap * envv),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * fname, __capability struct chericap * argv, __capability struct chericap * envv),
/* _callargs */ ((const char *)fname, (struct chericap *)argv, (struct chericap *)envv),
/* _callargs_chk */ (&ret, stub_errno, fname, argv, envv),
/* _callargs_err */ (&errno, (const char *)fname, (struct chericap *)argv, (struct chericap *)envv),
/* _localcheck */ {if (!(cheri_getperm(fname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(argv) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(envv) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(60, mode_t, umask,
/* _protoargs */ (mode_t newmask),
/* _protoargs_chk */ (mode_t *retp , __capability int *stub_errno, mode_t newmask),
/* _protoargs_err */ (__capability int *stub_errno, mode_t newmask),
/* _callargs */ (newmask),
/* _callargs_chk */ (&ret, stub_errno, newmask),
/* _callargs_err */ (&errno, newmask),
/* _localcheck */ {}
)
SYS_STUB(61, int, chroot,
/* _protoargs */ (const char * path),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path),
/* _callargs */ ((const char *)path),
/* _callargs_chk */ (&ret, stub_errno, path),
/* _callargs_err */ (&errno, (const char *)path),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(65, int, msync,
/* _protoargs */ (void * addr, size_t len, int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability void * addr, size_t len, int flags),
/* _protoargs_err */ (__capability int *stub_errno, __capability void * addr, size_t len, int flags),
/* _callargs */ ((void *)addr, len, flags),
/* _callargs_chk */ (&ret, stub_errno, addr, len, flags),
/* _callargs_err */ (&errno, (void *)addr, len, flags),
/* _localcheck */ {if (!(cheri_getperm(addr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(66, int, vfork,
/* _protoargs */ (void),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(73, int, munmap,
/* _protoargs */ (void * addr, size_t len),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability void * addr, size_t len),
/* _protoargs_err */ (__capability int *stub_errno, __capability void * addr, size_t len),
/* _callargs */ ((void *)addr, len),
/* _callargs_chk */ (&ret, stub_errno, addr, len),
/* _callargs_err */ (&errno, (void *)addr, len),
/* _localcheck */ {if (!(cheri_getperm(addr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(74, int, mprotect,
/* _protoargs */ (const void * addr, size_t len, int prot),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const void * addr, size_t len, int prot),
/* _protoargs_err */ (__capability int *stub_errno, __capability const void * addr, size_t len, int prot),
/* _callargs */ ((const void *)addr, len, prot),
/* _callargs_chk */ (&ret, stub_errno, addr, len, prot),
/* _callargs_err */ (&errno, (const void *)addr, len, prot),
/* _localcheck */ {if (!(cheri_getperm(addr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(75, int, madvise,
/* _protoargs */ (void * addr, size_t len, int behav),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability void * addr, size_t len, int behav),
/* _protoargs_err */ (__capability int *stub_errno, __capability void * addr, size_t len, int behav),
/* _callargs */ ((void *)addr, len, behav),
/* _callargs_chk */ (&ret, stub_errno, addr, len, behav),
/* _callargs_err */ (&errno, (void *)addr, len, behav),
/* _localcheck */ {if (!(cheri_getperm(addr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(78, int, mincore,
/* _protoargs */ (const void * addr, size_t len, char * vec),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const void * addr, size_t len, __capability char * vec),
/* _protoargs_err */ (__capability int *stub_errno, __capability const void * addr, size_t len, __capability char * vec),
/* _callargs */ ((const void *)addr, len, (char *)vec),
/* _callargs_chk */ (&ret, stub_errno, addr, len, vec),
/* _callargs_err */ (&errno, (const void *)addr, len, (char *)vec),
/* _localcheck */ {if (!(cheri_getperm(addr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(vec) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(79, int, getgroups,
/* _protoargs */ (u_int gidsetsize, gid_t * gidset),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, u_int gidsetsize, __capability gid_t * gidset),
/* _protoargs_err */ (__capability int *stub_errno, u_int gidsetsize, __capability gid_t * gidset),
/* _callargs */ (gidsetsize, (gid_t *)gidset),
/* _callargs_chk */ (&ret, stub_errno, gidsetsize, gidset),
/* _callargs_err */ (&errno, gidsetsize, (gid_t *)gidset),
/* _localcheck */ {if (!(cheri_getperm(gidset) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(80, int, setgroups,
/* _protoargs */ (u_int gidsetsize, gid_t * gidset),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, u_int gidsetsize, __capability gid_t * gidset),
/* _protoargs_err */ (__capability int *stub_errno, u_int gidsetsize, __capability gid_t * gidset),
/* _callargs */ (gidsetsize, (gid_t *)gidset),
/* _callargs_chk */ (&ret, stub_errno, gidsetsize, gidset),
/* _callargs_err */ (&errno, gidsetsize, (gid_t *)gidset),
/* _localcheck */ {if (!(cheri_getperm(gidset) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(81, int, getpgrp,
/* _protoargs */ (void),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(82, int, setpgid,
/* _protoargs */ (int pid, int pgid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int pid, int pgid),
/* _protoargs_err */ (__capability int *stub_errno, int pid, int pgid),
/* _callargs */ (pid, pgid),
/* _callargs_chk */ (&ret, stub_errno, pid, pgid),
/* _callargs_err */ (&errno, pid, pgid),
/* _localcheck */ {}
)
SYS_STUB(83, int, setitimer,
/* _protoargs */ (int which, const struct itimerval * itv, struct itimerval * oitv),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int which, __capability const struct itimerval * itv, __capability struct itimerval * oitv),
/* _protoargs_err */ (__capability int *stub_errno, int which, __capability const struct itimerval * itv, __capability struct itimerval * oitv),
/* _callargs */ (which, (const struct itimerval *)itv, (struct itimerval *)oitv),
/* _callargs_chk */ (&ret, stub_errno, which, itv, oitv),
/* _callargs_err */ (&errno, which, (const struct itimerval *)itv, (struct itimerval *)oitv),
/* _localcheck */ {if (!(cheri_getperm(itv) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(oitv) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(85, int, swapon,
/* _protoargs */ (const char * name),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * name),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * name),
/* _callargs */ ((const char *)name),
/* _callargs_chk */ (&ret, stub_errno, name),
/* _callargs_err */ (&errno, (const char *)name),
/* _localcheck */ {if (!(cheri_getperm(name) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(86, int, getitimer,
/* _protoargs */ (int which, struct itimerval * itv),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int which, __capability struct itimerval * itv),
/* _protoargs_err */ (__capability int *stub_errno, int which, __capability struct itimerval * itv),
/* _callargs */ (which, (struct itimerval *)itv),
/* _callargs_chk */ (&ret, stub_errno, which, itv),
/* _callargs_err */ (&errno, which, (struct itimerval *)itv),
/* _localcheck */ {if (!(cheri_getperm(itv) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(89, int, getdtablesize,
/* _protoargs */ (void),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(90, int, dup2,
/* _protoargs */ (u_int from, u_int to),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, u_int from, u_int to),
/* _protoargs_err */ (__capability int *stub_errno, u_int from, u_int to),
/* _callargs */ (from, to),
/* _callargs_chk */ (&ret, stub_errno, from, to),
/* _callargs_err */ (&errno, from, to),
/* _localcheck */ {}
)
SYS_STUB_VA(92, int, fcntl, cmd,
/* _protoargs */ (int fd, int cmd, intptr_t arg),
/* _vprotoargs */ (int fd, int cmd, ...),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, int cmd, __intcap_t arg),
/* _protoargs_err */ (__capability int *stub_errno, int fd, int cmd, __intcap_t arg),
/* _callargs */ (fd, cmd, (intptr_t)arg),
/* _callargs_chk */ (&ret, stub_errno, fd, cmd, arg),
/* _callargs_err */ (&errno, fd, cmd, (intptr_t)arg),
/* _localcheck */ {if (!(cheri_getperm(arg) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(93, int, select,
/* _protoargs */ (int nd, fd_set * in, fd_set * ou, fd_set * ex, struct timeval * tv),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int nd, __capability fd_set * in, __capability fd_set * ou, __capability fd_set * ex, __capability struct timeval * tv),
/* _protoargs_err */ (__capability int *stub_errno, int nd, __capability fd_set * in, __capability fd_set * ou, __capability fd_set * ex, __capability struct timeval * tv),
/* _callargs */ (nd, (fd_set *)in, (fd_set *)ou, (fd_set *)ex, (struct timeval *)tv),
/* _callargs_chk */ (&ret, stub_errno, nd, in, ou, ex, tv),
/* _callargs_err */ (&errno, nd, (fd_set *)in, (fd_set *)ou, (fd_set *)ex, (struct timeval *)tv),
/* _localcheck */ {if (!(cheri_getperm(in) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(ou) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(ex) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(tv) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(95, int, fsync,
/* _protoargs */ (int fd),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd),
/* _protoargs_err */ (__capability int *stub_errno, int fd),
/* _callargs */ (fd),
/* _callargs_chk */ (&ret, stub_errno, fd),
/* _callargs_err */ (&errno, fd),
/* _localcheck */ {}
)
SYS_STUB(96, int, setpriority,
/* _protoargs */ (int which, int who, int prio),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int which, int who, int prio),
/* _protoargs_err */ (__capability int *stub_errno, int which, int who, int prio),
/* _callargs */ (which, who, prio),
/* _callargs_chk */ (&ret, stub_errno, which, who, prio),
/* _callargs_err */ (&errno, which, who, prio),
/* _localcheck */ {}
)
SYS_STUB(97, int, socket,
/* _protoargs */ (int domain, int type, int protocol),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int domain, int type, int protocol),
/* _protoargs_err */ (__capability int *stub_errno, int domain, int type, int protocol),
/* _callargs */ (domain, type, protocol),
/* _callargs_chk */ (&ret, stub_errno, domain, type, protocol),
/* _callargs_err */ (&errno, domain, type, protocol),
/* _localcheck */ {}
)
SYS_STUB(98, int, connect,
/* _protoargs */ (int s, const struct sockaddr * name, socklen_t namelen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int s, __capability const struct sockaddr * name, socklen_t namelen),
/* _protoargs_err */ (__capability int *stub_errno, int s, __capability const struct sockaddr * name, socklen_t namelen),
/* _callargs */ (s, (const struct sockaddr *)name, namelen),
/* _callargs_chk */ (&ret, stub_errno, s, name, namelen),
/* _callargs_err */ (&errno, s, (const struct sockaddr *)name, namelen),
/* _localcheck */ {if (!(cheri_getperm(name) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(100, int, getpriority,
/* _protoargs */ (int which, int who),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int which, int who),
/* _protoargs_err */ (__capability int *stub_errno, int which, int who),
/* _callargs */ (which, who),
/* _callargs_chk */ (&ret, stub_errno, which, who),
/* _callargs_err */ (&errno, which, who),
/* _localcheck */ {}
)
SYS_STUB(104, int, bind,
/* _protoargs */ (int s, const struct sockaddr * name, socklen_t namelen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int s, __capability const struct sockaddr * name, socklen_t namelen),
/* _protoargs_err */ (__capability int *stub_errno, int s, __capability const struct sockaddr * name, socklen_t namelen),
/* _callargs */ (s, (const struct sockaddr *)name, namelen),
/* _callargs_chk */ (&ret, stub_errno, s, name, namelen),
/* _callargs_err */ (&errno, s, (const struct sockaddr *)name, namelen),
/* _localcheck */ {if (!(cheri_getperm(name) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(105, int, setsockopt,
/* _protoargs */ (int s, int level, int name, const void * val, socklen_t valsize),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int s, int level, int name, __capability const void * val, socklen_t valsize),
/* _protoargs_err */ (__capability int *stub_errno, int s, int level, int name, __capability const void * val, socklen_t valsize),
/* _callargs */ (s, level, name, (const void *)val, valsize),
/* _callargs_chk */ (&ret, stub_errno, s, level, name, val, valsize),
/* _callargs_err */ (&errno, s, level, name, (const void *)val, valsize),
/* _localcheck */ {if (!(cheri_getperm(val) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(106, int, listen,
/* _protoargs */ (int s, int backlog),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int s, int backlog),
/* _protoargs_err */ (__capability int *stub_errno, int s, int backlog),
/* _callargs */ (s, backlog),
/* _callargs_chk */ (&ret, stub_errno, s, backlog),
/* _callargs_err */ (&errno, s, backlog),
/* _localcheck */ {}
)
SYS_STUB(116, int, gettimeofday,
/* _protoargs */ (struct timeval * tp, struct timezone * tzp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct timeval * tp, __capability struct timezone * tzp),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct timeval * tp, __capability struct timezone * tzp),
/* _callargs */ ((struct timeval *)tp, (struct timezone *)tzp),
/* _callargs_chk */ (&ret, stub_errno, tp, tzp),
/* _callargs_err */ (&errno, (struct timeval *)tp, (struct timezone *)tzp),
/* _localcheck */ {if (!(cheri_getperm(tp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(tzp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(117, int, getrusage,
/* _protoargs */ (int who, struct rusage * rusage),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int who, __capability struct rusage * rusage),
/* _protoargs_err */ (__capability int *stub_errno, int who, __capability struct rusage * rusage),
/* _callargs */ (who, (struct rusage *)rusage),
/* _callargs_chk */ (&ret, stub_errno, who, rusage),
/* _callargs_err */ (&errno, who, (struct rusage *)rusage),
/* _localcheck */ {if (!(cheri_getperm(rusage) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(118, int, getsockopt,
/* _protoargs */ (int s, int level, int name, void * val, socklen_t * avalsize),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int s, int level, int name, __capability void * val, __capability socklen_t * avalsize),
/* _protoargs_err */ (__capability int *stub_errno, int s, int level, int name, __capability void * val, __capability socklen_t * avalsize),
/* _callargs */ (s, level, name, (void *)val, (socklen_t *)avalsize),
/* _callargs_chk */ (&ret, stub_errno, s, level, name, val, avalsize),
/* _callargs_err */ (&errno, s, level, name, (void *)val, (socklen_t *)avalsize),
/* _localcheck */ {if (!(cheri_getperm(val) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(avalsize) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(120, int, readv,
/* _protoargs */ (int fd, struct iovec* iovp, u_int iovcnt),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability struct iovec* iovp, u_int iovcnt),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability struct iovec* iovp, u_int iovcnt),
/* _callargs */ (fd, (struct iovec*)iovp, iovcnt),
/* _callargs_chk */ (&ret, stub_errno, fd, iovp, iovcnt),
/* _callargs_err */ (&errno, fd, (struct iovec*)iovp, iovcnt),
/* _localcheck */ {if (!(cheri_getperm(iovp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(121, int, writev,
/* _protoargs */ (int fd, struct iovec* iovp, u_int iovcnt),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability struct iovec* iovp, u_int iovcnt),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability struct iovec* iovp, u_int iovcnt),
/* _callargs */ (fd, (struct iovec*)iovp, iovcnt),
/* _callargs_chk */ (&ret, stub_errno, fd, iovp, iovcnt),
/* _callargs_err */ (&errno, fd, (struct iovec*)iovp, iovcnt),
/* _localcheck */ {if (!(cheri_getperm(iovp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(122, int, settimeofday,
/* _protoargs */ (const struct timeval * tv, const struct timezone * tzp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const struct timeval * tv, __capability const struct timezone * tzp),
/* _protoargs_err */ (__capability int *stub_errno, __capability const struct timeval * tv, __capability const struct timezone * tzp),
/* _callargs */ ((const struct timeval *)tv, (const struct timezone *)tzp),
/* _callargs_chk */ (&ret, stub_errno, tv, tzp),
/* _callargs_err */ (&errno, (const struct timeval *)tv, (const struct timezone *)tzp),
/* _localcheck */ {if (!(cheri_getperm(tv) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(tzp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(123, int, fchown,
/* _protoargs */ (int fd, int uid, int gid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, int uid, int gid),
/* _protoargs_err */ (__capability int *stub_errno, int fd, int uid, int gid),
/* _callargs */ (fd, uid, gid),
/* _callargs_chk */ (&ret, stub_errno, fd, uid, gid),
/* _callargs_err */ (&errno, fd, uid, gid),
/* _localcheck */ {}
)
SYS_STUB(124, int, fchmod,
/* _protoargs */ (int fd, mode_t mode),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, mode_t mode),
/* _protoargs_err */ (__capability int *stub_errno, int fd, mode_t mode),
/* _callargs */ (fd, mode),
/* _callargs_chk */ (&ret, stub_errno, fd, mode),
/* _callargs_err */ (&errno, fd, mode),
/* _localcheck */ {}
)
SYS_STUB(126, int, setreuid,
/* _protoargs */ (int ruid, int euid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int ruid, int euid),
/* _protoargs_err */ (__capability int *stub_errno, int ruid, int euid),
/* _callargs */ (ruid, euid),
/* _callargs_chk */ (&ret, stub_errno, ruid, euid),
/* _callargs_err */ (&errno, ruid, euid),
/* _localcheck */ {}
)
SYS_STUB(127, int, setregid,
/* _protoargs */ (int rgid, int egid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int rgid, int egid),
/* _protoargs_err */ (__capability int *stub_errno, int rgid, int egid),
/* _callargs */ (rgid, egid),
/* _callargs_chk */ (&ret, stub_errno, rgid, egid),
/* _callargs_err */ (&errno, rgid, egid),
/* _localcheck */ {}
)
SYS_STUB(128, int, rename,
/* _protoargs */ (const char * from, const char * to),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * from, __capability const char * to),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * from, __capability const char * to),
/* _callargs */ ((const char *)from, (const char *)to),
/* _callargs_chk */ (&ret, stub_errno, from, to),
/* _callargs_err */ (&errno, (const char *)from, (const char *)to),
/* _localcheck */ {if (!(cheri_getperm(from) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(to) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(131, int, flock,
/* _protoargs */ (int fd, int how),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, int how),
/* _protoargs_err */ (__capability int *stub_errno, int fd, int how),
/* _callargs */ (fd, how),
/* _callargs_chk */ (&ret, stub_errno, fd, how),
/* _callargs_err */ (&errno, fd, how),
/* _localcheck */ {}
)
SYS_STUB(132, int, mkfifo,
/* _protoargs */ (const char * path, mode_t mode),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, mode_t mode),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, mode_t mode),
/* _callargs */ ((const char *)path, mode),
/* _callargs_chk */ (&ret, stub_errno, path, mode),
/* _callargs_err */ (&errno, (const char *)path, mode),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(133, ssize_t, sendto,
/* _protoargs */ (int s, const void * buf, size_t len, int flags, const struct sockaddr * to, socklen_t tolen),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int s, __capability const void * buf, size_t len, int flags, __capability const struct sockaddr * to, socklen_t tolen),
/* _protoargs_err */ (__capability int *stub_errno, int s, __capability const void * buf, size_t len, int flags, __capability const struct sockaddr * to, socklen_t tolen),
/* _callargs */ (s, (const void *)buf, len, flags, (const struct sockaddr *)to, tolen),
/* _callargs_chk */ (&ret, stub_errno, s, buf, len, flags, to, tolen),
/* _callargs_err */ (&errno, s, (const void *)buf, len, flags, (const struct sockaddr *)to, tolen),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(to) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(134, int, shutdown,
/* _protoargs */ (int s, int how),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int s, int how),
/* _protoargs_err */ (__capability int *stub_errno, int s, int how),
/* _callargs */ (s, how),
/* _callargs_chk */ (&ret, stub_errno, s, how),
/* _callargs_err */ (&errno, s, how),
/* _localcheck */ {}
)
SYS_STUB(135, int, socketpair,
/* _protoargs */ (int domain, int type, int protocol, int * rsv),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int domain, int type, int protocol, __capability int * rsv),
/* _protoargs_err */ (__capability int *stub_errno, int domain, int type, int protocol, __capability int * rsv),
/* _callargs */ (domain, type, protocol, (int *)rsv),
/* _callargs_chk */ (&ret, stub_errno, domain, type, protocol, rsv),
/* _callargs_err */ (&errno, domain, type, protocol, (int *)rsv),
/* _localcheck */ {if (!(cheri_getperm(rsv) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(136, int, mkdir,
/* _protoargs */ (const char * path, mode_t mode),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, mode_t mode),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, mode_t mode),
/* _callargs */ ((const char *)path, mode),
/* _callargs_chk */ (&ret, stub_errno, path, mode),
/* _callargs_err */ (&errno, (const char *)path, mode),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(137, int, rmdir,
/* _protoargs */ (const char * path),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path),
/* _callargs */ ((const char *)path),
/* _callargs_chk */ (&ret, stub_errno, path),
/* _callargs_err */ (&errno, (const char *)path),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(138, int, utimes,
/* _protoargs */ (const char * path, const struct timeval * tptr),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, __capability const struct timeval * tptr),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, __capability const struct timeval * tptr),
/* _callargs */ ((const char *)path, (const struct timeval *)tptr),
/* _callargs_chk */ (&ret, stub_errno, path, tptr),
/* _callargs_err */ (&errno, (const char *)path, (const struct timeval *)tptr),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(tptr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(140, int, adjtime,
/* _protoargs */ (const struct timeval * delta, struct timeval * olddelta),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const struct timeval * delta, __capability struct timeval * olddelta),
/* _protoargs_err */ (__capability int *stub_errno, __capability const struct timeval * delta, __capability struct timeval * olddelta),
/* _callargs */ ((const struct timeval *)delta, (struct timeval *)olddelta),
/* _callargs_chk */ (&ret, stub_errno, delta, olddelta),
/* _callargs_err */ (&errno, (const struct timeval *)delta, (struct timeval *)olddelta),
/* _localcheck */ {if (!(cheri_getperm(delta) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(olddelta) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(147, int, setsid,
/* _protoargs */ (void),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(148, int, quotactl,
/* _protoargs */ (const char * path, int cmd, int uid, void * arg),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int cmd, int uid, __capability void * arg),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int cmd, int uid, __capability void * arg),
/* _callargs */ ((const char *)path, cmd, uid, (void *)arg),
/* _callargs_chk */ (&ret, stub_errno, path, cmd, uid, arg),
/* _callargs_err */ (&errno, (const char *)path, cmd, uid, (void *)arg),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(arg) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(154, int, nlm_syscall,
/* _protoargs */ (int debug_level, int grace_period, int addr_count, struct chericap * addrs),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int debug_level, int grace_period, int addr_count, __capability struct chericap * addrs),
/* _protoargs_err */ (__capability int *stub_errno, int debug_level, int grace_period, int addr_count, __capability struct chericap * addrs),
/* _callargs */ (debug_level, grace_period, addr_count, (struct chericap *)addrs),
/* _callargs_chk */ (&ret, stub_errno, debug_level, grace_period, addr_count, addrs),
/* _callargs_err */ (&errno, debug_level, grace_period, addr_count, (struct chericap *)addrs),
/* _localcheck */ {if (!(cheri_getperm(addrs) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(155, int, nfssvc,
/* _protoargs */ (int flag, void * argp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int flag, __capability void * argp),
/* _protoargs_err */ (__capability int *stub_errno, int flag, __capability void * argp),
/* _callargs */ (flag, (void *)argp),
/* _callargs_chk */ (&ret, stub_errno, flag, argp),
/* _callargs_err */ (&errno, flag, (void *)argp),
/* _localcheck */ {if (!(cheri_getperm(argp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(160, int, lgetfh,
/* _protoargs */ (const char * fname, struct fhandle * fhp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * fname, __capability struct fhandle * fhp),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * fname, __capability struct fhandle * fhp),
/* _callargs */ ((const char *)fname, (struct fhandle *)fhp),
/* _callargs_chk */ (&ret, stub_errno, fname, fhp),
/* _callargs_err */ (&errno, (const char *)fname, (struct fhandle *)fhp),
/* _localcheck */ {if (!(cheri_getperm(fname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(fhp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(161, int, getfh,
/* _protoargs */ (const char * fname, struct fhandle * fhp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * fname, __capability struct fhandle * fhp),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * fname, __capability struct fhandle * fhp),
/* _callargs */ ((const char *)fname, (struct fhandle *)fhp),
/* _callargs_chk */ (&ret, stub_errno, fname, fhp),
/* _callargs_err */ (&errno, (const char *)fname, (struct fhandle *)fhp),
/* _localcheck */ {if (!(cheri_getperm(fname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(fhp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(165, int, sysarch,
/* _protoargs */ (int op, char * parms),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int op, __capability char * parms),
/* _protoargs_err */ (__capability int *stub_errno, int op, __capability char * parms),
/* _callargs */ (op, (char *)parms),
/* _callargs_chk */ (&ret, stub_errno, op, parms),
/* _callargs_err */ (&errno, op, (char *)parms),
/* _localcheck */ {if (!(cheri_getperm(parms) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(166, int, rtprio,
/* _protoargs */ (int function, pid_t pid, struct rtprio * rtp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int function, pid_t pid, __capability struct rtprio * rtp),
/* _protoargs_err */ (__capability int *stub_errno, int function, pid_t pid, __capability struct rtprio * rtp),
/* _callargs */ (function, pid, (struct rtprio *)rtp),
/* _callargs_chk */ (&ret, stub_errno, function, pid, rtp),
/* _callargs_err */ (&errno, function, pid, (struct rtprio *)rtp),
/* _localcheck */ {if (!(cheri_getperm(rtp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(175, int, setfib,
/* _protoargs */ (int fibnum),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fibnum),
/* _protoargs_err */ (__capability int *stub_errno, int fibnum),
/* _callargs */ (fibnum),
/* _callargs_chk */ (&ret, stub_errno, fibnum),
/* _callargs_err */ (&errno, fibnum),
/* _localcheck */ {}
)
SYS_STUB(176, int, ntp_adjtime,
/* _protoargs */ (struct timex * tp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct timex * tp),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct timex * tp),
/* _callargs */ ((struct timex *)tp),
/* _callargs_chk */ (&ret, stub_errno, tp),
/* _callargs_err */ (&errno, (struct timex *)tp),
/* _localcheck */ {if (!(cheri_getperm(tp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(181, int, setgid,
/* _protoargs */ (gid_t gid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, gid_t gid),
/* _protoargs_err */ (__capability int *stub_errno, gid_t gid),
/* _callargs */ (gid),
/* _callargs_chk */ (&ret, stub_errno, gid),
/* _callargs_err */ (&errno, gid),
/* _localcheck */ {}
)
SYS_STUB(182, int, setegid,
/* _protoargs */ (gid_t egid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, gid_t egid),
/* _protoargs_err */ (__capability int *stub_errno, gid_t egid),
/* _callargs */ (egid),
/* _callargs_chk */ (&ret, stub_errno, egid),
/* _callargs_err */ (&errno, egid),
/* _localcheck */ {}
)
SYS_STUB(183, int, seteuid,
/* _protoargs */ (uid_t euid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, uid_t euid),
/* _protoargs_err */ (__capability int *stub_errno, uid_t euid),
/* _callargs */ (euid),
/* _callargs_chk */ (&ret, stub_errno, euid),
/* _callargs_err */ (&errno, euid),
/* _localcheck */ {}
)
SYS_STUB(188, int, stat,
/* _protoargs */ (const char * path, struct stat * ub),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, __capability struct stat * ub),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, __capability struct stat * ub),
/* _callargs */ ((const char *)path, (struct stat *)ub),
/* _callargs_chk */ (&ret, stub_errno, path, ub),
/* _callargs_err */ (&errno, (const char *)path, (struct stat *)ub),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(ub) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(189, int, fstat,
/* _protoargs */ (int fd, struct stat * sb),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability struct stat * sb),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability struct stat * sb),
/* _callargs */ (fd, (struct stat *)sb),
/* _callargs_chk */ (&ret, stub_errno, fd, sb),
/* _callargs_err */ (&errno, fd, (struct stat *)sb),
/* _localcheck */ {if (!(cheri_getperm(sb) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(190, int, lstat,
/* _protoargs */ (const char * path, struct stat * ub),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, __capability struct stat * ub),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, __capability struct stat * ub),
/* _callargs */ ((const char *)path, (struct stat *)ub),
/* _callargs_chk */ (&ret, stub_errno, path, ub),
/* _callargs_err */ (&errno, (const char *)path, (struct stat *)ub),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(ub) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(191, int, pathconf,
/* _protoargs */ (const char * path, int name),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int name),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int name),
/* _callargs */ ((const char *)path, name),
/* _callargs_chk */ (&ret, stub_errno, path, name),
/* _callargs_err */ (&errno, (const char *)path, name),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(192, int, fpathconf,
/* _protoargs */ (int fd, int name),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, int name),
/* _protoargs_err */ (__capability int *stub_errno, int fd, int name),
/* _callargs */ (fd, name),
/* _callargs_chk */ (&ret, stub_errno, fd, name),
/* _callargs_err */ (&errno, fd, name),
/* _localcheck */ {}
)
SYS_STUB(194, int, getrlimit,
/* _protoargs */ (u_int which, struct rlimit * rlp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, u_int which, __capability struct rlimit * rlp),
/* _protoargs_err */ (__capability int *stub_errno, u_int which, __capability struct rlimit * rlp),
/* _callargs */ (which, (struct rlimit *)rlp),
/* _callargs_chk */ (&ret, stub_errno, which, rlp),
/* _callargs_err */ (&errno, which, (struct rlimit *)rlp),
/* _localcheck */ {if (!(cheri_getperm(rlp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(195, int, setrlimit,
/* _protoargs */ (u_int which, struct rlimit * rlp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, u_int which, __capability struct rlimit * rlp),
/* _protoargs_err */ (__capability int *stub_errno, u_int which, __capability struct rlimit * rlp),
/* _callargs */ (which, (struct rlimit *)rlp),
/* _callargs_chk */ (&ret, stub_errno, which, rlp),
/* _callargs_err */ (&errno, which, (struct rlimit *)rlp),
/* _localcheck */ {if (!(cheri_getperm(rlp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(196, int, getdirentries,
/* _protoargs */ (int fd, char * buf, u_int count, long * basep),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability char * buf, u_int count, __capability long * basep),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability char * buf, u_int count, __capability long * basep),
/* _callargs */ (fd, (char *)buf, count, (long *)basep),
/* _callargs_chk */ (&ret, stub_errno, fd, buf, count, basep),
/* _callargs_err */ (&errno, fd, (char *)buf, count, (long *)basep),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(basep) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(202, int, __sysctl,
/* _protoargs */ (int * name, u_int namelen, void * old, size_t * oldlenp, void * new, size_t newlen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability int * name, u_int namelen, __capability void * old, __capability size_t * oldlenp, __capability void * new, size_t newlen),
/* _protoargs_err */ (__capability int *stub_errno, __capability int * name, u_int namelen, __capability void * old, __capability size_t * oldlenp, __capability void * new, size_t newlen),
/* _callargs */ ((int *)name, namelen, (void *)old, (size_t *)oldlenp, (void *)new, newlen),
/* _callargs_chk */ (&ret, stub_errno, name, namelen, old, oldlenp, new, newlen),
/* _callargs_err */ (&errno, (int *)name, namelen, (void *)old, (size_t *)oldlenp, (void *)new, newlen),
/* _localcheck */ {if (!(cheri_getperm(name) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(old) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(oldlenp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(new) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(203, int, mlock,
/* _protoargs */ (const void * addr, size_t len),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const void * addr, size_t len),
/* _protoargs_err */ (__capability int *stub_errno, __capability const void * addr, size_t len),
/* _callargs */ ((const void *)addr, len),
/* _callargs_chk */ (&ret, stub_errno, addr, len),
/* _callargs_err */ (&errno, (const void *)addr, len),
/* _localcheck */ {if (!(cheri_getperm(addr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(204, int, munlock,
/* _protoargs */ (const void * addr, size_t len),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const void * addr, size_t len),
/* _protoargs_err */ (__capability int *stub_errno, __capability const void * addr, size_t len),
/* _callargs */ ((const void *)addr, len),
/* _callargs_chk */ (&ret, stub_errno, addr, len),
/* _callargs_err */ (&errno, (const void *)addr, len),
/* _localcheck */ {if (!(cheri_getperm(addr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(205, int, undelete,
/* _protoargs */ (const char * path),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path),
/* _callargs */ ((const char *)path),
/* _callargs_chk */ (&ret, stub_errno, path),
/* _callargs_err */ (&errno, (const char *)path),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(206, int, futimes,
/* _protoargs */ (int fd, const struct timeval * tptr),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const struct timeval * tptr),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const struct timeval * tptr),
/* _callargs */ (fd, (const struct timeval *)tptr),
/* _callargs_chk */ (&ret, stub_errno, fd, tptr),
/* _callargs_err */ (&errno, fd, (const struct timeval *)tptr),
/* _localcheck */ {if (!(cheri_getperm(tptr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(207, int, getpgid,
/* _protoargs */ (pid_t pid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, pid_t pid),
/* _protoargs_err */ (__capability int *stub_errno, pid_t pid),
/* _callargs */ (pid),
/* _callargs_chk */ (&ret, stub_errno, pid),
/* _callargs_err */ (&errno, pid),
/* _localcheck */ {}
)
SYS_STUB(209, int, poll,
/* _protoargs */ (struct pollfd * fds, u_int nfds, int timeout),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct pollfd * fds, u_int nfds, int timeout),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct pollfd * fds, u_int nfds, int timeout),
/* _callargs */ ((struct pollfd *)fds, nfds, timeout),
/* _callargs_chk */ (&ret, stub_errno, fds, nfds, timeout),
/* _callargs_err */ (&errno, (struct pollfd *)fds, nfds, timeout),
/* _localcheck */ {if (!(cheri_getperm(fds) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(221, int, semget,
/* _protoargs */ (key_t key, int nsems, int semflg),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, key_t key, int nsems, int semflg),
/* _protoargs_err */ (__capability int *stub_errno, key_t key, int nsems, int semflg),
/* _callargs */ (key, nsems, semflg),
/* _callargs_chk */ (&ret, stub_errno, key, nsems, semflg),
/* _callargs_err */ (&errno, key, nsems, semflg),
/* _localcheck */ {}
)
SYS_STUB(222, int, semop,
/* _protoargs */ (int semid, struct sembuf * sops, u_int nsops),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int semid, __capability struct sembuf * sops, u_int nsops),
/* _protoargs_err */ (__capability int *stub_errno, int semid, __capability struct sembuf * sops, u_int nsops),
/* _callargs */ (semid, (struct sembuf *)sops, nsops),
/* _callargs_chk */ (&ret, stub_errno, semid, sops, nsops),
/* _callargs_err */ (&errno, semid, (struct sembuf *)sops, nsops),
/* _localcheck */ {if (!(cheri_getperm(sops) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(225, int, msgget,
/* _protoargs */ (key_t key, int msgflg),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, key_t key, int msgflg),
/* _protoargs_err */ (__capability int *stub_errno, key_t key, int msgflg),
/* _callargs */ (key, msgflg),
/* _callargs_chk */ (&ret, stub_errno, key, msgflg),
/* _callargs_err */ (&errno, key, msgflg),
/* _localcheck */ {}
)
SYS_STUB(226, int, msgsnd,
/* _protoargs */ (int msqid, void * msgp, size_t msgsz, int msgflg),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int msqid, __capability void * msgp, size_t msgsz, int msgflg),
/* _protoargs_err */ (__capability int *stub_errno, int msqid, __capability void * msgp, size_t msgsz, int msgflg),
/* _callargs */ (msqid, (void *)msgp, msgsz, msgflg),
/* _callargs_chk */ (&ret, stub_errno, msqid, msgp, msgsz, msgflg),
/* _callargs_err */ (&errno, msqid, (void *)msgp, msgsz, msgflg),
/* _localcheck */ {if (!(cheri_getperm(msgp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(227, int, msgrcv,
/* _protoargs */ (int msqid, void * msgp, size_t msgsz, long msgtyp, int msgflg),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int msqid, __capability void * msgp, size_t msgsz, long msgtyp, int msgflg),
/* _protoargs_err */ (__capability int *stub_errno, int msqid, __capability void * msgp, size_t msgsz, long msgtyp, int msgflg),
/* _callargs */ (msqid, (void *)msgp, msgsz, msgtyp, msgflg),
/* _callargs_chk */ (&ret, stub_errno, msqid, msgp, msgsz, msgtyp, msgflg),
/* _callargs_err */ (&errno, msqid, (void *)msgp, msgsz, msgtyp, msgflg),
/* _localcheck */ {if (!(cheri_getperm(msgp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(228, void*, shmat,
/* _protoargs */ (int shmid, void * shmaddr, int shmflg),
/* _protoargs_chk */ (void* *retp , __capability int *stub_errno, int shmid, __capability void * shmaddr, int shmflg),
/* _protoargs_err */ (__capability int *stub_errno, int shmid, __capability void * shmaddr, int shmflg),
/* _callargs */ (shmid, (void *)shmaddr, shmflg),
/* _callargs_chk */ (&ret, stub_errno, shmid, shmaddr, shmflg),
/* _callargs_err */ (&errno, shmid, (void *)shmaddr, shmflg),
/* _localcheck */ {if (!(cheri_getperm(shmaddr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((void*)-1);} }
)
SYS_STUB(230, int, shmdt,
/* _protoargs */ (void * shmaddr),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability void * shmaddr),
/* _protoargs_err */ (__capability int *stub_errno, __capability void * shmaddr),
/* _callargs */ ((void *)shmaddr),
/* _callargs_chk */ (&ret, stub_errno, shmaddr),
/* _callargs_err */ (&errno, (void *)shmaddr),
/* _localcheck */ {if (!(cheri_getperm(shmaddr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(231, int, shmget,
/* _protoargs */ (key_t key, int size, int shmflg),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, key_t key, int size, int shmflg),
/* _protoargs_err */ (__capability int *stub_errno, key_t key, int size, int shmflg),
/* _callargs */ (key, size, shmflg),
/* _callargs_chk */ (&ret, stub_errno, key, size, shmflg),
/* _callargs_err */ (&errno, key, size, shmflg),
/* _localcheck */ {}
)
SYS_STUB(232, int, clock_gettime,
/* _protoargs */ (clockid_t clock_id, struct timespec * tp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, clockid_t clock_id, __capability struct timespec * tp),
/* _protoargs_err */ (__capability int *stub_errno, clockid_t clock_id, __capability struct timespec * tp),
/* _callargs */ (clock_id, (struct timespec *)tp),
/* _callargs_chk */ (&ret, stub_errno, clock_id, tp),
/* _callargs_err */ (&errno, clock_id, (struct timespec *)tp),
/* _localcheck */ {if (!(cheri_getperm(tp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(233, int, clock_settime,
/* _protoargs */ (clockid_t clock_id, const struct timespec * tp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, clockid_t clock_id, __capability const struct timespec * tp),
/* _protoargs_err */ (__capability int *stub_errno, clockid_t clock_id, __capability const struct timespec * tp),
/* _callargs */ (clock_id, (const struct timespec *)tp),
/* _callargs_chk */ (&ret, stub_errno, clock_id, tp),
/* _callargs_err */ (&errno, clock_id, (const struct timespec *)tp),
/* _localcheck */ {if (!(cheri_getperm(tp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(234, int, clock_getres,
/* _protoargs */ (clockid_t clock_id, struct timespec * tp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, clockid_t clock_id, __capability struct timespec * tp),
/* _protoargs_err */ (__capability int *stub_errno, clockid_t clock_id, __capability struct timespec * tp),
/* _callargs */ (clock_id, (struct timespec *)tp),
/* _callargs_chk */ (&ret, stub_errno, clock_id, tp),
/* _callargs_err */ (&errno, clock_id, (struct timespec *)tp),
/* _localcheck */ {if (!(cheri_getperm(tp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(235, int, ktimer_create,
/* _protoargs */ (clockid_t clock_id, struct sigevent* evp, int * timerid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, clockid_t clock_id, __capability struct sigevent* evp, __capability int * timerid),
/* _protoargs_err */ (__capability int *stub_errno, clockid_t clock_id, __capability struct sigevent* evp, __capability int * timerid),
/* _callargs */ (clock_id, (struct sigevent*)evp, (int *)timerid),
/* _callargs_chk */ (&ret, stub_errno, clock_id, evp, timerid),
/* _callargs_err */ (&errno, clock_id, (struct sigevent*)evp, (int *)timerid),
/* _localcheck */ {if (!(cheri_getperm(evp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(timerid) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(236, int, ktimer_delete,
/* _protoargs */ (int timerid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int timerid),
/* _protoargs_err */ (__capability int *stub_errno, int timerid),
/* _callargs */ (timerid),
/* _callargs_chk */ (&ret, stub_errno, timerid),
/* _callargs_err */ (&errno, timerid),
/* _localcheck */ {}
)
SYS_STUB(237, int, ktimer_settime,
/* _protoargs */ (int timerid, int flags, const struct itimerspec * value, struct itimerspec * ovalue),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int timerid, int flags, __capability const struct itimerspec * value, __capability struct itimerspec * ovalue),
/* _protoargs_err */ (__capability int *stub_errno, int timerid, int flags, __capability const struct itimerspec * value, __capability struct itimerspec * ovalue),
/* _callargs */ (timerid, flags, (const struct itimerspec *)value, (struct itimerspec *)ovalue),
/* _callargs_chk */ (&ret, stub_errno, timerid, flags, value, ovalue),
/* _callargs_err */ (&errno, timerid, flags, (const struct itimerspec *)value, (struct itimerspec *)ovalue),
/* _localcheck */ {if (!(cheri_getperm(value) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(ovalue) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(238, int, ktimer_gettime,
/* _protoargs */ (int timerid, struct itimerspec * value),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int timerid, __capability struct itimerspec * value),
/* _protoargs_err */ (__capability int *stub_errno, int timerid, __capability struct itimerspec * value),
/* _callargs */ (timerid, (struct itimerspec *)value),
/* _callargs_chk */ (&ret, stub_errno, timerid, value),
/* _callargs_err */ (&errno, timerid, (struct itimerspec *)value),
/* _localcheck */ {if (!(cheri_getperm(value) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(239, int, ktimer_getoverrun,
/* _protoargs */ (int timerid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int timerid),
/* _protoargs_err */ (__capability int *stub_errno, int timerid),
/* _callargs */ (timerid),
/* _callargs_chk */ (&ret, stub_errno, timerid),
/* _callargs_err */ (&errno, timerid),
/* _localcheck */ {}
)
SYS_STUB(240, int, nanosleep,
/* _protoargs */ (const struct timespec * rqtp, struct timespec * rmtp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const struct timespec * rqtp, __capability struct timespec * rmtp),
/* _protoargs_err */ (__capability int *stub_errno, __capability const struct timespec * rqtp, __capability struct timespec * rmtp),
/* _callargs */ ((const struct timespec *)rqtp, (struct timespec *)rmtp),
/* _callargs_chk */ (&ret, stub_errno, rqtp, rmtp),
/* _callargs_err */ (&errno, (const struct timespec *)rqtp, (struct timespec *)rmtp),
/* _localcheck */ {if (!(cheri_getperm(rqtp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(rmtp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(241, int, ffclock_getcounter,
/* _protoargs */ (ffcounter * ffcount),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability ffcounter * ffcount),
/* _protoargs_err */ (__capability int *stub_errno, __capability ffcounter * ffcount),
/* _callargs */ ((ffcounter *)ffcount),
/* _callargs_chk */ (&ret, stub_errno, ffcount),
/* _callargs_err */ (&errno, (ffcounter *)ffcount),
/* _localcheck */ {if (!(cheri_getperm(ffcount) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(242, int, ffclock_setestimate,
/* _protoargs */ (struct ffclock_estimate * cest),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct ffclock_estimate * cest),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct ffclock_estimate * cest),
/* _callargs */ ((struct ffclock_estimate *)cest),
/* _callargs_chk */ (&ret, stub_errno, cest),
/* _callargs_err */ (&errno, (struct ffclock_estimate *)cest),
/* _localcheck */ {if (!(cheri_getperm(cest) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(243, int, ffclock_getestimate,
/* _protoargs */ (struct ffclock_estimate * cest),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct ffclock_estimate * cest),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct ffclock_estimate * cest),
/* _callargs */ ((struct ffclock_estimate *)cest),
/* _callargs_chk */ (&ret, stub_errno, cest),
/* _callargs_err */ (&errno, (struct ffclock_estimate *)cest),
/* _localcheck */ {if (!(cheri_getperm(cest) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(247, int, clock_getcpuclockid2,
/* _protoargs */ (id_t id, int which, clockid_t * clock_id),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, id_t id, int which, __capability clockid_t * clock_id),
/* _protoargs_err */ (__capability int *stub_errno, id_t id, int which, __capability clockid_t * clock_id),
/* _callargs */ (id, which, (clockid_t *)clock_id),
/* _callargs_chk */ (&ret, stub_errno, id, which, clock_id),
/* _callargs_err */ (&errno, id, which, (clockid_t *)clock_id),
/* _localcheck */ {if (!(cheri_getperm(clock_id) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(248, int, ntp_gettime,
/* _protoargs */ (struct ntptimeval * ntvp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct ntptimeval * ntvp),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct ntptimeval * ntvp),
/* _callargs */ ((struct ntptimeval *)ntvp),
/* _callargs_chk */ (&ret, stub_errno, ntvp),
/* _callargs_err */ (&errno, (struct ntptimeval *)ntvp),
/* _localcheck */ {if (!(cheri_getperm(ntvp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(250, int, minherit,
/* _protoargs */ (void * addr, size_t len, int inherit),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability void * addr, size_t len, int inherit),
/* _protoargs_err */ (__capability int *stub_errno, __capability void * addr, size_t len, int inherit),
/* _callargs */ ((void *)addr, len, inherit),
/* _callargs_chk */ (&ret, stub_errno, addr, len, inherit),
/* _callargs_err */ (&errno, (void *)addr, len, inherit),
/* _localcheck */ {if (!(cheri_getperm(addr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(251, int, rfork,
/* _protoargs */ (int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int flags),
/* _protoargs_err */ (__capability int *stub_errno, int flags),
/* _callargs */ (flags),
/* _callargs_chk */ (&ret, stub_errno, flags),
/* _callargs_err */ (&errno, flags),
/* _localcheck */ {}
)
SYS_STUB(253, int, issetugid,
/* _protoargs */ (void),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(254, int, lchown,
/* _protoargs */ (const char * path, int uid, int gid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int uid, int gid),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int uid, int gid),
/* _callargs */ ((const char *)path, uid, gid),
/* _callargs_chk */ (&ret, stub_errno, path, uid, gid),
/* _callargs_err */ (&errno, (const char *)path, uid, gid),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(255, int, aio_read,
/* _protoargs */ (struct aiocb* aiocbp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct aiocb* aiocbp),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct aiocb* aiocbp),
/* _callargs */ ((struct aiocb*)aiocbp),
/* _callargs_chk */ (&ret, stub_errno, aiocbp),
/* _callargs_err */ (&errno, (struct aiocb*)aiocbp),
/* _localcheck */ {if (!(cheri_getperm(aiocbp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(256, int, aio_write,
/* _protoargs */ (struct aiocb* aiocbp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct aiocb* aiocbp),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct aiocb* aiocbp),
/* _callargs */ ((struct aiocb*)aiocbp),
/* _callargs_chk */ (&ret, stub_errno, aiocbp),
/* _callargs_err */ (&errno, (struct aiocb*)aiocbp),
/* _localcheck */ {if (!(cheri_getperm(aiocbp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(257, int, lio_listio,
/* _protoargs */ (int mode, struct aiocb*const * acb_list, int nent, struct sigevent* sig),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int mode, __capability struct aiocb*const * acb_list, int nent, __capability struct sigevent* sig),
/* _protoargs_err */ (__capability int *stub_errno, int mode, __capability struct aiocb*const * acb_list, int nent, __capability struct sigevent* sig),
/* _callargs */ (mode, (struct aiocb*const *)acb_list, nent, (struct sigevent*)sig),
/* _callargs_chk */ (&ret, stub_errno, mode, acb_list, nent, sig),
/* _callargs_err */ (&errno, mode, (struct aiocb*const *)acb_list, nent, (struct sigevent*)sig),
/* _localcheck */ {if (!(cheri_getperm(acb_list) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(sig) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(272, int, getdents,
/* _protoargs */ (int fd, char * buf, size_t count),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability char * buf, size_t count),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability char * buf, size_t count),
/* _callargs */ (fd, (char *)buf, count),
/* _callargs_chk */ (&ret, stub_errno, fd, buf, count),
/* _callargs_err */ (&errno, fd, (char *)buf, count),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(274, int, lchmod,
/* _protoargs */ (const char * path, mode_t mode),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, mode_t mode),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, mode_t mode),
/* _callargs */ ((const char *)path, mode),
/* _callargs_chk */ (&ret, stub_errno, path, mode),
/* _callargs_err */ (&errno, (const char *)path, mode),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(276, int, lutimes,
/* _protoargs */ (const char * path, const struct timeval * tptr),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, __capability const struct timeval * tptr),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, __capability const struct timeval * tptr),
/* _callargs */ ((const char *)path, (const struct timeval *)tptr),
/* _callargs_chk */ (&ret, stub_errno, path, tptr),
/* _callargs_err */ (&errno, (const char *)path, (const struct timeval *)tptr),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(tptr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(278, int, nstat,
/* _protoargs */ (const char * path, struct nstat * ub),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, __capability struct nstat * ub),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, __capability struct nstat * ub),
/* _callargs */ ((const char *)path, (struct nstat *)ub),
/* _callargs_chk */ (&ret, stub_errno, path, ub),
/* _callargs_err */ (&errno, (const char *)path, (struct nstat *)ub),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(ub) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(279, int, nfstat,
/* _protoargs */ (int fd, struct nstat * sb),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability struct nstat * sb),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability struct nstat * sb),
/* _callargs */ (fd, (struct nstat *)sb),
/* _callargs_chk */ (&ret, stub_errno, fd, sb),
/* _callargs_err */ (&errno, fd, (struct nstat *)sb),
/* _localcheck */ {if (!(cheri_getperm(sb) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(280, int, nlstat,
/* _protoargs */ (const char * path, struct nstat * ub),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, __capability struct nstat * ub),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, __capability struct nstat * ub),
/* _callargs */ ((const char *)path, (struct nstat *)ub),
/* _callargs_chk */ (&ret, stub_errno, path, ub),
/* _callargs_err */ (&errno, (const char *)path, (struct nstat *)ub),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(ub) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(289, ssize_t, preadv,
/* _protoargs */ (int fd, struct iovec* iovp, u_int iovcnt, off_t offset),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int fd, __capability struct iovec* iovp, u_int iovcnt, off_t offset),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability struct iovec* iovp, u_int iovcnt, off_t offset),
/* _callargs */ (fd, (struct iovec*)iovp, iovcnt, offset),
/* _callargs_chk */ (&ret, stub_errno, fd, iovp, iovcnt, offset),
/* _callargs_err */ (&errno, fd, (struct iovec*)iovp, iovcnt, offset),
/* _localcheck */ {if (!(cheri_getperm(iovp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB_ARGHASPTRS(290, ssize_t, pwritev,
/* _protoargs */ (int fd, struct iovec* iovp, u_int iovcnt, off_t offset),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int fd, __capability struct iovec* iovp, u_int iovcnt, off_t offset),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability struct iovec* iovp, u_int iovcnt, off_t offset),
/* _callargs */ (fd, (struct iovec*)iovp, iovcnt, offset),
/* _callargs_chk */ (&ret, stub_errno, fd, iovp, iovcnt, offset),
/* _callargs_err */ (&errno, fd, (struct iovec*)iovp, iovcnt, offset),
/* _localcheck */ {if (!(cheri_getperm(iovp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(298, int, fhopen,
/* _protoargs */ (const struct fhandle * u_fhp, int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const struct fhandle * u_fhp, int flags),
/* _protoargs_err */ (__capability int *stub_errno, __capability const struct fhandle * u_fhp, int flags),
/* _callargs */ ((const struct fhandle *)u_fhp, flags),
/* _callargs_chk */ (&ret, stub_errno, u_fhp, flags),
/* _callargs_err */ (&errno, (const struct fhandle *)u_fhp, flags),
/* _localcheck */ {if (!(cheri_getperm(u_fhp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(299, int, fhstat,
/* _protoargs */ (const struct fhandle * u_fhp, struct stat * sb),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const struct fhandle * u_fhp, __capability struct stat * sb),
/* _protoargs_err */ (__capability int *stub_errno, __capability const struct fhandle * u_fhp, __capability struct stat * sb),
/* _callargs */ ((const struct fhandle *)u_fhp, (struct stat *)sb),
/* _callargs_chk */ (&ret, stub_errno, u_fhp, sb),
/* _callargs_err */ (&errno, (const struct fhandle *)u_fhp, (struct stat *)sb),
/* _localcheck */ {if (!(cheri_getperm(u_fhp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(sb) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(300, int, modnext,
/* _protoargs */ (int modid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int modid),
/* _protoargs_err */ (__capability int *stub_errno, int modid),
/* _callargs */ (modid),
/* _callargs_chk */ (&ret, stub_errno, modid),
/* _callargs_err */ (&errno, modid),
/* _localcheck */ {}
)
SYS_STUB(301, int, modstat,
/* _protoargs */ (int modid, struct module_stat * stat),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int modid, __capability struct module_stat * stat),
/* _protoargs_err */ (__capability int *stub_errno, int modid, __capability struct module_stat * stat),
/* _callargs */ (modid, (struct module_stat *)stat),
/* _callargs_chk */ (&ret, stub_errno, modid, stat),
/* _callargs_err */ (&errno, modid, (struct module_stat *)stat),
/* _localcheck */ {if (!(cheri_getperm(stat) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(302, int, modfnext,
/* _protoargs */ (int modid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int modid),
/* _protoargs_err */ (__capability int *stub_errno, int modid),
/* _callargs */ (modid),
/* _callargs_chk */ (&ret, stub_errno, modid),
/* _callargs_err */ (&errno, modid),
/* _localcheck */ {}
)
SYS_STUB(303, int, modfind,
/* _protoargs */ (const char * name),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * name),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * name),
/* _callargs */ ((const char *)name),
/* _callargs_chk */ (&ret, stub_errno, name),
/* _callargs_err */ (&errno, (const char *)name),
/* _localcheck */ {if (!(cheri_getperm(name) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(304, int, kldload,
/* _protoargs */ (const char * file),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * file),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * file),
/* _callargs */ ((const char *)file),
/* _callargs_chk */ (&ret, stub_errno, file),
/* _callargs_err */ (&errno, (const char *)file),
/* _localcheck */ {if (!(cheri_getperm(file) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(305, int, kldunload,
/* _protoargs */ (int fileid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fileid),
/* _protoargs_err */ (__capability int *stub_errno, int fileid),
/* _callargs */ (fileid),
/* _callargs_chk */ (&ret, stub_errno, fileid),
/* _callargs_err */ (&errno, fileid),
/* _localcheck */ {}
)
SYS_STUB(306, int, kldfind,
/* _protoargs */ (const char * file),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * file),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * file),
/* _callargs */ ((const char *)file),
/* _callargs_chk */ (&ret, stub_errno, file),
/* _callargs_err */ (&errno, (const char *)file),
/* _localcheck */ {if (!(cheri_getperm(file) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(307, int, kldnext,
/* _protoargs */ (int fileid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fileid),
/* _protoargs_err */ (__capability int *stub_errno, int fileid),
/* _callargs */ (fileid),
/* _callargs_chk */ (&ret, stub_errno, fileid),
/* _callargs_err */ (&errno, fileid),
/* _localcheck */ {}
)
SYS_STUB(308, int, kldstat,
/* _protoargs */ (int fileid, struct kld_file_stat * stat),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fileid, __capability struct kld_file_stat * stat),
/* _protoargs_err */ (__capability int *stub_errno, int fileid, __capability struct kld_file_stat * stat),
/* _callargs */ (fileid, (struct kld_file_stat *)stat),
/* _callargs_chk */ (&ret, stub_errno, fileid, stat),
/* _callargs_err */ (&errno, fileid, (struct kld_file_stat *)stat),
/* _localcheck */ {if (!(cheri_getperm(stat) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(309, int, kldfirstmod,
/* _protoargs */ (int fileid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fileid),
/* _protoargs_err */ (__capability int *stub_errno, int fileid),
/* _callargs */ (fileid),
/* _callargs_chk */ (&ret, stub_errno, fileid),
/* _callargs_err */ (&errno, fileid),
/* _localcheck */ {}
)
SYS_STUB(310, int, getsid,
/* _protoargs */ (pid_t pid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, pid_t pid),
/* _protoargs_err */ (__capability int *stub_errno, pid_t pid),
/* _callargs */ (pid),
/* _callargs_chk */ (&ret, stub_errno, pid),
/* _callargs_err */ (&errno, pid),
/* _localcheck */ {}
)
SYS_STUB(311, int, setresuid,
/* _protoargs */ (uid_t ruid, uid_t euid, uid_t suid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, uid_t ruid, uid_t euid, uid_t suid),
/* _protoargs_err */ (__capability int *stub_errno, uid_t ruid, uid_t euid, uid_t suid),
/* _callargs */ (ruid, euid, suid),
/* _callargs_chk */ (&ret, stub_errno, ruid, euid, suid),
/* _callargs_err */ (&errno, ruid, euid, suid),
/* _localcheck */ {}
)
SYS_STUB(312, int, setresgid,
/* _protoargs */ (gid_t rgid, gid_t egid, gid_t sgid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, gid_t rgid, gid_t egid, gid_t sgid),
/* _protoargs_err */ (__capability int *stub_errno, gid_t rgid, gid_t egid, gid_t sgid),
/* _callargs */ (rgid, egid, sgid),
/* _callargs_chk */ (&ret, stub_errno, rgid, egid, sgid),
/* _callargs_err */ (&errno, rgid, egid, sgid),
/* _localcheck */ {}
)
SYS_STUB_ARGHASPTRS(314, int, aio_return,
/* _protoargs */ (struct aiocb* aiocbp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct aiocb* aiocbp),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct aiocb* aiocbp),
/* _callargs */ ((struct aiocb*)aiocbp),
/* _callargs_chk */ (&ret, stub_errno, aiocbp),
/* _callargs_err */ (&errno, (struct aiocb*)aiocbp),
/* _localcheck */ {if (!(cheri_getperm(aiocbp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(315, int, aio_suspend,
/* _protoargs */ (struct aiocb*const * aiocbp, int nent, const struct timespec * timeout),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct aiocb*const * aiocbp, int nent, __capability const struct timespec * timeout),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct aiocb*const * aiocbp, int nent, __capability const struct timespec * timeout),
/* _callargs */ ((struct aiocb*const *)aiocbp, nent, (const struct timespec *)timeout),
/* _callargs_chk */ (&ret, stub_errno, aiocbp, nent, timeout),
/* _callargs_err */ (&errno, (struct aiocb*const *)aiocbp, nent, (const struct timespec *)timeout),
/* _localcheck */ {if (!(cheri_getperm(aiocbp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(timeout) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(316, int, aio_cancel,
/* _protoargs */ (int fd, struct aiocb* aiocbp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability struct aiocb* aiocbp),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability struct aiocb* aiocbp),
/* _callargs */ (fd, (struct aiocb*)aiocbp),
/* _callargs_chk */ (&ret, stub_errno, fd, aiocbp),
/* _callargs_err */ (&errno, fd, (struct aiocb*)aiocbp),
/* _localcheck */ {if (!(cheri_getperm(aiocbp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(317, int, aio_error,
/* _protoargs */ (struct aiocb* aiocbp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct aiocb* aiocbp),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct aiocb* aiocbp),
/* _callargs */ ((struct aiocb*)aiocbp),
/* _callargs_chk */ (&ret, stub_errno, aiocbp),
/* _callargs_err */ (&errno, (struct aiocb*)aiocbp),
/* _localcheck */ {if (!(cheri_getperm(aiocbp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(324, int, mlockall,
/* _protoargs */ (int how),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int how),
/* _protoargs_err */ (__capability int *stub_errno, int how),
/* _callargs */ (how),
/* _callargs_chk */ (&ret, stub_errno, how),
/* _callargs_err */ (&errno, how),
/* _localcheck */ {}
)
SYS_STUB(325, int, munlockall,
/* _protoargs */ (void),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(326, int, __getcwd,
/* _protoargs */ (char * buf, size_t buflen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability char * buf, size_t buflen),
/* _protoargs_err */ (__capability int *stub_errno, __capability char * buf, size_t buflen),
/* _callargs */ ((char *)buf, buflen),
/* _callargs_chk */ (&ret, stub_errno, buf, buflen),
/* _callargs_err */ (&errno, (char *)buf, buflen),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(327, int, sched_setparam,
/* _protoargs */ (pid_t pid, const struct sched_param * param),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, pid_t pid, __capability const struct sched_param * param),
/* _protoargs_err */ (__capability int *stub_errno, pid_t pid, __capability const struct sched_param * param),
/* _callargs */ (pid, (const struct sched_param *)param),
/* _callargs_chk */ (&ret, stub_errno, pid, param),
/* _callargs_err */ (&errno, pid, (const struct sched_param *)param),
/* _localcheck */ {if (!(cheri_getperm(param) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(328, int, sched_getparam,
/* _protoargs */ (pid_t pid, struct sched_param * param),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, pid_t pid, __capability struct sched_param * param),
/* _protoargs_err */ (__capability int *stub_errno, pid_t pid, __capability struct sched_param * param),
/* _callargs */ (pid, (struct sched_param *)param),
/* _callargs_chk */ (&ret, stub_errno, pid, param),
/* _callargs_err */ (&errno, pid, (struct sched_param *)param),
/* _localcheck */ {if (!(cheri_getperm(param) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(329, int, sched_setscheduler,
/* _protoargs */ (pid_t pid, int policy, const struct sched_param * param),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, pid_t pid, int policy, __capability const struct sched_param * param),
/* _protoargs_err */ (__capability int *stub_errno, pid_t pid, int policy, __capability const struct sched_param * param),
/* _callargs */ (pid, policy, (const struct sched_param *)param),
/* _callargs_chk */ (&ret, stub_errno, pid, policy, param),
/* _callargs_err */ (&errno, pid, policy, (const struct sched_param *)param),
/* _localcheck */ {if (!(cheri_getperm(param) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(330, int, sched_getscheduler,
/* _protoargs */ (pid_t pid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, pid_t pid),
/* _protoargs_err */ (__capability int *stub_errno, pid_t pid),
/* _callargs */ (pid),
/* _callargs_chk */ (&ret, stub_errno, pid),
/* _callargs_err */ (&errno, pid),
/* _localcheck */ {}
)
SYS_STUB(331, int, sched_yield,
/* _protoargs */ (void),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(332, int, sched_get_priority_max,
/* _protoargs */ (int policy),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int policy),
/* _protoargs_err */ (__capability int *stub_errno, int policy),
/* _callargs */ (policy),
/* _callargs_chk */ (&ret, stub_errno, policy),
/* _callargs_err */ (&errno, policy),
/* _localcheck */ {}
)
SYS_STUB(333, int, sched_get_priority_min,
/* _protoargs */ (int policy),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int policy),
/* _protoargs_err */ (__capability int *stub_errno, int policy),
/* _callargs */ (policy),
/* _callargs_chk */ (&ret, stub_errno, policy),
/* _callargs_err */ (&errno, policy),
/* _localcheck */ {}
)
SYS_STUB(334, int, sched_rr_get_interval,
/* _protoargs */ (pid_t pid, struct timespec * interval),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, pid_t pid, __capability struct timespec * interval),
/* _protoargs_err */ (__capability int *stub_errno, pid_t pid, __capability struct timespec * interval),
/* _callargs */ (pid, (struct timespec *)interval),
/* _callargs_chk */ (&ret, stub_errno, pid, interval),
/* _callargs_err */ (&errno, pid, (struct timespec *)interval),
/* _localcheck */ {if (!(cheri_getperm(interval) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(335, int, utrace,
/* _protoargs */ (const void * addr, size_t len),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const void * addr, size_t len),
/* _protoargs_err */ (__capability int *stub_errno, __capability const void * addr, size_t len),
/* _callargs */ ((const void *)addr, len),
/* _callargs_chk */ (&ret, stub_errno, addr, len),
/* _callargs_err */ (&errno, (const void *)addr, len),
/* _localcheck */ {if (!(cheri_getperm(addr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(337, int, kldsym,
/* _protoargs */ (int fileid, int cmd, struct kld_sym_lookup* data),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fileid, int cmd, __capability struct kld_sym_lookup* data),
/* _protoargs_err */ (__capability int *stub_errno, int fileid, int cmd, __capability struct kld_sym_lookup* data),
/* _callargs */ (fileid, cmd, (struct kld_sym_lookup*)data),
/* _callargs_chk */ (&ret, stub_errno, fileid, cmd, data),
/* _callargs_err */ (&errno, fileid, cmd, (struct kld_sym_lookup*)data),
/* _localcheck */ {if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(338, int, jail,
/* _protoargs */ (struct jail* jailp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct jail* jailp),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct jail* jailp),
/* _callargs */ ((struct jail*)jailp),
/* _callargs_chk */ (&ret, stub_errno, jailp),
/* _callargs_err */ (&errno, (struct jail*)jailp),
/* _localcheck */ {if (!(cheri_getperm(jailp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(340, int, sigprocmask,
/* _protoargs */ (int how, const sigset_t * set, sigset_t * oset),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int how, __capability const sigset_t * set, __capability sigset_t * oset),
/* _protoargs_err */ (__capability int *stub_errno, int how, __capability const sigset_t * set, __capability sigset_t * oset),
/* _callargs */ (how, (const sigset_t *)set, (sigset_t *)oset),
/* _callargs_chk */ (&ret, stub_errno, how, set, oset),
/* _callargs_err */ (&errno, how, (const sigset_t *)set, (sigset_t *)oset),
/* _localcheck */ {if (!(cheri_getperm(set) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(oset) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(341, int, sigsuspend,
/* _protoargs */ (const sigset_t * sigmask),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const sigset_t * sigmask),
/* _protoargs_err */ (__capability int *stub_errno, __capability const sigset_t * sigmask),
/* _callargs */ ((const sigset_t *)sigmask),
/* _callargs_chk */ (&ret, stub_errno, sigmask),
/* _callargs_err */ (&errno, (const sigset_t *)sigmask),
/* _localcheck */ {if (!(cheri_getperm(sigmask) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(343, int, sigpending,
/* _protoargs */ (sigset_t * set),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability sigset_t * set),
/* _protoargs_err */ (__capability int *stub_errno, __capability sigset_t * set),
/* _callargs */ ((sigset_t *)set),
/* _callargs_chk */ (&ret, stub_errno, set),
/* _callargs_err */ (&errno, (sigset_t *)set),
/* _localcheck */ {if (!(cheri_getperm(set) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(345, int, sigtimedwait,
/* _protoargs */ (const sigset_t * set, struct siginfo* info, const struct timespec * timeout),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const sigset_t * set, __capability struct siginfo* info, __capability const struct timespec * timeout),
/* _protoargs_err */ (__capability int *stub_errno, __capability const sigset_t * set, __capability struct siginfo* info, __capability const struct timespec * timeout),
/* _callargs */ ((const sigset_t *)set, (struct siginfo*)info, (const struct timespec *)timeout),
/* _callargs_chk */ (&ret, stub_errno, set, info, timeout),
/* _callargs_err */ (&errno, (const sigset_t *)set, (struct siginfo*)info, (const struct timespec *)timeout),
/* _localcheck */ {if (!(cheri_getperm(set) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(info) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(timeout) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(346, int, sigwaitinfo,
/* _protoargs */ (const sigset_t * set, struct siginfo* info),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const sigset_t * set, __capability struct siginfo* info),
/* _protoargs_err */ (__capability int *stub_errno, __capability const sigset_t * set, __capability struct siginfo* info),
/* _callargs */ ((const sigset_t *)set, (struct siginfo*)info),
/* _callargs_chk */ (&ret, stub_errno, set, info),
/* _callargs_err */ (&errno, (const sigset_t *)set, (struct siginfo*)info),
/* _localcheck */ {if (!(cheri_getperm(set) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(info) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(347, int, __acl_get_file,
/* _protoargs */ (const char * path, acl_type_t type, struct acl * aclp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, acl_type_t type, __capability struct acl * aclp),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, acl_type_t type, __capability struct acl * aclp),
/* _callargs */ ((const char *)path, type, (struct acl *)aclp),
/* _callargs_chk */ (&ret, stub_errno, path, type, aclp),
/* _callargs_err */ (&errno, (const char *)path, type, (struct acl *)aclp),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(aclp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(348, int, __acl_set_file,
/* _protoargs */ (const char * path, acl_type_t type, struct acl * aclp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, acl_type_t type, __capability struct acl * aclp),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, acl_type_t type, __capability struct acl * aclp),
/* _callargs */ ((const char *)path, type, (struct acl *)aclp),
/* _callargs_chk */ (&ret, stub_errno, path, type, aclp),
/* _callargs_err */ (&errno, (const char *)path, type, (struct acl *)aclp),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(aclp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(349, int, __acl_get_fd,
/* _protoargs */ (int filedes, acl_type_t type, struct acl * aclp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int filedes, acl_type_t type, __capability struct acl * aclp),
/* _protoargs_err */ (__capability int *stub_errno, int filedes, acl_type_t type, __capability struct acl * aclp),
/* _callargs */ (filedes, type, (struct acl *)aclp),
/* _callargs_chk */ (&ret, stub_errno, filedes, type, aclp),
/* _callargs_err */ (&errno, filedes, type, (struct acl *)aclp),
/* _localcheck */ {if (!(cheri_getperm(aclp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(350, int, __acl_set_fd,
/* _protoargs */ (int filedes, acl_type_t type, struct acl * aclp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int filedes, acl_type_t type, __capability struct acl * aclp),
/* _protoargs_err */ (__capability int *stub_errno, int filedes, acl_type_t type, __capability struct acl * aclp),
/* _callargs */ (filedes, type, (struct acl *)aclp),
/* _callargs_chk */ (&ret, stub_errno, filedes, type, aclp),
/* _callargs_err */ (&errno, filedes, type, (struct acl *)aclp),
/* _localcheck */ {if (!(cheri_getperm(aclp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(351, int, __acl_delete_file,
/* _protoargs */ (const char * path, acl_type_t type),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, acl_type_t type),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, acl_type_t type),
/* _callargs */ ((const char *)path, type),
/* _callargs_chk */ (&ret, stub_errno, path, type),
/* _callargs_err */ (&errno, (const char *)path, type),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(352, int, __acl_delete_fd,
/* _protoargs */ (int filedes, acl_type_t type),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int filedes, acl_type_t type),
/* _protoargs_err */ (__capability int *stub_errno, int filedes, acl_type_t type),
/* _callargs */ (filedes, type),
/* _callargs_chk */ (&ret, stub_errno, filedes, type),
/* _callargs_err */ (&errno, filedes, type),
/* _localcheck */ {}
)
SYS_STUB(353, int, __acl_aclcheck_file,
/* _protoargs */ (const char * path, acl_type_t type, struct acl * aclp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, acl_type_t type, __capability struct acl * aclp),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, acl_type_t type, __capability struct acl * aclp),
/* _callargs */ ((const char *)path, type, (struct acl *)aclp),
/* _callargs_chk */ (&ret, stub_errno, path, type, aclp),
/* _callargs_err */ (&errno, (const char *)path, type, (struct acl *)aclp),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(aclp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(354, int, __acl_aclcheck_fd,
/* _protoargs */ (int filedes, acl_type_t type, struct acl * aclp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int filedes, acl_type_t type, __capability struct acl * aclp),
/* _protoargs_err */ (__capability int *stub_errno, int filedes, acl_type_t type, __capability struct acl * aclp),
/* _callargs */ (filedes, type, (struct acl *)aclp),
/* _callargs_chk */ (&ret, stub_errno, filedes, type, aclp),
/* _callargs_err */ (&errno, filedes, type, (struct acl *)aclp),
/* _localcheck */ {if (!(cheri_getperm(aclp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(355, int, extattrctl,
/* _protoargs */ (const char * path, int cmd, const char * filename, int attrnamespace, const char * attrname),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int cmd, __capability const char * filename, int attrnamespace, __capability const char * attrname),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int cmd, __capability const char * filename, int attrnamespace, __capability const char * attrname),
/* _callargs */ ((const char *)path, cmd, (const char *)filename, attrnamespace, (const char *)attrname),
/* _callargs_chk */ (&ret, stub_errno, path, cmd, filename, attrnamespace, attrname),
/* _callargs_err */ (&errno, (const char *)path, cmd, (const char *)filename, attrnamespace, (const char *)attrname),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(filename) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(attrname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(356, ssize_t, extattr_set_file,
/* _protoargs */ (const char * path, int attrnamespace, const char * attrname, void * data, size_t nbytes),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, __capability const char * path, int attrnamespace, __capability const char * attrname, __capability void * data, size_t nbytes),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int attrnamespace, __capability const char * attrname, __capability void * data, size_t nbytes),
/* _callargs */ ((const char *)path, attrnamespace, (const char *)attrname, (void *)data, nbytes),
/* _callargs_chk */ (&ret, stub_errno, path, attrnamespace, attrname, data, nbytes),
/* _callargs_err */ (&errno, (const char *)path, attrnamespace, (const char *)attrname, (void *)data, nbytes),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(attrname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(357, ssize_t, extattr_get_file,
/* _protoargs */ (const char * path, int attrnamespace, const char * attrname, void * data, size_t nbytes),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, __capability const char * path, int attrnamespace, __capability const char * attrname, __capability void * data, size_t nbytes),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int attrnamespace, __capability const char * attrname, __capability void * data, size_t nbytes),
/* _callargs */ ((const char *)path, attrnamespace, (const char *)attrname, (void *)data, nbytes),
/* _callargs_chk */ (&ret, stub_errno, path, attrnamespace, attrname, data, nbytes),
/* _callargs_err */ (&errno, (const char *)path, attrnamespace, (const char *)attrname, (void *)data, nbytes),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(attrname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(358, int, extattr_delete_file,
/* _protoargs */ (const char * path, int attrnamespace, const char * attrname),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int attrnamespace, __capability const char * attrname),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int attrnamespace, __capability const char * attrname),
/* _callargs */ ((const char *)path, attrnamespace, (const char *)attrname),
/* _callargs_chk */ (&ret, stub_errno, path, attrnamespace, attrname),
/* _callargs_err */ (&errno, (const char *)path, attrnamespace, (const char *)attrname),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(attrname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(359, int, aio_waitcomplete,
/* _protoargs */ (struct aiocb** aiocbp, struct timespec * timeout),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct aiocb** aiocbp, __capability struct timespec * timeout),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct aiocb** aiocbp, __capability struct timespec * timeout),
/* _callargs */ ((struct aiocb**)aiocbp, (struct timespec *)timeout),
/* _callargs_chk */ (&ret, stub_errno, aiocbp, timeout),
/* _callargs_err */ (&errno, (struct aiocb**)aiocbp, (struct timespec *)timeout),
/* _localcheck */ {if (!(cheri_getperm(aiocbp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(timeout) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(360, int, getresuid,
/* _protoargs */ (uid_t * ruid, uid_t * euid, uid_t * suid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability uid_t * ruid, __capability uid_t * euid, __capability uid_t * suid),
/* _protoargs_err */ (__capability int *stub_errno, __capability uid_t * ruid, __capability uid_t * euid, __capability uid_t * suid),
/* _callargs */ ((uid_t *)ruid, (uid_t *)euid, (uid_t *)suid),
/* _callargs_chk */ (&ret, stub_errno, ruid, euid, suid),
/* _callargs_err */ (&errno, (uid_t *)ruid, (uid_t *)euid, (uid_t *)suid),
/* _localcheck */ {if (!(cheri_getperm(ruid) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(euid) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(suid) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(361, int, getresgid,
/* _protoargs */ (gid_t * rgid, gid_t * egid, gid_t * sgid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability gid_t * rgid, __capability gid_t * egid, __capability gid_t * sgid),
/* _protoargs_err */ (__capability int *stub_errno, __capability gid_t * rgid, __capability gid_t * egid, __capability gid_t * sgid),
/* _callargs */ ((gid_t *)rgid, (gid_t *)egid, (gid_t *)sgid),
/* _callargs_chk */ (&ret, stub_errno, rgid, egid, sgid),
/* _callargs_err */ (&errno, (gid_t *)rgid, (gid_t *)egid, (gid_t *)sgid),
/* _localcheck */ {if (!(cheri_getperm(rgid) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(egid) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(sgid) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(362, int, kqueue,
/* _protoargs */ (void),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB_ARGHASPTRS(363, int, kevent,
/* _protoargs */ (int fd, const struct kevent* changelist, int nchanges, struct kevent* eventlist, int nevents, const struct timespec * timeout),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const struct kevent* changelist, int nchanges, __capability struct kevent* eventlist, int nevents, __capability const struct timespec * timeout),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const struct kevent* changelist, int nchanges, __capability struct kevent* eventlist, int nevents, __capability const struct timespec * timeout),
/* _callargs */ (fd, (const struct kevent*)changelist, nchanges, (struct kevent*)eventlist, nevents, (const struct timespec *)timeout),
/* _callargs_chk */ (&ret, stub_errno, fd, changelist, nchanges, eventlist, nevents, timeout),
/* _callargs_err */ (&errno, fd, (const struct kevent*)changelist, nchanges, (struct kevent*)eventlist, nevents, (const struct timespec *)timeout),
/* _localcheck */ {if (!(cheri_getperm(changelist) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(eventlist) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(timeout) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(371, ssize_t, extattr_set_fd,
/* _protoargs */ (int fd, int attrnamespace, const char * attrname, void * data, size_t nbytes),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int fd, int attrnamespace, __capability const char * attrname, __capability void * data, size_t nbytes),
/* _protoargs_err */ (__capability int *stub_errno, int fd, int attrnamespace, __capability const char * attrname, __capability void * data, size_t nbytes),
/* _callargs */ (fd, attrnamespace, (const char *)attrname, (void *)data, nbytes),
/* _callargs_chk */ (&ret, stub_errno, fd, attrnamespace, attrname, data, nbytes),
/* _callargs_err */ (&errno, fd, attrnamespace, (const char *)attrname, (void *)data, nbytes),
/* _localcheck */ {if (!(cheri_getperm(attrname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(372, ssize_t, extattr_get_fd,
/* _protoargs */ (int fd, int attrnamespace, const char * attrname, void * data, size_t nbytes),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int fd, int attrnamespace, __capability const char * attrname, __capability void * data, size_t nbytes),
/* _protoargs_err */ (__capability int *stub_errno, int fd, int attrnamespace, __capability const char * attrname, __capability void * data, size_t nbytes),
/* _callargs */ (fd, attrnamespace, (const char *)attrname, (void *)data, nbytes),
/* _callargs_chk */ (&ret, stub_errno, fd, attrnamespace, attrname, data, nbytes),
/* _callargs_err */ (&errno, fd, attrnamespace, (const char *)attrname, (void *)data, nbytes),
/* _localcheck */ {if (!(cheri_getperm(attrname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(373, int, extattr_delete_fd,
/* _protoargs */ (int fd, int attrnamespace, const char * attrname),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, int attrnamespace, __capability const char * attrname),
/* _protoargs_err */ (__capability int *stub_errno, int fd, int attrnamespace, __capability const char * attrname),
/* _callargs */ (fd, attrnamespace, (const char *)attrname),
/* _callargs_chk */ (&ret, stub_errno, fd, attrnamespace, attrname),
/* _callargs_err */ (&errno, fd, attrnamespace, (const char *)attrname),
/* _localcheck */ {if (!(cheri_getperm(attrname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(374, int, __setugid,
/* _protoargs */ (int flag),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int flag),
/* _protoargs_err */ (__capability int *stub_errno, int flag),
/* _callargs */ (flag),
/* _callargs_chk */ (&ret, stub_errno, flag),
/* _callargs_err */ (&errno, flag),
/* _localcheck */ {}
)
SYS_STUB(376, int, eaccess,
/* _protoargs */ (char * path, int amode),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability char * path, int amode),
/* _protoargs_err */ (__capability int *stub_errno, __capability char * path, int amode),
/* _callargs */ ((char *)path, amode),
/* _callargs_chk */ (&ret, stub_errno, path, amode),
/* _callargs_err */ (&errno, (char *)path, amode),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(378, int, nmount,
/* _protoargs */ (struct iovec* iovp, unsigned int iovcnt, int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct iovec* iovp, unsigned int iovcnt, int flags),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct iovec* iovp, unsigned int iovcnt, int flags),
/* _callargs */ ((struct iovec*)iovp, iovcnt, flags),
/* _callargs_chk */ (&ret, stub_errno, iovp, iovcnt, flags),
/* _callargs_err */ (&errno, (struct iovec*)iovp, iovcnt, flags),
/* _localcheck */ {if (!(cheri_getperm(iovp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(384, int, __mac_get_proc,
/* _protoargs */ (struct mac* mac_p),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct mac* mac_p),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct mac* mac_p),
/* _callargs */ ((struct mac*)mac_p),
/* _callargs_chk */ (&ret, stub_errno, mac_p),
/* _callargs_err */ (&errno, (struct mac*)mac_p),
/* _localcheck */ {if (!(cheri_getperm(mac_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(385, int, __mac_set_proc,
/* _protoargs */ (struct mac* mac_p),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct mac* mac_p),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct mac* mac_p),
/* _callargs */ ((struct mac*)mac_p),
/* _callargs_chk */ (&ret, stub_errno, mac_p),
/* _callargs_err */ (&errno, (struct mac*)mac_p),
/* _localcheck */ {if (!(cheri_getperm(mac_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(386, int, __mac_get_fd,
/* _protoargs */ (int fd, struct mac* mac_p),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability struct mac* mac_p),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability struct mac* mac_p),
/* _callargs */ (fd, (struct mac*)mac_p),
/* _callargs_chk */ (&ret, stub_errno, fd, mac_p),
/* _callargs_err */ (&errno, fd, (struct mac*)mac_p),
/* _localcheck */ {if (!(cheri_getperm(mac_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(387, int, __mac_get_file,
/* _protoargs */ (const char * path_p, struct mac* mac_p),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path_p, __capability struct mac* mac_p),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path_p, __capability struct mac* mac_p),
/* _callargs */ ((const char *)path_p, (struct mac*)mac_p),
/* _callargs_chk */ (&ret, stub_errno, path_p, mac_p),
/* _callargs_err */ (&errno, (const char *)path_p, (struct mac*)mac_p),
/* _localcheck */ {if (!(cheri_getperm(path_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(mac_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(388, int, __mac_set_fd,
/* _protoargs */ (int fd, struct mac* mac_p),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability struct mac* mac_p),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability struct mac* mac_p),
/* _callargs */ (fd, (struct mac*)mac_p),
/* _callargs_chk */ (&ret, stub_errno, fd, mac_p),
/* _callargs_err */ (&errno, fd, (struct mac*)mac_p),
/* _localcheck */ {if (!(cheri_getperm(mac_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(389, int, __mac_set_file,
/* _protoargs */ (const char * path_p, struct mac* mac_p),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path_p, __capability struct mac* mac_p),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path_p, __capability struct mac* mac_p),
/* _callargs */ ((const char *)path_p, (struct mac*)mac_p),
/* _callargs_chk */ (&ret, stub_errno, path_p, mac_p),
/* _callargs_err */ (&errno, (const char *)path_p, (struct mac*)mac_p),
/* _localcheck */ {if (!(cheri_getperm(path_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(mac_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(390, int, kenv,
/* _protoargs */ (int what, const char * name, char * value, int len),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int what, __capability const char * name, __capability char * value, int len),
/* _protoargs_err */ (__capability int *stub_errno, int what, __capability const char * name, __capability char * value, int len),
/* _callargs */ (what, (const char *)name, (char *)value, len),
/* _callargs_chk */ (&ret, stub_errno, what, name, value, len),
/* _callargs_err */ (&errno, what, (const char *)name, (char *)value, len),
/* _localcheck */ {if (!(cheri_getperm(name) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(value) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(391, int, lchflags,
/* _protoargs */ (const char * path, u_long flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, u_long flags),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, u_long flags),
/* _callargs */ ((const char *)path, flags),
/* _callargs_chk */ (&ret, stub_errno, path, flags),
/* _callargs_err */ (&errno, (const char *)path, flags),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(392, int, uuidgen,
/* _protoargs */ (struct uuid * store, int count),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct uuid * store, int count),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct uuid * store, int count),
/* _callargs */ ((struct uuid *)store, count),
/* _callargs_chk */ (&ret, stub_errno, store, count),
/* _callargs_err */ (&errno, (struct uuid *)store, count),
/* _localcheck */ {if (!(cheri_getperm(store) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(393, int, sendfile,
/* _protoargs */ (int fd, int s, off_t offset, size_t nbytes, struct sf_hdtr* hdtr, off_t * sbytes, int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, int s, off_t offset, size_t nbytes, __capability struct sf_hdtr* hdtr, __capability off_t * sbytes, int flags),
/* _protoargs_err */ (__capability int *stub_errno, int fd, int s, off_t offset, size_t nbytes, __capability struct sf_hdtr* hdtr, __capability off_t * sbytes, int flags),
/* _callargs */ (fd, s, offset, nbytes, (struct sf_hdtr*)hdtr, (off_t *)sbytes, flags),
/* _callargs_chk */ (&ret, stub_errno, fd, s, offset, nbytes, hdtr, sbytes, flags),
/* _callargs_err */ (&errno, fd, s, offset, nbytes, (struct sf_hdtr*)hdtr, (off_t *)sbytes, flags),
/* _localcheck */ {if (!(cheri_getperm(hdtr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(sbytes) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(394, int, mac_syscall,
/* _protoargs */ (const char * policy, int call, void * arg),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * policy, int call, __capability void * arg),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * policy, int call, __capability void * arg),
/* _callargs */ ((const char *)policy, call, (void *)arg),
/* _callargs_chk */ (&ret, stub_errno, policy, call, arg),
/* _callargs_err */ (&errno, (const char *)policy, call, (void *)arg),
/* _localcheck */ {if (!(cheri_getperm(policy) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(arg) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(395, int, getfsstat,
/* _protoargs */ (struct statfs * buf, long bufsize, int mode),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct statfs * buf, long bufsize, int mode),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct statfs * buf, long bufsize, int mode),
/* _callargs */ ((struct statfs *)buf, bufsize, mode),
/* _callargs_chk */ (&ret, stub_errno, buf, bufsize, mode),
/* _callargs_err */ (&errno, (struct statfs *)buf, bufsize, mode),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(396, int, statfs,
/* _protoargs */ (char * path, struct statfs * buf),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability char * path, __capability struct statfs * buf),
/* _protoargs_err */ (__capability int *stub_errno, __capability char * path, __capability struct statfs * buf),
/* _callargs */ ((char *)path, (struct statfs *)buf),
/* _callargs_chk */ (&ret, stub_errno, path, buf),
/* _callargs_err */ (&errno, (char *)path, (struct statfs *)buf),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(397, int, fstatfs,
/* _protoargs */ (int fd, struct statfs * buf),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability struct statfs * buf),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability struct statfs * buf),
/* _callargs */ (fd, (struct statfs *)buf),
/* _callargs_chk */ (&ret, stub_errno, fd, buf),
/* _callargs_err */ (&errno, fd, (struct statfs *)buf),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(398, int, fhstatfs,
/* _protoargs */ (const struct fhandle * u_fhp, struct statfs * buf),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const struct fhandle * u_fhp, __capability struct statfs * buf),
/* _protoargs_err */ (__capability int *stub_errno, __capability const struct fhandle * u_fhp, __capability struct statfs * buf),
/* _callargs */ ((const struct fhandle *)u_fhp, (struct statfs *)buf),
/* _callargs_chk */ (&ret, stub_errno, u_fhp, buf),
/* _callargs_err */ (&errno, (const struct fhandle *)u_fhp, (struct statfs *)buf),
/* _localcheck */ {if (!(cheri_getperm(u_fhp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(409, int, __mac_get_pid,
/* _protoargs */ (pid_t pid, struct mac* mac_p),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, pid_t pid, __capability struct mac* mac_p),
/* _protoargs_err */ (__capability int *stub_errno, pid_t pid, __capability struct mac* mac_p),
/* _callargs */ (pid, (struct mac*)mac_p),
/* _callargs_chk */ (&ret, stub_errno, pid, mac_p),
/* _callargs_err */ (&errno, pid, (struct mac*)mac_p),
/* _localcheck */ {if (!(cheri_getperm(mac_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(410, int, __mac_get_link,
/* _protoargs */ (const char * path_p, struct mac* mac_p),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path_p, __capability struct mac* mac_p),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path_p, __capability struct mac* mac_p),
/* _callargs */ ((const char *)path_p, (struct mac*)mac_p),
/* _callargs_chk */ (&ret, stub_errno, path_p, mac_p),
/* _callargs_err */ (&errno, (const char *)path_p, (struct mac*)mac_p),
/* _localcheck */ {if (!(cheri_getperm(path_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(mac_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(411, int, __mac_set_link,
/* _protoargs */ (const char * path_p, struct mac* mac_p),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path_p, __capability struct mac* mac_p),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path_p, __capability struct mac* mac_p),
/* _callargs */ ((const char *)path_p, (struct mac*)mac_p),
/* _callargs_chk */ (&ret, stub_errno, path_p, mac_p),
/* _callargs_err */ (&errno, (const char *)path_p, (struct mac*)mac_p),
/* _localcheck */ {if (!(cheri_getperm(path_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(mac_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(412, ssize_t, extattr_set_link,
/* _protoargs */ (const char * path, int attrnamespace, const char * attrname, void * data, size_t nbytes),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, __capability const char * path, int attrnamespace, __capability const char * attrname, __capability void * data, size_t nbytes),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int attrnamespace, __capability const char * attrname, __capability void * data, size_t nbytes),
/* _callargs */ ((const char *)path, attrnamespace, (const char *)attrname, (void *)data, nbytes),
/* _callargs_chk */ (&ret, stub_errno, path, attrnamespace, attrname, data, nbytes),
/* _callargs_err */ (&errno, (const char *)path, attrnamespace, (const char *)attrname, (void *)data, nbytes),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(attrname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(413, ssize_t, extattr_get_link,
/* _protoargs */ (const char * path, int attrnamespace, const char * attrname, void * data, size_t nbytes),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, __capability const char * path, int attrnamespace, __capability const char * attrname, __capability void * data, size_t nbytes),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int attrnamespace, __capability const char * attrname, __capability void * data, size_t nbytes),
/* _callargs */ ((const char *)path, attrnamespace, (const char *)attrname, (void *)data, nbytes),
/* _callargs_chk */ (&ret, stub_errno, path, attrnamespace, attrname, data, nbytes),
/* _callargs_err */ (&errno, (const char *)path, attrnamespace, (const char *)attrname, (void *)data, nbytes),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(attrname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(414, int, extattr_delete_link,
/* _protoargs */ (const char * path, int attrnamespace, const char * attrname),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int attrnamespace, __capability const char * attrname),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int attrnamespace, __capability const char * attrname),
/* _callargs */ ((const char *)path, attrnamespace, (const char *)attrname),
/* _callargs_chk */ (&ret, stub_errno, path, attrnamespace, attrname),
/* _callargs_err */ (&errno, (const char *)path, attrnamespace, (const char *)attrname),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(attrname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(415, int, __mac_execve,
/* _protoargs */ (char * fname, struct chericap * argv, struct chericap * envv, struct mac* mac_p),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability char * fname, __capability struct chericap * argv, __capability struct chericap * envv, __capability struct mac* mac_p),
/* _protoargs_err */ (__capability int *stub_errno, __capability char * fname, __capability struct chericap * argv, __capability struct chericap * envv, __capability struct mac* mac_p),
/* _callargs */ ((char *)fname, (struct chericap *)argv, (struct chericap *)envv, (struct mac*)mac_p),
/* _callargs_chk */ (&ret, stub_errno, fname, argv, envv, mac_p),
/* _callargs_err */ (&errno, (char *)fname, (struct chericap *)argv, (struct chericap *)envv, (struct mac*)mac_p),
/* _localcheck */ {if (!(cheri_getperm(fname) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(argv) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(envv) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(mac_p) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(416, int, sigaction,
/* _protoargs */ (int sig, struct sigaction* act, struct sigaction* oact),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int sig, __capability struct sigaction* act, __capability struct sigaction* oact),
/* _protoargs_err */ (__capability int *stub_errno, int sig, __capability struct sigaction* act, __capability struct sigaction* oact),
/* _callargs */ (sig, (struct sigaction*)act, (struct sigaction*)oact),
/* _callargs_chk */ (&ret, stub_errno, sig, act, oact),
/* _callargs_err */ (&errno, sig, (struct sigaction*)act, (struct sigaction*)oact),
/* _localcheck */ {if (!(cheri_getperm(act) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(oact) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(417, int, sigreturn,
/* _protoargs */ (const ucontext_t* sigcntxp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const ucontext_t* sigcntxp),
/* _protoargs_err */ (__capability int *stub_errno, __capability const ucontext_t* sigcntxp),
/* _callargs */ ((const ucontext_t*)sigcntxp),
/* _callargs_chk */ (&ret, stub_errno, sigcntxp),
/* _callargs_err */ (&errno, (const ucontext_t*)sigcntxp),
/* _localcheck */ {if (!(cheri_getperm(sigcntxp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(421, int, getcontext,
/* _protoargs */ (ucontext_t* ucp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability ucontext_t* ucp),
/* _protoargs_err */ (__capability int *stub_errno, __capability ucontext_t* ucp),
/* _callargs */ ((ucontext_t*)ucp),
/* _callargs_chk */ (&ret, stub_errno, ucp),
/* _callargs_err */ (&errno, (ucontext_t*)ucp),
/* _localcheck */ {if (!(cheri_getperm(ucp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(422, int, setcontext,
/* _protoargs */ (const ucontext_t* ucp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const ucontext_t* ucp),
/* _protoargs_err */ (__capability int *stub_errno, __capability const ucontext_t* ucp),
/* _callargs */ ((const ucontext_t*)ucp),
/* _callargs_chk */ (&ret, stub_errno, ucp),
/* _callargs_err */ (&errno, (const ucontext_t*)ucp),
/* _localcheck */ {if (!(cheri_getperm(ucp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(423, int, swapcontext,
/* _protoargs */ (ucontext_t* oucp, const ucontext_t* ucp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability ucontext_t* oucp, __capability const ucontext_t* ucp),
/* _protoargs_err */ (__capability int *stub_errno, __capability ucontext_t* oucp, __capability const ucontext_t* ucp),
/* _callargs */ ((ucontext_t*)oucp, (const ucontext_t*)ucp),
/* _callargs_chk */ (&ret, stub_errno, oucp, ucp),
/* _callargs_err */ (&errno, (ucontext_t*)oucp, (const ucontext_t*)ucp),
/* _localcheck */ {if (!(cheri_getperm(oucp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(ucp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(424, int, swapoff,
/* _protoargs */ (const char * name),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * name),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * name),
/* _callargs */ ((const char *)name),
/* _callargs_chk */ (&ret, stub_errno, name),
/* _callargs_err */ (&errno, (const char *)name),
/* _localcheck */ {if (!(cheri_getperm(name) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(425, int, __acl_get_link,
/* _protoargs */ (const char * path, acl_type_t type, struct acl * aclp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, acl_type_t type, __capability struct acl * aclp),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, acl_type_t type, __capability struct acl * aclp),
/* _callargs */ ((const char *)path, type, (struct acl *)aclp),
/* _callargs_chk */ (&ret, stub_errno, path, type, aclp),
/* _callargs_err */ (&errno, (const char *)path, type, (struct acl *)aclp),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(aclp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(426, int, __acl_set_link,
/* _protoargs */ (const char * path, acl_type_t type, struct acl * aclp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, acl_type_t type, __capability struct acl * aclp),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, acl_type_t type, __capability struct acl * aclp),
/* _callargs */ ((const char *)path, type, (struct acl *)aclp),
/* _callargs_chk */ (&ret, stub_errno, path, type, aclp),
/* _callargs_err */ (&errno, (const char *)path, type, (struct acl *)aclp),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(aclp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(427, int, __acl_delete_link,
/* _protoargs */ (const char * path, acl_type_t type),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, acl_type_t type),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, acl_type_t type),
/* _callargs */ ((const char *)path, type),
/* _callargs_chk */ (&ret, stub_errno, path, type),
/* _callargs_err */ (&errno, (const char *)path, type),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(428, int, __acl_aclcheck_link,
/* _protoargs */ (const char * path, acl_type_t type, struct acl * aclp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, acl_type_t type, __capability struct acl * aclp),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, acl_type_t type, __capability struct acl * aclp),
/* _callargs */ ((const char *)path, type, (struct acl *)aclp),
/* _callargs_chk */ (&ret, stub_errno, path, type, aclp),
/* _callargs_err */ (&errno, (const char *)path, type, (struct acl *)aclp),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(aclp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(429, int, sigwait,
/* _protoargs */ (const sigset_t * set, int * sig),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const sigset_t * set, __capability int * sig),
/* _protoargs_err */ (__capability int *stub_errno, __capability const sigset_t * set, __capability int * sig),
/* _callargs */ ((const sigset_t *)set, (int *)sig),
/* _callargs_chk */ (&ret, stub_errno, set, sig),
/* _callargs_err */ (&errno, (const sigset_t *)set, (int *)sig),
/* _localcheck */ {if (!(cheri_getperm(set) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(sig) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(430, int, thr_create,
/* _protoargs */ (ucontext_t* ctx, long * id, int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability ucontext_t* ctx, __capability long * id, int flags),
/* _protoargs_err */ (__capability int *stub_errno, __capability ucontext_t* ctx, __capability long * id, int flags),
/* _callargs */ ((ucontext_t*)ctx, (long *)id, flags),
/* _callargs_chk */ (&ret, stub_errno, ctx, id, flags),
/* _callargs_err */ (&errno, (ucontext_t*)ctx, (long *)id, flags),
/* _localcheck */ {if (!(cheri_getperm(ctx) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(id) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(432, int, thr_self,
/* _protoargs */ (long * id),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability long * id),
/* _protoargs_err */ (__capability int *stub_errno, __capability long * id),
/* _callargs */ ((long *)id),
/* _callargs_chk */ (&ret, stub_errno, id),
/* _callargs_err */ (&errno, (long *)id),
/* _localcheck */ {if (!(cheri_getperm(id) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(433, int, thr_kill,
/* _protoargs */ (long id, int sig),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, long id, int sig),
/* _protoargs_err */ (__capability int *stub_errno, long id, int sig),
/* _callargs */ (id, sig),
/* _callargs_chk */ (&ret, stub_errno, id, sig),
/* _callargs_err */ (&errno, id, sig),
/* _localcheck */ {}
)
SYS_STUB(436, int, jail_attach,
/* _protoargs */ (int jid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int jid),
/* _protoargs_err */ (__capability int *stub_errno, int jid),
/* _callargs */ (jid),
/* _callargs_chk */ (&ret, stub_errno, jid),
/* _callargs_err */ (&errno, jid),
/* _localcheck */ {}
)
SYS_STUB(437, ssize_t, extattr_list_fd,
/* _protoargs */ (int fd, int attrnamespace, void * data, size_t nbytes),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int fd, int attrnamespace, __capability void * data, size_t nbytes),
/* _protoargs_err */ (__capability int *stub_errno, int fd, int attrnamespace, __capability void * data, size_t nbytes),
/* _callargs */ (fd, attrnamespace, (void *)data, nbytes),
/* _callargs_chk */ (&ret, stub_errno, fd, attrnamespace, data, nbytes),
/* _callargs_err */ (&errno, fd, attrnamespace, (void *)data, nbytes),
/* _localcheck */ {if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(438, ssize_t, extattr_list_file,
/* _protoargs */ (const char * path, int attrnamespace, void * data, size_t nbytes),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, __capability const char * path, int attrnamespace, __capability void * data, size_t nbytes),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int attrnamespace, __capability void * data, size_t nbytes),
/* _callargs */ ((const char *)path, attrnamespace, (void *)data, nbytes),
/* _callargs_chk */ (&ret, stub_errno, path, attrnamespace, data, nbytes),
/* _callargs_err */ (&errno, (const char *)path, attrnamespace, (void *)data, nbytes),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(439, ssize_t, extattr_list_link,
/* _protoargs */ (const char * path, int attrnamespace, void * data, size_t nbytes),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, __capability const char * path, int attrnamespace, __capability void * data, size_t nbytes),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int attrnamespace, __capability void * data, size_t nbytes),
/* _callargs */ ((const char *)path, attrnamespace, (void *)data, nbytes),
/* _callargs_chk */ (&ret, stub_errno, path, attrnamespace, data, nbytes),
/* _callargs_err */ (&errno, (const char *)path, attrnamespace, (void *)data, nbytes),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(441, int, ksem_timedwait,
/* _protoargs */ (semid_t id, const struct timespec * abstime),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, semid_t id, __capability const struct timespec * abstime),
/* _protoargs_err */ (__capability int *stub_errno, semid_t id, __capability const struct timespec * abstime),
/* _callargs */ (id, (const struct timespec *)abstime),
/* _callargs_chk */ (&ret, stub_errno, id, abstime),
/* _callargs_err */ (&errno, id, (const struct timespec *)abstime),
/* _localcheck */ {if (!(cheri_getperm(abstime) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(442, int, thr_suspend,
/* _protoargs */ (const struct timespec * timeout),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const struct timespec * timeout),
/* _protoargs_err */ (__capability int *stub_errno, __capability const struct timespec * timeout),
/* _callargs */ ((const struct timespec *)timeout),
/* _callargs_chk */ (&ret, stub_errno, timeout),
/* _callargs_err */ (&errno, (const struct timespec *)timeout),
/* _localcheck */ {if (!(cheri_getperm(timeout) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(443, int, thr_wake,
/* _protoargs */ (long id),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, long id),
/* _protoargs_err */ (__capability int *stub_errno, long id),
/* _callargs */ (id),
/* _callargs_chk */ (&ret, stub_errno, id),
/* _callargs_err */ (&errno, id),
/* _localcheck */ {}
)
SYS_STUB(444, int, kldunloadf,
/* _protoargs */ (int fileid, int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fileid, int flags),
/* _protoargs_err */ (__capability int *stub_errno, int fileid, int flags),
/* _callargs */ (fileid, flags),
/* _callargs_chk */ (&ret, stub_errno, fileid, flags),
/* _callargs_err */ (&errno, fileid, flags),
/* _localcheck */ {}
)
SYS_STUB(445, int, audit,
/* _protoargs */ (const void * record, u_int length),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const void * record, u_int length),
/* _protoargs_err */ (__capability int *stub_errno, __capability const void * record, u_int length),
/* _callargs */ ((const void *)record, length),
/* _callargs_chk */ (&ret, stub_errno, record, length),
/* _callargs_err */ (&errno, (const void *)record, length),
/* _localcheck */ {if (!(cheri_getperm(record) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(446, int, auditon,
/* _protoargs */ (int cmd, void * data, u_int length),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int cmd, __capability void * data, u_int length),
/* _protoargs_err */ (__capability int *stub_errno, int cmd, __capability void * data, u_int length),
/* _callargs */ (cmd, (void *)data, length),
/* _callargs_chk */ (&ret, stub_errno, cmd, data, length),
/* _callargs_err */ (&errno, cmd, (void *)data, length),
/* _localcheck */ {if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(447, int, getauid,
/* _protoargs */ (uid_t * auid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability uid_t * auid),
/* _protoargs_err */ (__capability int *stub_errno, __capability uid_t * auid),
/* _callargs */ ((uid_t *)auid),
/* _callargs_chk */ (&ret, stub_errno, auid),
/* _callargs_err */ (&errno, (uid_t *)auid),
/* _localcheck */ {if (!(cheri_getperm(auid) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(448, int, setauid,
/* _protoargs */ (uid_t * auid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability uid_t * auid),
/* _protoargs_err */ (__capability int *stub_errno, __capability uid_t * auid),
/* _callargs */ ((uid_t *)auid),
/* _callargs_chk */ (&ret, stub_errno, auid),
/* _callargs_err */ (&errno, (uid_t *)auid),
/* _localcheck */ {if (!(cheri_getperm(auid) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(449, int, getaudit,
/* _protoargs */ (struct auditinfo * auditinfo),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct auditinfo * auditinfo),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct auditinfo * auditinfo),
/* _callargs */ ((struct auditinfo *)auditinfo),
/* _callargs_chk */ (&ret, stub_errno, auditinfo),
/* _callargs_err */ (&errno, (struct auditinfo *)auditinfo),
/* _localcheck */ {if (!(cheri_getperm(auditinfo) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(450, int, setaudit,
/* _protoargs */ (struct auditinfo * auditinfo),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct auditinfo * auditinfo),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct auditinfo * auditinfo),
/* _callargs */ ((struct auditinfo *)auditinfo),
/* _callargs_chk */ (&ret, stub_errno, auditinfo),
/* _callargs_err */ (&errno, (struct auditinfo *)auditinfo),
/* _localcheck */ {if (!(cheri_getperm(auditinfo) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(451, int, getaudit_addr,
/* _protoargs */ (struct auditinfo_addr * auditinfo_addr, u_int length),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct auditinfo_addr * auditinfo_addr, u_int length),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct auditinfo_addr * auditinfo_addr, u_int length),
/* _callargs */ ((struct auditinfo_addr *)auditinfo_addr, length),
/* _callargs_chk */ (&ret, stub_errno, auditinfo_addr, length),
/* _callargs_err */ (&errno, (struct auditinfo_addr *)auditinfo_addr, length),
/* _localcheck */ {if (!(cheri_getperm(auditinfo_addr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(452, int, setaudit_addr,
/* _protoargs */ (struct auditinfo_addr * auditinfo_addr, u_int length),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct auditinfo_addr * auditinfo_addr, u_int length),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct auditinfo_addr * auditinfo_addr, u_int length),
/* _callargs */ ((struct auditinfo_addr *)auditinfo_addr, length),
/* _callargs_chk */ (&ret, stub_errno, auditinfo_addr, length),
/* _callargs_err */ (&errno, (struct auditinfo_addr *)auditinfo_addr, length),
/* _localcheck */ {if (!(cheri_getperm(auditinfo_addr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(453, int, auditctl,
/* _protoargs */ (const char * path),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path),
/* _callargs */ ((const char *)path),
/* _callargs_chk */ (&ret, stub_errno, path),
/* _callargs_err */ (&errno, (const char *)path),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(454, int, _umtx_op,
/* _protoargs */ (void * obj, int op, u_long val, void * uaddr1, void * uaddr2),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability void * obj, int op, u_long val, __capability void * uaddr1, __capability void * uaddr2),
/* _protoargs_err */ (__capability int *stub_errno, __capability void * obj, int op, u_long val, __capability void * uaddr1, __capability void * uaddr2),
/* _callargs */ ((void *)obj, op, val, (void *)uaddr1, (void *)uaddr2),
/* _callargs_chk */ (&ret, stub_errno, obj, op, val, uaddr1, uaddr2),
/* _callargs_err */ (&errno, (void *)obj, op, val, (void *)uaddr1, (void *)uaddr2),
/* _localcheck */ {if (!(cheri_getperm(obj) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(uaddr1) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(uaddr2) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(455, int, thr_new,
/* _protoargs */ (struct thr_param* param, int param_size),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct thr_param* param, int param_size),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct thr_param* param, int param_size),
/* _callargs */ ((struct thr_param*)param, param_size),
/* _callargs_chk */ (&ret, stub_errno, param, param_size),
/* _callargs_err */ (&errno, (struct thr_param*)param, param_size),
/* _localcheck */ {if (!(cheri_getperm(param) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(456, int, sigqueue,
/* _protoargs */ (pid_t pid, int signum, void * value),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, pid_t pid, int signum, __capability void * value),
/* _protoargs_err */ (__capability int *stub_errno, pid_t pid, int signum, __capability void * value),
/* _callargs */ (pid, signum, (void *)value),
/* _callargs_chk */ (&ret, stub_errno, pid, signum, value),
/* _callargs_err */ (&errno, pid, signum, (void *)value),
/* _localcheck */ {if (!(cheri_getperm(value) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(457, int, kmq_open,
/* _protoargs */ (const char * path, int flags, mode_t mode, const struct mq_attr * attr),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int flags, mode_t mode, __capability const struct mq_attr * attr),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int flags, mode_t mode, __capability const struct mq_attr * attr),
/* _callargs */ ((const char *)path, flags, mode, (const struct mq_attr *)attr),
/* _callargs_chk */ (&ret, stub_errno, path, flags, mode, attr),
/* _callargs_err */ (&errno, (const char *)path, flags, mode, (const struct mq_attr *)attr),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(attr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(458, int, kmq_setattr,
/* _protoargs */ (int mqd, const struct mq_attr * attr, struct mq_attr * oattr),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int mqd, __capability const struct mq_attr * attr, __capability struct mq_attr * oattr),
/* _protoargs_err */ (__capability int *stub_errno, int mqd, __capability const struct mq_attr * attr, __capability struct mq_attr * oattr),
/* _callargs */ (mqd, (const struct mq_attr *)attr, (struct mq_attr *)oattr),
/* _callargs_chk */ (&ret, stub_errno, mqd, attr, oattr),
/* _callargs_err */ (&errno, mqd, (const struct mq_attr *)attr, (struct mq_attr *)oattr),
/* _localcheck */ {if (!(cheri_getperm(attr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(oattr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(459, int, kmq_timedreceive,
/* _protoargs */ (int mqd, char * msg_ptr, size_t msg_len, unsigned * msg_prio, const struct timespec * abs_timeout),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int mqd, __capability char * msg_ptr, size_t msg_len, __capability unsigned * msg_prio, __capability const struct timespec * abs_timeout),
/* _protoargs_err */ (__capability int *stub_errno, int mqd, __capability char * msg_ptr, size_t msg_len, __capability unsigned * msg_prio, __capability const struct timespec * abs_timeout),
/* _callargs */ (mqd, (char *)msg_ptr, msg_len, (unsigned *)msg_prio, (const struct timespec *)abs_timeout),
/* _callargs_chk */ (&ret, stub_errno, mqd, msg_ptr, msg_len, msg_prio, abs_timeout),
/* _callargs_err */ (&errno, mqd, (char *)msg_ptr, msg_len, (unsigned *)msg_prio, (const struct timespec *)abs_timeout),
/* _localcheck */ {if (!(cheri_getperm(msg_ptr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(msg_prio) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(abs_timeout) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(460, int, kmq_timedsend,
/* _protoargs */ (int mqd, const char * msg_ptr, size_t msg_len, unsigned msg_prio, const struct timespec * abs_timeout),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int mqd, __capability const char * msg_ptr, size_t msg_len, unsigned msg_prio, __capability const struct timespec * abs_timeout),
/* _protoargs_err */ (__capability int *stub_errno, int mqd, __capability const char * msg_ptr, size_t msg_len, unsigned msg_prio, __capability const struct timespec * abs_timeout),
/* _callargs */ (mqd, (const char *)msg_ptr, msg_len, msg_prio, (const struct timespec *)abs_timeout),
/* _callargs_chk */ (&ret, stub_errno, mqd, msg_ptr, msg_len, msg_prio, abs_timeout),
/* _callargs_err */ (&errno, mqd, (const char *)msg_ptr, msg_len, msg_prio, (const struct timespec *)abs_timeout),
/* _localcheck */ {if (!(cheri_getperm(msg_ptr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(abs_timeout) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(461, int, kmq_notify,
/* _protoargs */ (int mqd, const struct sigevent* sigev),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int mqd, __capability const struct sigevent* sigev),
/* _protoargs_err */ (__capability int *stub_errno, int mqd, __capability const struct sigevent* sigev),
/* _callargs */ (mqd, (const struct sigevent*)sigev),
/* _callargs_chk */ (&ret, stub_errno, mqd, sigev),
/* _callargs_err */ (&errno, mqd, (const struct sigevent*)sigev),
/* _localcheck */ {if (!(cheri_getperm(sigev) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(462, int, kmq_unlink,
/* _protoargs */ (const char * path),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path),
/* _callargs */ ((const char *)path),
/* _callargs_chk */ (&ret, stub_errno, path),
/* _callargs_err */ (&errno, (const char *)path),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(464, int, thr_set_name,
/* _protoargs */ (long id, const char * name),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, long id, __capability const char * name),
/* _protoargs_err */ (__capability int *stub_errno, long id, __capability const char * name),
/* _callargs */ (id, (const char *)name),
/* _callargs_chk */ (&ret, stub_errno, id, name),
/* _callargs_err */ (&errno, id, (const char *)name),
/* _localcheck */ {if (!(cheri_getperm(name) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(465, int, aio_fsync,
/* _protoargs */ (int op, struct aiocb* aiocbp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int op, __capability struct aiocb* aiocbp),
/* _protoargs_err */ (__capability int *stub_errno, int op, __capability struct aiocb* aiocbp),
/* _callargs */ (op, (struct aiocb*)aiocbp),
/* _callargs_chk */ (&ret, stub_errno, op, aiocbp),
/* _callargs_err */ (&errno, op, (struct aiocb*)aiocbp),
/* _localcheck */ {if (!(cheri_getperm(aiocbp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(466, int, rtprio_thread,
/* _protoargs */ (int function, lwpid_t lwpid, struct rtprio * rtp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int function, lwpid_t lwpid, __capability struct rtprio * rtp),
/* _protoargs_err */ (__capability int *stub_errno, int function, lwpid_t lwpid, __capability struct rtprio * rtp),
/* _callargs */ (function, lwpid, (struct rtprio *)rtp),
/* _callargs_chk */ (&ret, stub_errno, function, lwpid, rtp),
/* _callargs_err */ (&errno, function, lwpid, (struct rtprio *)rtp),
/* _localcheck */ {if (!(cheri_getperm(rtp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(471, int, sctp_peeloff,
/* _protoargs */ (int sd, uint32_t name),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int sd, uint32_t name),
/* _protoargs_err */ (__capability int *stub_errno, int sd, uint32_t name),
/* _callargs */ (sd, name),
/* _callargs_chk */ (&ret, stub_errno, sd, name),
/* _callargs_err */ (&errno, sd, name),
/* _localcheck */ {}
)
SYS_STUB(475, ssize_t, pread,
/* _protoargs */ (int fd, void * buf, size_t nbyte, off_t offset),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int fd, __capability void * buf, size_t nbyte, off_t offset),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability void * buf, size_t nbyte, off_t offset),
/* _callargs */ (fd, (void *)buf, nbyte, offset),
/* _callargs_chk */ (&ret, stub_errno, fd, buf, nbyte, offset),
/* _callargs_err */ (&errno, fd, (void *)buf, nbyte, offset),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(476, ssize_t, pwrite,
/* _protoargs */ (int fd, const void * buf, size_t nbyte, off_t offset),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int fd, __capability const void * buf, size_t nbyte, off_t offset),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const void * buf, size_t nbyte, off_t offset),
/* _callargs */ (fd, (const void *)buf, nbyte, offset),
/* _callargs_chk */ (&ret, stub_errno, fd, buf, nbyte, offset),
/* _callargs_err */ (&errno, fd, (const void *)buf, nbyte, offset),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(477, void*, mmap,
/* _protoargs */ (void * addr, size_t len, int prot, int flags, int fd, off_t pos),
/* _protoargs_chk */ (void* *retp , __capability int *stub_errno, __capability void * addr, size_t len, int prot, int flags, int fd, off_t pos),
/* _protoargs_err */ (__capability int *stub_errno, __capability void * addr, size_t len, int prot, int flags, int fd, off_t pos),
/* _callargs */ ((void *)addr, len, prot, flags, fd, pos),
/* _callargs_chk */ (&ret, stub_errno, addr, len, prot, flags, fd, pos),
/* _callargs_err */ (&errno, (void *)addr, len, prot, flags, fd, pos),
/* _localcheck */ {if (!(cheri_getperm(addr) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((void*)-1);} }
)
SYS_STUB(478, off_t, lseek,
/* _protoargs */ (int fd, off_t offset, int whence),
/* _protoargs_chk */ (off_t *retp , __capability int *stub_errno, int fd, off_t offset, int whence),
/* _protoargs_err */ (__capability int *stub_errno, int fd, off_t offset, int whence),
/* _callargs */ (fd, offset, whence),
/* _callargs_chk */ (&ret, stub_errno, fd, offset, whence),
/* _callargs_err */ (&errno, fd, offset, whence),
/* _localcheck */ {}
)
SYS_STUB(479, int, truncate,
/* _protoargs */ (const char * path, off_t length),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, off_t length),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, off_t length),
/* _callargs */ ((const char *)path, length),
/* _callargs_chk */ (&ret, stub_errno, path, length),
/* _callargs_err */ (&errno, (const char *)path, length),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(480, int, ftruncate,
/* _protoargs */ (int fd, off_t length),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, off_t length),
/* _protoargs_err */ (__capability int *stub_errno, int fd, off_t length),
/* _callargs */ (fd, length),
/* _callargs_chk */ (&ret, stub_errno, fd, length),
/* _callargs_err */ (&errno, fd, length),
/* _localcheck */ {}
)
SYS_STUB(481, int, thr_kill2,
/* _protoargs */ (pid_t pid, long id, int sig),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, pid_t pid, long id, int sig),
/* _protoargs_err */ (__capability int *stub_errno, pid_t pid, long id, int sig),
/* _callargs */ (pid, id, sig),
/* _callargs_chk */ (&ret, stub_errno, pid, id, sig),
/* _callargs_err */ (&errno, pid, id, sig),
/* _localcheck */ {}
)
SYS_STUB(482, int, shm_open,
/* _protoargs */ (const char * path, int flags, mode_t mode),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int flags, mode_t mode),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int flags, mode_t mode),
/* _callargs */ ((const char *)path, flags, mode),
/* _callargs_chk */ (&ret, stub_errno, path, flags, mode),
/* _callargs_err */ (&errno, (const char *)path, flags, mode),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(483, int, shm_unlink,
/* _protoargs */ (const char * path),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path),
/* _callargs */ ((const char *)path),
/* _callargs_chk */ (&ret, stub_errno, path),
/* _callargs_err */ (&errno, (const char *)path),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(484, int, cpuset,
/* _protoargs */ (cpusetid_t * setid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability cpusetid_t * setid),
/* _protoargs_err */ (__capability int *stub_errno, __capability cpusetid_t * setid),
/* _callargs */ ((cpusetid_t *)setid),
/* _callargs_chk */ (&ret, stub_errno, setid),
/* _callargs_err */ (&errno, (cpusetid_t *)setid),
/* _localcheck */ {if (!(cheri_getperm(setid) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(485, int, cpuset_setid,
/* _protoargs */ (cpuwhich_t which, id_t id, cpusetid_t setid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, cpuwhich_t which, id_t id, cpusetid_t setid),
/* _protoargs_err */ (__capability int *stub_errno, cpuwhich_t which, id_t id, cpusetid_t setid),
/* _callargs */ (which, id, setid),
/* _callargs_chk */ (&ret, stub_errno, which, id, setid),
/* _callargs_err */ (&errno, which, id, setid),
/* _localcheck */ {}
)
SYS_STUB(486, int, cpuset_getid,
/* _protoargs */ (cpulevel_t level, cpuwhich_t which, id_t id, cpusetid_t * setid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, cpulevel_t level, cpuwhich_t which, id_t id, __capability cpusetid_t * setid),
/* _protoargs_err */ (__capability int *stub_errno, cpulevel_t level, cpuwhich_t which, id_t id, __capability cpusetid_t * setid),
/* _callargs */ (level, which, id, (cpusetid_t *)setid),
/* _callargs_chk */ (&ret, stub_errno, level, which, id, setid),
/* _callargs_err */ (&errno, level, which, id, (cpusetid_t *)setid),
/* _localcheck */ {if (!(cheri_getperm(setid) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(487, int, cpuset_getaffinity,
/* _protoargs */ (cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, cpuset_t * mask),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, __capability cpuset_t * mask),
/* _protoargs_err */ (__capability int *stub_errno, cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, __capability cpuset_t * mask),
/* _callargs */ (level, which, id, cpusetsize, (cpuset_t *)mask),
/* _callargs_chk */ (&ret, stub_errno, level, which, id, cpusetsize, mask),
/* _callargs_err */ (&errno, level, which, id, cpusetsize, (cpuset_t *)mask),
/* _localcheck */ {if (!(cheri_getperm(mask) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(488, int, cpuset_setaffinity,
/* _protoargs */ (cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, const cpuset_t * mask),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, __capability const cpuset_t * mask),
/* _protoargs_err */ (__capability int *stub_errno, cpulevel_t level, cpuwhich_t which, id_t id, size_t cpusetsize, __capability const cpuset_t * mask),
/* _callargs */ (level, which, id, cpusetsize, (const cpuset_t *)mask),
/* _callargs_chk */ (&ret, stub_errno, level, which, id, cpusetsize, mask),
/* _callargs_err */ (&errno, level, which, id, cpusetsize, (const cpuset_t *)mask),
/* _localcheck */ {if (!(cheri_getperm(mask) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(489, int, faccessat,
/* _protoargs */ (int fd, const char * path, int amode, int flag),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, int amode, int flag),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, int amode, int flag),
/* _callargs */ (fd, (const char *)path, amode, flag),
/* _callargs_chk */ (&ret, stub_errno, fd, path, amode, flag),
/* _callargs_err */ (&errno, fd, (const char *)path, amode, flag),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(490, int, fchmodat,
/* _protoargs */ (int fd, const char * path, mode_t mode, int flag),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, mode_t mode, int flag),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, mode_t mode, int flag),
/* _callargs */ (fd, (const char *)path, mode, flag),
/* _callargs_chk */ (&ret, stub_errno, fd, path, mode, flag),
/* _callargs_err */ (&errno, fd, (const char *)path, mode, flag),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(491, int, fchownat,
/* _protoargs */ (int fd, const char * path, uid_t uid, gid_t gid, int flag),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, uid_t uid, gid_t gid, int flag),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, uid_t uid, gid_t gid, int flag),
/* _callargs */ (fd, (const char *)path, uid, gid, flag),
/* _callargs_chk */ (&ret, stub_errno, fd, path, uid, gid, flag),
/* _callargs_err */ (&errno, fd, (const char *)path, uid, gid, flag),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(492, int, fexecve,
/* _protoargs */ (int fd, struct chericap * argv, struct chericap * envv),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability struct chericap * argv, __capability struct chericap * envv),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability struct chericap * argv, __capability struct chericap * envv),
/* _callargs */ (fd, (struct chericap *)argv, (struct chericap *)envv),
/* _callargs_chk */ (&ret, stub_errno, fd, argv, envv),
/* _callargs_err */ (&errno, fd, (struct chericap *)argv, (struct chericap *)envv),
/* _localcheck */ {if (!(cheri_getperm(argv) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(envv) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(493, int, fstatat,
/* _protoargs */ (int fd, const char * path, struct stat * buf, int flag),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, __capability struct stat * buf, int flag),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, __capability struct stat * buf, int flag),
/* _callargs */ (fd, (const char *)path, (struct stat *)buf, flag),
/* _callargs_chk */ (&ret, stub_errno, fd, path, buf, flag),
/* _callargs_err */ (&errno, fd, (const char *)path, (struct stat *)buf, flag),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(494, int, futimesat,
/* _protoargs */ (int fd, const char * path, const struct timeval * times),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, __capability const struct timeval * times),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, __capability const struct timeval * times),
/* _callargs */ (fd, (const char *)path, (const struct timeval *)times),
/* _callargs_chk */ (&ret, stub_errno, fd, path, times),
/* _callargs_err */ (&errno, fd, (const char *)path, (const struct timeval *)times),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(times) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(495, int, linkat,
/* _protoargs */ (int fd1, const char * path1, int fd2, const char * path2, int flag),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd1, __capability const char * path1, int fd2, __capability const char * path2, int flag),
/* _protoargs_err */ (__capability int *stub_errno, int fd1, __capability const char * path1, int fd2, __capability const char * path2, int flag),
/* _callargs */ (fd1, (const char *)path1, fd2, (const char *)path2, flag),
/* _callargs_chk */ (&ret, stub_errno, fd1, path1, fd2, path2, flag),
/* _callargs_err */ (&errno, fd1, (const char *)path1, fd2, (const char *)path2, flag),
/* _localcheck */ {if (!(cheri_getperm(path1) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(path2) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(496, int, mkdirat,
/* _protoargs */ (int fd, const char * path, mode_t mode),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, mode_t mode),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, mode_t mode),
/* _callargs */ (fd, (const char *)path, mode),
/* _callargs_chk */ (&ret, stub_errno, fd, path, mode),
/* _callargs_err */ (&errno, fd, (const char *)path, mode),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(497, int, mkfifoat,
/* _protoargs */ (int fd, const char * path, mode_t mode),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, mode_t mode),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, mode_t mode),
/* _callargs */ (fd, (const char *)path, mode),
/* _callargs_chk */ (&ret, stub_errno, fd, path, mode),
/* _callargs_err */ (&errno, fd, (const char *)path, mode),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(498, int, mknodat,
/* _protoargs */ (int fd, const char * path, mode_t mode, dev_t dev),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, mode_t mode, dev_t dev),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, mode_t mode, dev_t dev),
/* _callargs */ (fd, (const char *)path, mode, dev),
/* _callargs_chk */ (&ret, stub_errno, fd, path, mode, dev),
/* _callargs_err */ (&errno, fd, (const char *)path, mode, dev),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_VA(499, int, openat, flag,
/* _protoargs */ (int fd, const char * path, int flag, mode_t mode),
/* _vprotoargs */ (int fd, const char * path, int flag, ...),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, int flag, mode_t mode),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, int flag, mode_t mode),
/* _callargs */ (fd, (const char *)path, flag, mode),
/* _callargs_chk */ (&ret, stub_errno, fd, path, flag, mode),
/* _callargs_err */ (&errno, fd, (const char *)path, flag, mode),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(500, int, readlinkat,
/* _protoargs */ (int fd, const char * path, char * buf, size_t bufsize),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, __capability char * buf, size_t bufsize),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, __capability char * buf, size_t bufsize),
/* _callargs */ (fd, (const char *)path, (char *)buf, bufsize),
/* _callargs_chk */ (&ret, stub_errno, fd, path, buf, bufsize),
/* _callargs_err */ (&errno, fd, (const char *)path, (char *)buf, bufsize),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(501, int, renameat,
/* _protoargs */ (int oldfd, const char * old, int newfd, const char * new),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int oldfd, __capability const char * old, int newfd, __capability const char * new),
/* _protoargs_err */ (__capability int *stub_errno, int oldfd, __capability const char * old, int newfd, __capability const char * new),
/* _callargs */ (oldfd, (const char *)old, newfd, (const char *)new),
/* _callargs_chk */ (&ret, stub_errno, oldfd, old, newfd, new),
/* _callargs_err */ (&errno, oldfd, (const char *)old, newfd, (const char *)new),
/* _localcheck */ {if (!(cheri_getperm(old) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(new) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(502, int, symlinkat,
/* _protoargs */ (const char * path1, int fd, const char * path2),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path1, int fd, __capability const char * path2),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path1, int fd, __capability const char * path2),
/* _callargs */ ((const char *)path1, fd, (const char *)path2),
/* _callargs_chk */ (&ret, stub_errno, path1, fd, path2),
/* _callargs_err */ (&errno, (const char *)path1, fd, (const char *)path2),
/* _localcheck */ {if (!(cheri_getperm(path1) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(path2) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(503, int, unlinkat,
/* _protoargs */ (int fd, const char * path, int flag),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, int flag),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, int flag),
/* _callargs */ (fd, (const char *)path, flag),
/* _callargs_chk */ (&ret, stub_errno, fd, path, flag),
/* _callargs_err */ (&errno, fd, (const char *)path, flag),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(504, int, posix_openpt,
/* _protoargs */ (int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int flags),
/* _protoargs_err */ (__capability int *stub_errno, int flags),
/* _callargs */ (flags),
/* _callargs_chk */ (&ret, stub_errno, flags),
/* _callargs_err */ (&errno, flags),
/* _localcheck */ {}
)
SYS_STUB(505, int, gssd_syscall,
/* _protoargs */ (const char * path),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path),
/* _callargs */ ((const char *)path),
/* _callargs_chk */ (&ret, stub_errno, path),
/* _callargs_err */ (&errno, (const char *)path),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(506, int, jail_get,
/* _protoargs */ (struct iovec* iovp, unsigned int iovcnt, int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct iovec* iovp, unsigned int iovcnt, int flags),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct iovec* iovp, unsigned int iovcnt, int flags),
/* _callargs */ ((struct iovec*)iovp, iovcnt, flags),
/* _callargs_chk */ (&ret, stub_errno, iovp, iovcnt, flags),
/* _callargs_err */ (&errno, (struct iovec*)iovp, iovcnt, flags),
/* _localcheck */ {if (!(cheri_getperm(iovp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(507, int, jail_set,
/* _protoargs */ (struct iovec* iovp, unsigned int iovcnt, int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct iovec* iovp, unsigned int iovcnt, int flags),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct iovec* iovp, unsigned int iovcnt, int flags),
/* _callargs */ ((struct iovec*)iovp, iovcnt, flags),
/* _callargs_chk */ (&ret, stub_errno, iovp, iovcnt, flags),
/* _callargs_err */ (&errno, (struct iovec*)iovp, iovcnt, flags),
/* _localcheck */ {if (!(cheri_getperm(iovp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(508, int, jail_remove,
/* _protoargs */ (int jid),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int jid),
/* _protoargs_err */ (__capability int *stub_errno, int jid),
/* _callargs */ (jid),
/* _callargs_chk */ (&ret, stub_errno, jid),
/* _callargs_err */ (&errno, jid),
/* _localcheck */ {}
)
SYS_STUB(509, int, closefrom,
/* _protoargs */ (int lowfd),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int lowfd),
/* _protoargs_err */ (__capability int *stub_errno, int lowfd),
/* _callargs */ (lowfd),
/* _callargs_chk */ (&ret, stub_errno, lowfd),
/* _callargs_err */ (&errno, lowfd),
/* _localcheck */ {}
)
SYS_STUB_ARGHASPTRS(510, int, __semctl,
/* _protoargs */ (int semid, int semnum, int cmd, union semun* arg),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int semid, int semnum, int cmd, __capability union semun* arg),
/* _protoargs_err */ (__capability int *stub_errno, int semid, int semnum, int cmd, __capability union semun* arg),
/* _callargs */ (semid, semnum, cmd, (union semun*)arg),
/* _callargs_chk */ (&ret, stub_errno, semid, semnum, cmd, arg),
/* _callargs_err */ (&errno, semid, semnum, cmd, (union semun*)arg),
/* _localcheck */ {if (!(cheri_getperm(arg) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(511, int, msgctl,
/* _protoargs */ (int msqid, int cmd, struct msqid_ds* buf),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int msqid, int cmd, __capability struct msqid_ds* buf),
/* _protoargs_err */ (__capability int *stub_errno, int msqid, int cmd, __capability struct msqid_ds* buf),
/* _callargs */ (msqid, cmd, (struct msqid_ds*)buf),
/* _callargs_chk */ (&ret, stub_errno, msqid, cmd, buf),
/* _callargs_err */ (&errno, msqid, cmd, (struct msqid_ds*)buf),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(512, int, shmctl,
/* _protoargs */ (int shmid, int cmd, struct shmid_ds * buf),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int shmid, int cmd, __capability struct shmid_ds * buf),
/* _protoargs_err */ (__capability int *stub_errno, int shmid, int cmd, __capability struct shmid_ds * buf),
/* _callargs */ (shmid, cmd, (struct shmid_ds *)buf),
/* _callargs_chk */ (&ret, stub_errno, shmid, cmd, buf),
/* _callargs_err */ (&errno, shmid, cmd, (struct shmid_ds *)buf),
/* _localcheck */ {if (!(cheri_getperm(buf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(513, int, lpathconf,
/* _protoargs */ (const char * path, int name),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * path, int name),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * path, int name),
/* _callargs */ ((const char *)path, name),
/* _callargs_chk */ (&ret, stub_errno, path, name),
/* _callargs_err */ (&errno, (const char *)path, name),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(515, int, __cap_rights_get,
/* _protoargs */ (int version, int fd, cap_rights_t * rightsp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int version, int fd, __capability cap_rights_t * rightsp),
/* _protoargs_err */ (__capability int *stub_errno, int version, int fd, __capability cap_rights_t * rightsp),
/* _callargs */ (version, fd, (cap_rights_t *)rightsp),
/* _callargs_chk */ (&ret, stub_errno, version, fd, rightsp),
/* _callargs_err */ (&errno, version, fd, (cap_rights_t *)rightsp),
/* _localcheck */ {if (!(cheri_getperm(rightsp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(516, int, cap_enter,
/* _protoargs */ (void),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno),
/* _protoargs_err */ (__capability int *stub_errno),
/* _callargs */ (),
/* _callargs_chk */ (&ret, stub_errno),
/* _callargs_err */ (&errno),
/* _localcheck */ {}
)
SYS_STUB(517, int, cap_getmode,
/* _protoargs */ (u_int * modep),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability u_int * modep),
/* _protoargs_err */ (__capability int *stub_errno, __capability u_int * modep),
/* _callargs */ ((u_int *)modep),
/* _callargs_chk */ (&ret, stub_errno, modep),
/* _callargs_err */ (&errno, (u_int *)modep),
/* _localcheck */ {if (!(cheri_getperm(modep) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(518, int, pdfork,
/* _protoargs */ (int * fdp, int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability int * fdp, int flags),
/* _protoargs_err */ (__capability int *stub_errno, __capability int * fdp, int flags),
/* _callargs */ ((int *)fdp, flags),
/* _callargs_chk */ (&ret, stub_errno, fdp, flags),
/* _callargs_err */ (&errno, (int *)fdp, flags),
/* _localcheck */ {if (!(cheri_getperm(fdp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(519, int, pdkill,
/* _protoargs */ (int fd, int signum),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, int signum),
/* _protoargs_err */ (__capability int *stub_errno, int fd, int signum),
/* _callargs */ (fd, signum),
/* _callargs_chk */ (&ret, stub_errno, fd, signum),
/* _callargs_err */ (&errno, fd, signum),
/* _localcheck */ {}
)
SYS_STUB(520, int, pdgetpid,
/* _protoargs */ (int fd, pid_t * pidp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability pid_t * pidp),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability pid_t * pidp),
/* _callargs */ (fd, (pid_t *)pidp),
/* _callargs_chk */ (&ret, stub_errno, fd, pidp),
/* _callargs_err */ (&errno, fd, (pid_t *)pidp),
/* _localcheck */ {if (!(cheri_getperm(pidp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(522, int, pselect,
/* _protoargs */ (int nd, fd_set * in, fd_set * ou, fd_set * ex, const struct timespec * ts, const sigset_t * sm),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int nd, __capability fd_set * in, __capability fd_set * ou, __capability fd_set * ex, __capability const struct timespec * ts, __capability const sigset_t * sm),
/* _protoargs_err */ (__capability int *stub_errno, int nd, __capability fd_set * in, __capability fd_set * ou, __capability fd_set * ex, __capability const struct timespec * ts, __capability const sigset_t * sm),
/* _callargs */ (nd, (fd_set *)in, (fd_set *)ou, (fd_set *)ex, (const struct timespec *)ts, (const sigset_t *)sm),
/* _callargs_chk */ (&ret, stub_errno, nd, in, ou, ex, ts, sm),
/* _callargs_err */ (&errno, nd, (fd_set *)in, (fd_set *)ou, (fd_set *)ex, (const struct timespec *)ts, (const sigset_t *)sm),
/* _localcheck */ {if (!(cheri_getperm(in) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(ou) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(ex) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(ts) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(sm) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(523, int, getloginclass,
/* _protoargs */ (char * namebuf, size_t namelen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability char * namebuf, size_t namelen),
/* _protoargs_err */ (__capability int *stub_errno, __capability char * namebuf, size_t namelen),
/* _callargs */ ((char *)namebuf, namelen),
/* _callargs_chk */ (&ret, stub_errno, namebuf, namelen),
/* _callargs_err */ (&errno, (char *)namebuf, namelen),
/* _localcheck */ {if (!(cheri_getperm(namebuf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(524, int, setloginclass,
/* _protoargs */ (const char * namebuf),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const char * namebuf),
/* _protoargs_err */ (__capability int *stub_errno, __capability const char * namebuf),
/* _callargs */ ((const char *)namebuf),
/* _callargs_chk */ (&ret, stub_errno, namebuf),
/* _callargs_err */ (&errno, (const char *)namebuf),
/* _localcheck */ {if (!(cheri_getperm(namebuf) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(525, int, rctl_get_racct,
/* _protoargs */ (const void * inbufp, size_t inbuflen, void * outbufp, size_t outbuflen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const void * inbufp, size_t inbuflen, __capability void * outbufp, size_t outbuflen),
/* _protoargs_err */ (__capability int *stub_errno, __capability const void * inbufp, size_t inbuflen, __capability void * outbufp, size_t outbuflen),
/* _callargs */ ((const void *)inbufp, inbuflen, (void *)outbufp, outbuflen),
/* _callargs_chk */ (&ret, stub_errno, inbufp, inbuflen, outbufp, outbuflen),
/* _callargs_err */ (&errno, (const void *)inbufp, inbuflen, (void *)outbufp, outbuflen),
/* _localcheck */ {if (!(cheri_getperm(inbufp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(outbufp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(526, int, rctl_get_rules,
/* _protoargs */ (const void * inbufp, size_t inbuflen, void * outbufp, size_t outbuflen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const void * inbufp, size_t inbuflen, __capability void * outbufp, size_t outbuflen),
/* _protoargs_err */ (__capability int *stub_errno, __capability const void * inbufp, size_t inbuflen, __capability void * outbufp, size_t outbuflen),
/* _callargs */ ((const void *)inbufp, inbuflen, (void *)outbufp, outbuflen),
/* _callargs_chk */ (&ret, stub_errno, inbufp, inbuflen, outbufp, outbuflen),
/* _callargs_err */ (&errno, (const void *)inbufp, inbuflen, (void *)outbufp, outbuflen),
/* _localcheck */ {if (!(cheri_getperm(inbufp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(outbufp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(527, int, rctl_get_limits,
/* _protoargs */ (const void * inbufp, size_t inbuflen, void * outbufp, size_t outbuflen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const void * inbufp, size_t inbuflen, __capability void * outbufp, size_t outbuflen),
/* _protoargs_err */ (__capability int *stub_errno, __capability const void * inbufp, size_t inbuflen, __capability void * outbufp, size_t outbuflen),
/* _callargs */ ((const void *)inbufp, inbuflen, (void *)outbufp, outbuflen),
/* _callargs_chk */ (&ret, stub_errno, inbufp, inbuflen, outbufp, outbuflen),
/* _callargs_err */ (&errno, (const void *)inbufp, inbuflen, (void *)outbufp, outbuflen),
/* _localcheck */ {if (!(cheri_getperm(inbufp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(outbufp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(528, int, rctl_add_rule,
/* _protoargs */ (const void * inbufp, size_t inbuflen, void * outbufp, size_t outbuflen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const void * inbufp, size_t inbuflen, __capability void * outbufp, size_t outbuflen),
/* _protoargs_err */ (__capability int *stub_errno, __capability const void * inbufp, size_t inbuflen, __capability void * outbufp, size_t outbuflen),
/* _callargs */ ((const void *)inbufp, inbuflen, (void *)outbufp, outbuflen),
/* _callargs_chk */ (&ret, stub_errno, inbufp, inbuflen, outbufp, outbuflen),
/* _callargs_err */ (&errno, (const void *)inbufp, inbuflen, (void *)outbufp, outbuflen),
/* _localcheck */ {if (!(cheri_getperm(inbufp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(outbufp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(529, int, rctl_remove_rule,
/* _protoargs */ (const void * inbufp, size_t inbuflen, void * outbufp, size_t outbuflen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability const void * inbufp, size_t inbuflen, __capability void * outbufp, size_t outbuflen),
/* _protoargs_err */ (__capability int *stub_errno, __capability const void * inbufp, size_t inbuflen, __capability void * outbufp, size_t outbuflen),
/* _callargs */ ((const void *)inbufp, inbuflen, (void *)outbufp, outbuflen),
/* _callargs_chk */ (&ret, stub_errno, inbufp, inbuflen, outbufp, outbuflen),
/* _callargs_err */ (&errno, (const void *)inbufp, inbuflen, (void *)outbufp, outbuflen),
/* _localcheck */ {if (!(cheri_getperm(inbufp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(outbufp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(530, int, posix_fallocate,
/* _protoargs */ (int fd, off_t offset, off_t len),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, off_t offset, off_t len),
/* _protoargs_err */ (__capability int *stub_errno, int fd, off_t offset, off_t len),
/* _callargs */ (fd, offset, len),
/* _callargs_chk */ (&ret, stub_errno, fd, offset, len),
/* _callargs_err */ (&errno, fd, offset, len),
/* _localcheck */ {}
)
SYS_STUB(531, int, posix_fadvise,
/* _protoargs */ (int fd, off_t offset, off_t len, int advice),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, off_t offset, off_t len, int advice),
/* _protoargs_err */ (__capability int *stub_errno, int fd, off_t offset, off_t len, int advice),
/* _callargs */ (fd, offset, len, advice),
/* _callargs_chk */ (&ret, stub_errno, fd, offset, len, advice),
/* _callargs_err */ (&errno, fd, offset, len, advice),
/* _localcheck */ {}
)
SYS_STUB_ARGHASPTRS(532, int, wait6,
/* _protoargs */ (int idtype, id_t id, int * status, int options, struct __wrusage * wrusage, struct siginfo* info),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int idtype, id_t id, __capability int * status, int options, __capability struct __wrusage * wrusage, __capability struct siginfo* info),
/* _protoargs_err */ (__capability int *stub_errno, int idtype, id_t id, __capability int * status, int options, __capability struct __wrusage * wrusage, __capability struct siginfo* info),
/* _callargs */ (idtype, id, (int *)status, options, (struct __wrusage *)wrusage, (struct siginfo*)info),
/* _callargs_chk */ (&ret, stub_errno, idtype, id, status, options, wrusage, info),
/* _callargs_err */ (&errno, idtype, id, (int *)status, options, (struct __wrusage *)wrusage, (struct siginfo*)info),
/* _localcheck */ {if (!(cheri_getperm(status) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(wrusage) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(info) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(533, int, cap_rights_limit,
/* _protoargs */ (int fd, cap_rights_t * rightsp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability cap_rights_t * rightsp),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability cap_rights_t * rightsp),
/* _callargs */ (fd, (cap_rights_t *)rightsp),
/* _callargs_chk */ (&ret, stub_errno, fd, rightsp),
/* _callargs_err */ (&errno, fd, (cap_rights_t *)rightsp),
/* _localcheck */ {if (!(cheri_getperm(rightsp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(534, int, cap_ioctls_limit,
/* _protoargs */ (int fd, const u_long * cmds, size_t ncmds),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const u_long * cmds, size_t ncmds),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const u_long * cmds, size_t ncmds),
/* _callargs */ (fd, (const u_long *)cmds, ncmds),
/* _callargs_chk */ (&ret, stub_errno, fd, cmds, ncmds),
/* _callargs_err */ (&errno, fd, (const u_long *)cmds, ncmds),
/* _localcheck */ {if (!(cheri_getperm(cmds) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(535, ssize_t, cap_ioctls_get,
/* _protoargs */ (int fd, u_long * cmds, size_t maxcmds),
/* _protoargs_chk */ (ssize_t *retp , __capability int *stub_errno, int fd, __capability u_long * cmds, size_t maxcmds),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability u_long * cmds, size_t maxcmds),
/* _callargs */ (fd, (u_long *)cmds, maxcmds),
/* _callargs_chk */ (&ret, stub_errno, fd, cmds, maxcmds),
/* _callargs_err */ (&errno, fd, (u_long *)cmds, maxcmds),
/* _localcheck */ {if (!(cheri_getperm(cmds) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((ssize_t)-1);} }
)
SYS_STUB(536, int, cap_fcntls_limit,
/* _protoargs */ (int fd, uint32_t fcntlrights),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, uint32_t fcntlrights),
/* _protoargs_err */ (__capability int *stub_errno, int fd, uint32_t fcntlrights),
/* _callargs */ (fd, fcntlrights),
/* _callargs_chk */ (&ret, stub_errno, fd, fcntlrights),
/* _callargs_err */ (&errno, fd, fcntlrights),
/* _localcheck */ {}
)
SYS_STUB(537, int, cap_fcntls_get,
/* _protoargs */ (int fd, uint32_t * fcntlrightsp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability uint32_t * fcntlrightsp),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability uint32_t * fcntlrightsp),
/* _callargs */ (fd, (uint32_t *)fcntlrightsp),
/* _callargs_chk */ (&ret, stub_errno, fd, fcntlrightsp),
/* _callargs_err */ (&errno, fd, (uint32_t *)fcntlrightsp),
/* _localcheck */ {if (!(cheri_getperm(fcntlrightsp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(538, int, bindat,
/* _protoargs */ (int fd, int s, const struct sockaddr * name, socklen_t namelen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, int s, __capability const struct sockaddr * name, socklen_t namelen),
/* _protoargs_err */ (__capability int *stub_errno, int fd, int s, __capability const struct sockaddr * name, socklen_t namelen),
/* _callargs */ (fd, s, (const struct sockaddr *)name, namelen),
/* _callargs_chk */ (&ret, stub_errno, fd, s, name, namelen),
/* _callargs_err */ (&errno, fd, s, (const struct sockaddr *)name, namelen),
/* _localcheck */ {if (!(cheri_getperm(name) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(539, int, connectat,
/* _protoargs */ (int fd, int s, const struct sockaddr * name, socklen_t namelen),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, int s, __capability const struct sockaddr * name, socklen_t namelen),
/* _protoargs_err */ (__capability int *stub_errno, int fd, int s, __capability const struct sockaddr * name, socklen_t namelen),
/* _callargs */ (fd, s, (const struct sockaddr *)name, namelen),
/* _callargs_chk */ (&ret, stub_errno, fd, s, name, namelen),
/* _callargs_err */ (&errno, fd, s, (const struct sockaddr *)name, namelen),
/* _localcheck */ {if (!(cheri_getperm(name) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(540, int, chflagsat,
/* _protoargs */ (int fd, const char * path, u_long flags, int atflag),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, u_long flags, int atflag),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, u_long flags, int atflag),
/* _callargs */ (fd, (const char *)path, flags, atflag),
/* _callargs_chk */ (&ret, stub_errno, fd, path, flags, atflag),
/* _callargs_err */ (&errno, fd, (const char *)path, flags, atflag),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(541, int, accept4,
/* _protoargs */ (int s, struct sockaddr *__restrict name, socklen_t *__restrict anamelen, int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int s, __capability struct sockaddr *__restrict name, __capability socklen_t *__restrict anamelen, int flags),
/* _protoargs_err */ (__capability int *stub_errno, int s, __capability struct sockaddr *__restrict name, __capability socklen_t *__restrict anamelen, int flags),
/* _callargs */ (s, (struct sockaddr *__restrict)name, (socklen_t *__restrict)anamelen, flags),
/* _callargs_chk */ (&ret, stub_errno, s, name, anamelen, flags),
/* _callargs_err */ (&errno, s, (struct sockaddr *__restrict)name, (socklen_t *__restrict)anamelen, flags),
/* _localcheck */ {if (!(cheri_getperm(name) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(anamelen) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(542, int, pipe2,
/* _protoargs */ (int * fildes, int flags),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability int * fildes, int flags),
/* _protoargs_err */ (__capability int *stub_errno, __capability int * fildes, int flags),
/* _callargs */ ((int *)fildes, flags),
/* _callargs_chk */ (&ret, stub_errno, fildes, flags),
/* _callargs_err */ (&errno, (int *)fildes, flags),
/* _localcheck */ {if (!(cheri_getperm(fildes) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB_ARGHASPTRS(543, int, aio_mlock,
/* _protoargs */ (struct aiocb* aiocbp),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct aiocb* aiocbp),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct aiocb* aiocbp),
/* _callargs */ ((struct aiocb*)aiocbp),
/* _callargs_chk */ (&ret, stub_errno, aiocbp),
/* _callargs_err */ (&errno, (struct aiocb*)aiocbp),
/* _localcheck */ {if (!(cheri_getperm(aiocbp) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(544, int, procctl,
/* _protoargs */ (int idtype, id_t id, int com, void * data),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int idtype, id_t id, int com, __capability void * data),
/* _protoargs_err */ (__capability int *stub_errno, int idtype, id_t id, int com, __capability void * data),
/* _callargs */ (idtype, id, com, (void *)data),
/* _callargs_chk */ (&ret, stub_errno, idtype, id, com, data),
/* _callargs_err */ (&errno, idtype, id, com, (void *)data),
/* _localcheck */ {if (!(cheri_getperm(data) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(545, int, ppoll,
/* _protoargs */ (struct pollfd * fds, u_int nfds, const struct timespec * ts, const sigset_t * set),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, __capability struct pollfd * fds, u_int nfds, __capability const struct timespec * ts, __capability const sigset_t * set),
/* _protoargs_err */ (__capability int *stub_errno, __capability struct pollfd * fds, u_int nfds, __capability const struct timespec * ts, __capability const sigset_t * set),
/* _callargs */ ((struct pollfd *)fds, nfds, (const struct timespec *)ts, (const sigset_t *)set),
/* _callargs_chk */ (&ret, stub_errno, fds, nfds, ts, set),
/* _callargs_err */ (&errno, (struct pollfd *)fds, nfds, (const struct timespec *)ts, (const sigset_t *)set),
/* _localcheck */ {if (!(cheri_getperm(fds) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(ts) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(set) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(546, int, futimens,
/* _protoargs */ (int fd, const struct timespec * times),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const struct timespec * times),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const struct timespec * times),
/* _callargs */ (fd, (const struct timespec *)times),
/* _callargs_chk */ (&ret, stub_errno, fd, times),
/* _callargs_err */ (&errno, fd, (const struct timespec *)times),
/* _localcheck */ {if (!(cheri_getperm(times) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(547, int, utimensat,
/* _protoargs */ (int fd, const char * path, const struct timespec * times, int flag),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd, __capability const char * path, __capability const struct timespec * times, int flag),
/* _protoargs_err */ (__capability int *stub_errno, int fd, __capability const char * path, __capability const struct timespec * times, int flag),
/* _callargs */ (fd, (const char *)path, (const struct timespec *)times, flag),
/* _callargs_chk */ (&ret, stub_errno, fd, path, times, flag),
/* _callargs_err */ (&errno, fd, (const char *)path, (const struct timespec *)times, flag),
/* _localcheck */ {if (!(cheri_getperm(path) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} if (!(cheri_getperm(times) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(548, int, numa_getaffinity,
/* _protoargs */ (cpuwhich_t which, id_t id, struct vm_domain_policy_entry * policy),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, cpuwhich_t which, id_t id, __capability struct vm_domain_policy_entry * policy),
/* _protoargs_err */ (__capability int *stub_errno, cpuwhich_t which, id_t id, __capability struct vm_domain_policy_entry * policy),
/* _callargs */ (which, id, (struct vm_domain_policy_entry *)policy),
/* _callargs_chk */ (&ret, stub_errno, which, id, policy),
/* _callargs_err */ (&errno, which, id, (struct vm_domain_policy_entry *)policy),
/* _localcheck */ {if (!(cheri_getperm(policy) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(549, int, numa_setaffinity,
/* _protoargs */ (cpuwhich_t which, id_t id, const struct vm_domain_policy_entry * policy),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, cpuwhich_t which, id_t id, __capability const struct vm_domain_policy_entry * policy),
/* _protoargs_err */ (__capability int *stub_errno, cpuwhich_t which, id_t id, __capability const struct vm_domain_policy_entry * policy),
/* _callargs */ (which, id, (const struct vm_domain_policy_entry *)policy),
/* _callargs_chk */ (&ret, stub_errno, which, id, policy),
/* _callargs_err */ (&errno, which, id, (const struct vm_domain_policy_entry *)policy),
/* _localcheck */ {if (!(cheri_getperm(policy) & CHERI_PERM_GLOBAL)) {errno = EPROT; return ((int)-1);} }
)
SYS_STUB(550, int, fdatasync,
/* _protoargs */ (int fd),
/* _protoargs_chk */ (int *retp , __capability int *stub_errno, int fd),
/* _protoargs_err */ (__capability int *stub_errno, int fd),
/* _callargs */ (fd),
/* _callargs_chk */ (&ret, stub_errno, fd),
/* _callargs_err */ (&errno, fd),
/* _localcheck */ {}
)
# 117 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_system.h" 2 3 4
#undef SYS_STUB
#undef SYS_STUB_ARGHASPTRS
#undef SYS_STUB_VA
#endif /* !_CHERI_SYSTEM_H_ */
# 123 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/cheri/cheri_system.h" 3 4
# 42 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <inttypes.h>
#endif /* expanded by -frewrite-includes */
# 43 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/output-postmerge/sdk256/bin/../lib/clang/5.0.0/include/inttypes.h" 1 3 4
/*===---- inttypes.h - Standard header for integer printf macros ----------===*\
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
\*===----------------------------------------------------------------------===*/
#ifndef __CLANG_INTTYPES_H
#define __CLANG_INTTYPES_H
#if defined(_MSC_VER) && _MSC_VER < 1800
#error MSVC does not have inttypes.h prior to Visual Studio 2013
#endif
# 29 "/home/alr48/cheri/output-postmerge/sdk256/bin/../lib/clang/5.0.0/include/inttypes.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include_next <inttypes.h>
#endif /* expanded by -frewrite-includes */
# 30 "/home/alr48/cheri/output-postmerge/sdk256/bin/../lib/clang/5.0.0/include/inttypes.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/inttypes.h" 1 3 4
/*-
* 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.
*
* $FreeBSD$
*/
#ifndef _INTTYPES_H_
#define _INTTYPES_H_
#if 0 /* expanded by -frewrite-includes */
#include <machine/_inttypes.h>
#endif /* expanded by -frewrite-includes */
# 32 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/inttypes.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_inttypes.h" 1 3 4
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Klaus Klein.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* From: $NetBSD: int_fmtio.h,v 1.2 2001/04/26 16:25:21 kleink Exp $
* from: src/sys/i386/include/_inttypes.h,v 1.2 2002/06/30 05:48:02 mike
* $FreeBSD$
*/
#ifndef _MACHINE_INTTYPES_H_
#define _MACHINE_INTTYPES_H_
/*
* Macros for format specifiers.
*/
#ifdef __mips_n64
#define __PRI64 "l"
#ifndef __CHERI_PURE_CAPABILITY__
#define __PRIptr "l"
#else
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_inttypes.h" 3 4
#define __PRIptr "P"
#endif
# 48 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_inttypes.h" 3 4
#else
# 49 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_inttypes.h" 3 4
#define __PRI64 "ll"
#define __PRIptr
#endif
# 52 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_inttypes.h" 3 4
/* fprintf(3) macros for signed integers. */
#define PRId8 "d" /* int8_t */
#define PRId16 "d" /* int16_t */
#define PRId32 "d" /* int32_t */
#define PRId64 __PRI64"d" /* int64_t */
#define PRIdLEAST8 "d" /* int_least8_t */
#define PRIdLEAST16 "d" /* int_least16_t */
#define PRIdLEAST32 "d" /* int_least32_t */
#define PRIdLEAST64 __PRI64"d" /* int_least64_t */
#define PRIdFAST8 "d" /* int_fast8_t */
#define PRIdFAST16 "d" /* int_fast16_t */
#define PRIdFAST32 "d" /* int_fast32_t */
#define PRIdFAST64 __PRI64"d" /* int_fast64_t */
#define PRIdMAX "jd" /* intmax_t */
#define PRIdPTR __PRIptr"d" /* intptr_t */
#define PRIi8 "i" /* int8_t */
#define PRIi16 "i" /* int16_t */
#define PRIi32 "i" /* int32_t */
#define PRIi64 __PRI64"i" /* int64_t */
#define PRIiLEAST8 "i" /* int_least8_t */
#define PRIiLEAST16 "i" /* int_least16_t */
#define PRIiLEAST32 "i" /* int_least32_t */
#define PRIiLEAST64 __PRI64"i" /* int_least64_t */
#define PRIiFAST8 "i" /* int_fast8_t */
#define PRIiFAST16 "i" /* int_fast16_t */
#define PRIiFAST32 "i" /* int_fast32_t */
#define PRIiFAST64 __PRI64"i" /* int_fast64_t */
#define PRIiMAX "ji" /* intmax_t */
#define PRIiPTR __PRIptr"i" /* intptr_t */
/* fprintf(3) macros for unsigned integers. */
#define PRIo8 "o" /* uint8_t */
#define PRIo16 "o" /* uint16_t */
#define PRIo32 "o" /* uint32_t */
#define PRIo64 __PRI64"o" /* uint64_t */
#define PRIoLEAST8 "o" /* uint_least8_t */
#define PRIoLEAST16 "o" /* uint_least16_t */
#define PRIoLEAST32 "o" /* uint_least32_t */
#define PRIoLEAST64 __PRI64"o" /* uint_least64_t */
#define PRIoFAST8 "o" /* uint_fast8_t */
#define PRIoFAST16 "o" /* uint_fast16_t */
#define PRIoFAST32 "o" /* uint_fast32_t */
#define PRIoFAST64 __PRI64"o" /* uint_fast64_t */
#define PRIoMAX "jo" /* uintmax_t */
#define PRIoPTR __PRIptr"o" /* uintptr_t */
#define PRIu8 "u" /* uint8_t */
#define PRIu16 "u" /* uint16_t */
#define PRIu32 "u" /* uint32_t */
#define PRIu64 __PRI64"u" /* uint64_t */
#define PRIuLEAST8 "u" /* uint_least8_t */
#define PRIuLEAST16 "u" /* uint_least16_t */
#define PRIuLEAST32 "u" /* uint_least32_t */
#define PRIuLEAST64 __PRI64"u" /* uint_least64_t */
#define PRIuFAST8 "u" /* uint_fast8_t */
#define PRIuFAST16 "u" /* uint_fast16_t */
#define PRIuFAST32 "u" /* uint_fast32_t */
#define PRIuFAST64 __PRI64"u" /* uint_fast64_t */
#define PRIuMAX "ju" /* uintmax_t */
#define PRIuPTR __PRIptr"u" /* uintptr_t */
#define PRIx8 "x" /* uint8_t */
#define PRIx16 "x" /* uint16_t */
#define PRIx32 "x" /* uint32_t */
#define PRIx64 __PRI64"x" /* uint64_t */
#define PRIxLEAST8 "x" /* uint_least8_t */
#define PRIxLEAST16 "x" /* uint_least16_t */
#define PRIxLEAST32 "x" /* uint_least32_t */
#define PRIxLEAST64 __PRI64"x" /* uint_least64_t */
#define PRIxFAST8 "x" /* uint_fast8_t */
#define PRIxFAST16 "x" /* uint_fast16_t */
#define PRIxFAST32 "x" /* uint_fast32_t */
#define PRIxFAST64 __PRI64"x" /* uint_fast64_t */
#define PRIxMAX "jx" /* uintmax_t */
#define PRIxPTR __PRIptr"x" /* uintptr_t */
#define PRIX8 "X" /* uint8_t */
#define PRIX16 "X" /* uint16_t */
#define PRIX32 "X" /* uint32_t */
#define PRIX64 __PRI64"X" /* uint64_t */
#define PRIXLEAST8 "X" /* uint_least8_t */
#define PRIXLEAST16 "X" /* uint_least16_t */
#define PRIXLEAST32 "X" /* uint_least32_t */
#define PRIXLEAST64 __PRI64"X" /* uint_least64_t */
#define PRIXFAST8 "X" /* uint_fast8_t */
#define PRIXFAST16 "X" /* uint_fast16_t */
#define PRIXFAST32 "X" /* uint_fast32_t */
#define PRIXFAST64 __PRI64"X" /* uint_fast64_t */
#define PRIXMAX "jX" /* uintmax_t */
#define PRIXPTR __PRIptr"X" /* uintptr_t */
/* fscanf(3) macros for signed integers. */
#define SCNd8 "hhd" /* int8_t */
#define SCNd16 "hd" /* int16_t */
#define SCNd32 "d" /* int32_t */
#define SCNd64 __PRI64"d" /* int64_t */
#define SCNdLEAST8 "hhd" /* int_least8_t */
#define SCNdLEAST16 "hd" /* int_least16_t */
#define SCNdLEAST32 "d" /* int_least32_t */
#define SCNdLEAST64 __PRI64"d" /* int_least64_t */
#define SCNdFAST8 "d" /* int_fast8_t */
#define SCNdFAST16 "d" /* int_fast16_t */
#define SCNdFAST32 "d" /* int_fast32_t */
#define SCNdFAST64 __PRI64"d" /* int_fast64_t */
#define SCNdMAX "jd" /* intmax_t */
#define SCNdPTR __PRIptr"d" /* intptr_t */
#define SCNi8 "hhi" /* int8_t */
#define SCNi16 "hi" /* int16_t */
#define SCNi32 "i" /* int32_t */
#define SCNi64 __PRI64"i" /* int64_t */
#define SCNiLEAST8 "hhi" /* int_least8_t */
#define SCNiLEAST16 "hi" /* int_least16_t */
#define SCNiLEAST32 "i" /* int_least32_t */
#define SCNiLEAST64 __PRI64"i" /* int_least64_t */
#define SCNiFAST8 "i" /* int_fast8_t */
#define SCNiFAST16 "i" /* int_fast16_t */
#define SCNiFAST32 "i" /* int_fast32_t */
#define SCNiFAST64 __PRI64"i" /* int_fast64_t */
#define SCNiMAX "ji" /* intmax_t */
#define SCNiPTR __PRIptr"i" /* intptr_t */
/* fscanf(3) macros for unsigned integers. */
#define SCNo8 "hho" /* uint8_t */
#define SCNo16 "ho" /* uint16_t */
#define SCNo32 "o" /* uint32_t */
#define SCNo64 __PRI64"o" /* uint64_t */
#define SCNoLEAST8 "hho" /* uint_least8_t */
#define SCNoLEAST16 "ho" /* uint_least16_t */
#define SCNoLEAST32 "o" /* uint_least32_t */
#define SCNoLEAST64 __PRI64"o" /* uint_least64_t */
#define SCNoFAST8 "o" /* uint_fast8_t */
#define SCNoFAST16 "o" /* uint_fast16_t */
#define SCNoFAST32 "o" /* uint_fast32_t */
#define SCNoFAST64 __PRI64"o" /* uint_fast64_t */
#define SCNoMAX "jo" /* uintmax_t */
#define SCNoPTR __PRIptr"o" /* uintptr_t */
#define SCNu8 "hhu" /* uint8_t */
#define SCNu16 "hu" /* uint16_t */
#define SCNu32 "u" /* uint32_t */
#define SCNu64 __PRI64"u" /* uint64_t */
#define SCNuLEAST8 "hhu" /* uint_least8_t */
#define SCNuLEAST16 "hu" /* uint_least16_t */
#define SCNuLEAST32 "u" /* uint_least32_t */
#define SCNuLEAST64 __PRI64"u" /* uint_least64_t */
#define SCNuFAST8 "u" /* uint_fast8_t */
#define SCNuFAST16 "u" /* uint_fast16_t */
#define SCNuFAST32 "u" /* uint_fast32_t */
#define SCNuFAST64 __PRI64"u" /* uint_fast64_t */
#define SCNuMAX "ju" /* uintmax_t */
#define SCNuPTR __PRIptr"u" /* uintptr_t */
#define SCNx8 "hhx" /* uint8_t */
#define SCNx16 "hx" /* uint16_t */
#define SCNx32 "x" /* uint32_t */
#define SCNx64 __PRI64"x" /* uint64_t */
#define SCNxLEAST8 "hhx" /* uint_least8_t */
#define SCNxLEAST16 "hx" /* uint_least16_t */
#define SCNxLEAST32 "x" /* uint_least32_t */
#define SCNxLEAST64 __PRI64"x" /* uint_least64_t */
#define SCNxFAST8 "x" /* uint_fast8_t */
#define SCNxFAST16 "x" /* uint_fast16_t */
#define SCNxFAST32 "x" /* uint_fast32_t */
#define SCNxFAST64 __PRI64"x" /* uint_fast64_t */
#define SCNxMAX "jx" /* uintmax_t */
#define SCNxPTR __PRIptr"x" /* uintptr_t */
#endif /* !_MACHINE_INTTYPES_H_ */
# 227 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_inttypes.h" 3 4
# 33 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/inttypes.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/stdint.h>
#endif /* expanded by -frewrite-includes */
# 33 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/inttypes.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stdint.h" 1 3 4
/*-
* 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.
*
* $FreeBSD$
*/
#ifndef _SYS_STDINT_H_
#define _SYS_STDINT_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 32 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stdint.h" 3 4
# 33 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stdint.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 33 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stdint.h" 3 4
# 34 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stdint.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <machine/_stdint.h>
#endif /* expanded by -frewrite-includes */
# 35 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stdint.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 1 3 4
/*-
* Copyright (c) 2001, 2002 Mike Barcroft <mike@FreeBSD.org>
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by Klaus Klein.
*
* 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 NetBSD
* Foundation, Inc. and its contributors.
* 4. Neither the name of The NetBSD Foundation 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
* from: src/sys/i386/include/_stdint.h,v 1.2 2004/05/18 16:04:57 stefanf
* $FreeBSD$
*/
#ifndef _MACHINE__STDINT_H_
#define _MACHINE__STDINT_H_
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
#define INT8_C(c) (c)
#define INT16_C(c) (c)
#define INT32_C(c) (c)
#define UINT8_C(c) (c)
#define UINT16_C(c) (c)
#define UINT32_C(c) (c ## U)
#ifdef __mips_n64
#define INT64_C(c) (c ## L)
#define UINT64_C(c) (c ## UL)
#else
# 58 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 3 4
#define INT64_C(c) (c ## LL)
#define UINT64_C(c) (c ## ULL)
#endif
# 61 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 3 4
#define INTMAX_C(c) INT64_C(c)
#define UINTMAX_C(c) UINT64_C(c)
#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */
# 66 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 3 4
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
#ifndef __INT64_C
#ifdef __mips_n64
#define __INT64_C(c) (c ## L)
#define __UINT64_C(c) (c ## UL)
#else
# 74 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 3 4
#define __INT64_C(c) (c ## LL)
#define __UINT64_C(c) (c ## ULL)
#endif
# 77 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 3 4
#endif
# 78 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 3 4
/*
* ISO/IEC 9899:1999
* 7.18.2.1 Limits of exact-width integer types
*/
/* Minimum values of exact-width signed integer types. */
#define INT8_MIN (-0x7f-1)
#define INT16_MIN (-0x7fff-1)
#define INT32_MIN (-0x7fffffff-1)
#define INT64_MIN (-__INT64_C(0x7fffffffffffffff)-1)
/* Maximum values of exact-width signed integer types. */
#define INT8_MAX 0x7f
#define INT16_MAX 0x7fff
#define INT32_MAX 0x7fffffff
#define INT64_MAX __INT64_C(0x7fffffffffffffff)
/* Maximum values of exact-width unsigned integer types. */
#define UINT8_MAX 0xff
#define UINT16_MAX 0xffff
#define UINT32_MAX 0xffffffff
#define UINT64_MAX __UINT64_C(0xffffffffffffffff)
/*
* ISO/IEC 9899:1999
* 7.18.2.2 Limits of minimum-width integer types
*/
/* Minimum values of minimum-width signed integer types. */
#define INT_LEAST8_MIN INT8_MIN
#define INT_LEAST16_MIN INT16_MIN
#define INT_LEAST32_MIN INT32_MIN
#define INT_LEAST64_MIN INT64_MIN
/* Maximum values of minimum-width signed integer types. */
#define INT_LEAST8_MAX INT8_MAX
#define INT_LEAST16_MAX INT16_MAX
#define INT_LEAST32_MAX INT32_MAX
#define INT_LEAST64_MAX INT64_MAX
/* Maximum values of minimum-width unsigned integer types. */
#define UINT_LEAST8_MAX UINT8_MAX
#define UINT_LEAST16_MAX UINT16_MAX
#define UINT_LEAST32_MAX UINT32_MAX
#define UINT_LEAST64_MAX UINT64_MAX
/*
* ISO/IEC 9899:1999
* 7.18.2.3 Limits of fastest minimum-width integer types
*/
/* Minimum values of fastest minimum-width signed integer types. */
#define INT_FAST8_MIN INT32_MIN
#define INT_FAST16_MIN INT32_MIN
#define INT_FAST32_MIN INT32_MIN
#define INT_FAST64_MIN INT64_MIN
/* Maximum values of fastest minimum-width signed integer types. */
#define INT_FAST8_MAX INT32_MAX
#define INT_FAST16_MAX INT32_MAX
#define INT_FAST32_MAX INT32_MAX
#define INT_FAST64_MAX INT64_MAX
/* Maximum values of fastest minimum-width unsigned integer types. */
#define UINT_FAST8_MAX UINT32_MAX
#define UINT_FAST16_MAX UINT32_MAX
#define UINT_FAST32_MAX UINT32_MAX
#define UINT_FAST64_MAX UINT64_MAX
/*
* ISO/IEC 9899:1999
* 7.18.2.4 Limits of integer types capable of holding object pointers
*/
#ifdef __mips_n64
#define INTPTR_MIN INT64_MIN
#define INTPTR_MAX INT64_MAX
#define UINTPTR_MAX UINT64_MAX
#else
# 154 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 3 4
#define INTPTR_MIN INT32_MIN
#define INTPTR_MAX INT32_MAX
#define UINTPTR_MAX UINT32_MAX
#endif
# 158 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 3 4
/*
* ISO/IEC 9899:1999
* 7.18.2.5 Limits of greatest-width integer types
*/
#define INTMAX_MIN INT64_MIN
#define INTMAX_MAX INT64_MAX
#define UINTMAX_MAX UINT64_MAX
/*
* ISO/IEC 9899:1999
* 7.18.3 Limits of other integer types
*/
#ifdef __mips_n64
/* Limits of ptrdiff_t. */
#define PTRDIFF_MIN INT64_MIN
#define PTRDIFF_MAX INT64_MAX
/* Limit of size_t. */
#define SIZE_MAX UINT64_MAX
#else
# 179 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 3 4
/* Limits of ptrdiff_t. */
#define PTRDIFF_MIN INT32_MIN
#define PTRDIFF_MAX INT32_MAX
/* Limit of size_t. */
#define SIZE_MAX UINT32_MAX
#endif
# 186 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 3 4
/* Limits of sig_atomic_t. */
#define SIG_ATOMIC_MIN INT32_MIN
#define SIG_ATOMIC_MAX INT32_MAX
/* Limits of wint_t. */
#define WINT_MIN INT32_MIN
#define WINT_MAX INT32_MAX
#endif /* !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) */
# 196 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 3 4
#endif /* !_MACHINE__STDINT_H_ */
# 198 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/machine/_stdint.h" 3 4
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stdint.h" 2 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_stdint.h>
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stdint.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stdint.h" 3 4
typedef __int_least8_t int_least8_t;
typedef __int_least16_t int_least16_t;
typedef __int_least32_t int_least32_t;
typedef __int_least64_t int_least64_t;
typedef __uint_least8_t uint_least8_t;
typedef __uint_least16_t uint_least16_t;
typedef __uint_least32_t uint_least32_t;
typedef __uint_least64_t uint_least64_t;
typedef __int_fast8_t int_fast8_t;
typedef __int_fast16_t int_fast16_t;
typedef __int_fast32_t int_fast32_t;
typedef __int_fast64_t int_fast64_t;
typedef __uint_fast8_t uint_fast8_t;
typedef __uint_fast16_t uint_fast16_t;
typedef __uint_fast32_t uint_fast32_t;
typedef __uint_fast64_t uint_fast64_t;
/* GNU and Darwin define this and people seem to think it's portable */
#if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX)
#define __WORDSIZE 64
#else
# 62 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stdint.h" 3 4
#define __WORDSIZE 32
#endif
# 64 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stdint.h" 3 4
/* Limits of wchar_t. */
#define WCHAR_MIN __WCHAR_MIN
#define WCHAR_MAX __WCHAR_MAX
#endif /* !_SYS_STDINT_H_ */
# 70 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/stdint.h" 3 4
# 34 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/inttypes.h" 2 3 4
#ifndef __cplusplus
#ifndef _WCHAR_T_DECLARED
typedef ___wchar_t wchar_t;
#define _WCHAR_T_DECLARED
#endif
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/inttypes.h" 3 4
#endif
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/inttypes.h" 3 4
typedef struct {
intmax_t quot; /* Quotient. */
intmax_t rem; /* Remainder. */
} imaxdiv_t;
__BEGIN_DECLS
#ifdef _XLOCALE_H_
#if 0 /* expanded by -frewrite-includes */
#include <xlocale/_inttypes.h>
#endif /* expanded by -frewrite-includes */
# 49 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/inttypes.h" 3 4
# 50 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/inttypes.h" 3 4
#endif
# 51 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/inttypes.h" 3 4
intmax_t imaxabs(intmax_t) __pure2;
imaxdiv_t imaxdiv(intmax_t, intmax_t) __pure2;
intmax_t strtoimax(const char * __restrict, char ** __restrict, int);
uintmax_t strtoumax(const char * __restrict, char ** __restrict, int);
intmax_t wcstoimax(const wchar_t * __restrict,
wchar_t ** __restrict, int);
uintmax_t wcstoumax(const wchar_t * __restrict,
wchar_t ** __restrict, int);
__END_DECLS
#endif /* !_INTTYPES_H_ */
# 63 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/inttypes.h" 3 4
# 31 "/home/alr48/cheri/output-postmerge/sdk256/bin/../lib/clang/5.0.0/include/inttypes.h" 2 3 4
#if defined(_MSC_VER) && _MSC_VER < 1900
/* MSVC headers define int32_t as int, but PRIx32 as "lx" instead of "x".
* This triggers format warnings, so fix it up here. */
#undef PRId32
#undef PRIdLEAST32
#undef PRIdFAST32
#undef PRIi32
#undef PRIiLEAST32
#undef PRIiFAST32
#undef PRIo32
#undef PRIoLEAST32
#undef PRIoFAST32
#undef PRIu32
#undef PRIuLEAST32
#undef PRIuFAST32
#undef PRIx32
#undef PRIxLEAST32
#undef PRIxFAST32
#undef PRIX32
#undef PRIXLEAST32
#undef PRIXFAST32
#undef SCNd32
#undef SCNdLEAST32
#undef SCNdFAST32
#undef SCNi32
#undef SCNiLEAST32
#undef SCNiFAST32
#undef SCNo32
#undef SCNoLEAST32
#undef SCNoFAST32
#undef SCNu32
#undef SCNuLEAST32
#undef SCNuFAST32
#undef SCNx32
#undef SCNxLEAST32
#undef SCNxFAST32
#define PRId32 "d"
#define PRIdLEAST32 "d"
#define PRIdFAST32 "d"
#define PRIi32 "i"
#define PRIiLEAST32 "i"
#define PRIiFAST32 "i"
#define PRIo32 "o"
#define PRIoLEAST32 "o"
#define PRIoFAST32 "o"
#define PRIu32 "u"
#define PRIuLEAST32 "u"
#define PRIuFAST32 "u"
#define PRIx32 "x"
#define PRIxLEAST32 "x"
#define PRIxFAST32 "x"
#define PRIX32 "X"
#define PRIXLEAST32 "X"
#define PRIXFAST32 "X"
#define SCNd32 "d"
#define SCNdLEAST32 "d"
#define SCNdFAST32 "d"
#define SCNi32 "i"
#define SCNiLEAST32 "i"
#define SCNiFAST32 "i"
#define SCNo32 "o"
#define SCNoLEAST32 "o"
#define SCNoFAST32 "o"
#define SCNu32 "u"
#define SCNuLEAST32 "u"
#define SCNuFAST32 "u"
#define SCNx32 "x"
#define SCNxLEAST32 "x"
#define SCNxFAST32 "x"
#endif
# 105 "/home/alr48/cheri/output-postmerge/sdk256/bin/../lib/clang/5.0.0/include/inttypes.h" 3 4
#endif /* __CLANG_INTTYPES_H */
# 107 "/home/alr48/cheri/output-postmerge/sdk256/bin/../lib/clang/5.0.0/include/inttypes.h" 3 4
# 44 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <md5.h>
#endif /* expanded by -frewrite-includes */
# 44 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 1 3 4
/* $FreeBSD$ */
#ifndef _MD5_H_
#define _MD5_H_
#ifndef _KERNEL
/* Ensure libmd symbols do not clash with libcrypto */
#ifndef MD5Init
#define MD5Init _libmd_MD5Init
#endif
# 13 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
#ifndef MD5Update
#define MD5Update _libmd_MD5Update
#endif
# 16 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
#ifndef MD5Pad
#define MD5Pad _libmd_MD5Pad
#endif
# 19 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
#ifndef MD5Final
#define MD5Final _libmd_MD5Final
#endif
# 22 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
#ifndef MD5Transform
#define MD5Transform _libmd_MD5Transform
#endif
# 25 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
#ifndef MD5End
#define MD5End _libmd_MD5End
#endif
# 28 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
#ifndef MD5Fd
#define MD5Fd _libmd_MD5Fd
#endif
# 31 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
#ifndef MD5FdChunk
#define MD5FdChunk _libmd_MD5FdChunk
#endif
# 34 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
#ifndef MD5File
#define MD5File _libmd_MD5File
#endif
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
#ifndef MD5FileChunk
#define MD5FileChunk _libmd_MD5FileChunk
#endif
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
#ifndef MD5Data
#define MD5Data _libmd_MD5Data
#endif
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
#endif
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/md5.h>
#endif /* expanded by -frewrite-includes */
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/md5.h" 1 3 4
/* MD5.H - header file for MD5C.C
* $FreeBSD$
*/
/*-
Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All
rights reserved.
License to copy and use this software is granted provided that it
is identified as the "RSA Data Security, Inc. MD5 Message-Digest
Algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided
that such works are identified as "derived from the RSA Data
Security, Inc. MD5 Message-Digest Algorithm" in all material
mentioning or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either
the merchantability of this software or the suitability of this
software for any particular purpose. It is provided "as is"
without express or implied warranty of any kind.
These notices must be retained in any copies of any part of this
documentation and/or software.
*/
#ifndef _SYS_MD5_H_
#define _SYS_MD5_H_
#define MD5_BLOCK_LENGTH 64
#define MD5_DIGEST_LENGTH 16
#define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_LENGTH * 2 + 1)
/* MD5 context. */
typedef struct MD5Context {
u_int32_t state[4]; /* state (ABCD) */
u_int32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */
unsigned char buffer[64]; /* input buffer */
} MD5_CTX;
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/md5.h" 3 4
# 43 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/md5.h" 3 4
__BEGIN_DECLS
void MD5Init (MD5_CTX *);
void MD5Update (MD5_CTX *, const void *, unsigned int);
void MD5Final (unsigned char[__min_size(MD5_DIGEST_LENGTH)], MD5_CTX *);
#ifndef _KERNEL
char * MD5End(MD5_CTX *, char *);
char * MD5Fd(int, char *);
char * MD5FdChunk(int, char *, off_t, off_t);
char * MD5File(const char *, char *);
char * MD5FileChunk(const char *, char *, off_t, off_t);
char * MD5Data(const void *, unsigned int, char *);
#endif
# 56 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/md5.h" 3 4
__END_DECLS
#endif /* _SYS_MD5_H_ */
# 58 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/sys/md5.h" 3 4
# 47 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 2 3 4
#endif /* _MD5_H_ */
# 48 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/md5.h" 3 4
# 45 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <stddef.h>
#endif /* expanded by -frewrite-includes */
# 45 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 1 3 4
/*-
* 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.
*
* @(#)stddef.h 8.1 (Berkeley) 6/2/93
*
* $FreeBSD$
*/
#ifndef _STDDEF_H_
#define _STDDEF_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_null.h>
#endif /* expanded by -frewrite-includes */
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
#ifndef _PTRDIFF_T_DECLARED
typedef __ptrdiff_t ptrdiff_t;
#define _PTRDIFF_T_DECLARED
#endif
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
#if __BSD_VISIBLE
#ifndef _RUNE_T_DECLARED
typedef __rune_t rune_t;
#define _RUNE_T_DECLARED
#endif
# 51 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
#endif
# 52 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
#ifndef _SIZE_T_DECLARED
typedef __size_t size_t;
#define _SIZE_T_DECLARED
#endif
# 57 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
#ifndef __cplusplus
#ifndef _WCHAR_T_DECLARED
typedef ___wchar_t wchar_t;
#define _WCHAR_T_DECLARED
#endif
# 63 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
#endif
# 64 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
#ifndef __CLANG_MAX_ALIGN_T_DEFINED
typedef __max_align_t max_align_t;
#define __CLANG_MAX_ALIGN_T_DEFINED
#define _GCC_MAX_ALIGN_T
#endif
# 71 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
#endif
# 72 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
#define offsetof(type, member) __offsetof(type, member)
#endif /* _STDDEF_H_ */
# 76 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stddef.h" 3 4
# 46 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <stdio.h>
#endif /* expanded by -frewrite-includes */
# 46 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 1 3 4
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Chris Torek.
*
* 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.
*
* @(#)stdio.h 8.5 (Berkeley) 4/29/95
* $FreeBSD$
*/
#ifndef _STDIO_H_
#define _STDIO_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_null.h>
#endif /* expanded by -frewrite-includes */
# 40 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 41 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
# 42 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
typedef __off_t fpos_t;
#ifndef _SIZE_T_DECLARED
typedef __size_t size_t;
#define _SIZE_T_DECLARED
#endif
# 49 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if __POSIX_VISIBLE >= 200809
#ifndef _OFF_T_DECLARED
#define _OFF_T_DECLARED
typedef __off_t off_t;
#endif
# 55 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#ifndef _SSIZE_T_DECLARED
#define _SSIZE_T_DECLARED
typedef __ssize_t ssize_t;
#endif
# 59 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#endif
# 60 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#ifndef _OFF64_T_DECLARED
#define _OFF64_T_DECLARED
typedef __off64_t off64_t;
#endif
# 65 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
#ifndef _VA_LIST_DECLARED
typedef __va_list va_list;
#define _VA_LIST_DECLARED
#endif
# 71 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#endif
# 72 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#define _FSTDIO /* Define for new stdio with functions. */
/*
* NB: to fit things in six character monocase externals, the stdio
* code uses the prefix `__s' for stdio objects, typically followed
* by a three-character attempt at a mnemonic.
*/
/* stdio buffers */
struct __sbuf {
unsigned char *_base;
int _size;
};
/*
* stdio state variables.
*
* The following always hold:
*
* if (_flags&(__SLBF|__SWR)) == (__SLBF|__SWR),
* _lbfsize is -_bf._size, else _lbfsize is 0
* if _flags&__SRD, _w is 0
* if _flags&__SWR, _r is 0
*
* This ensures that the getc and putc macros (or inline functions) never
* try to write or read from a file that is in `read' or `write' mode.
* (Moreover, they can, and do, automatically switch from read mode to
* write mode, and back, on "r+" and "w+" files.)
*
* _lbfsize is used only to make the inline line-buffered output stream
* code as compact as possible.
*
* _ub, _up, and _ur are used when ungetc() pushes back more characters
* than fit in the current _bf, or when ungetc() pushes back a character
* that does not match the previous one in _bf. When this happens,
* _ub._base becomes non-nil (i.e., a stream has ungetc() data iff
* _ub._base!=NULL) and _up and _ur save the current values of _p and _r.
*
* Certain members of __sFILE are accessed directly via macros or
* inline functions. To preserve ABI compat, these members must not
* be disturbed. These members are marked below with (*).
*/
struct __sFILE {
unsigned char *_p; /* (*) current position in (some) buffer */
int _r; /* (*) read space left for getc() */
int _w; /* (*) write space left for putc() */
short _flags; /* (*) flags, below; this FILE is free if 0 */
short _file; /* (*) fileno, if Unix descriptor, else -1 */
struct __sbuf _bf; /* (*) the buffer (at least 1 byte, if !NULL) */
int _lbfsize; /* (*) 0 or -_bf._size, for inline putc */
/* operations */
void *_cookie; /* (*) cookie passed to io functions */
int (*_close)(void *);
int (*_read)(void *, char *, int);
fpos_t (*_seek)(void *, fpos_t, int);
int (*_write)(void *, const char *, int);
/* separate buffer for long sequences of ungetc() */
struct __sbuf _ub; /* ungetc buffer */
unsigned char *_up; /* saved _p when _p is doing ungetc data */
int _ur; /* saved _r when _r is counting ungetc data */
/* tricks to meet minimum requirements even when malloc() fails */
unsigned char _ubuf[3]; /* guarantee an ungetc() buffer */
unsigned char _nbuf[1]; /* guarantee a getc() buffer */
/* separate buffer for fgetln() when line crosses buffer boundary */
struct __sbuf _lb; /* buffer for fgetln() */
/* Unix stdio files get aligned to block boundaries on fseek() */
int _blksize; /* stat.st_blksize (may be != _bf._size) */
fpos_t _offset; /* current lseek offset */
struct pthread_mutex *_fl_mutex; /* used for MT-safety */
struct pthread *_fl_owner; /* current owner */
int _fl_count; /* recursive lock count */
int _orientation; /* orientation for fwide() */
__mbstate_t _mbstate; /* multibyte conversion state */
int _flags2; /* additional flags */
};
#ifndef _STDFILE_DECLARED
#define _STDFILE_DECLARED
typedef struct __sFILE FILE;
#endif
# 158 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#ifndef _STDSTREAM_DECLARED
__BEGIN_DECLS
extern FILE *__stdinp;
extern FILE *__stdoutp;
extern FILE *__stderrp;
__END_DECLS
#define _STDSTREAM_DECLARED
#endif
# 166 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#define __SLBF 0x0001 /* line buffered */
#define __SNBF 0x0002 /* unbuffered */
#define __SRD 0x0004 /* OK to read */
#define __SWR 0x0008 /* OK to write */
/* RD and WR are never simultaneously asserted */
#define __SRW 0x0010 /* open for reading & writing */
#define __SEOF 0x0020 /* found EOF */
#define __SERR 0x0040 /* found error */
#define __SMBF 0x0080 /* _bf._base is from malloc */
#define __SAPP 0x0100 /* fdopen()ed in append mode */
#define __SSTR 0x0200 /* this is an sprintf/snprintf string */
#define __SOPT 0x0400 /* do fseek() optimization */
#define __SNPT 0x0800 /* do not do fseek() optimization */
#define __SOFF 0x1000 /* set iff _offset is in fact correct */
#define __SMOD 0x2000 /* true => fgetln modified _p text */
#define __SALC 0x4000 /* allocate string space dynamically */
#define __SIGN 0x8000 /* ignore this file in _fwalk */
#define __S2OAP 0x0001 /* O_APPEND mode is set */
/*
* The following three definitions are for ANSI C, which took them
* from System V, which brilliantly took internal interface macros and
* made them official arguments to setvbuf(), without renaming them.
* Hence, these ugly _IOxxx names are *supposed* to appear in user code.
*
* Although numbered as their counterparts above, the implementation
* does not rely on this.
*/
#define _IOFBF 0 /* setvbuf should set fully buffered */
#define _IOLBF 1 /* setvbuf should set line buffered */
#define _IONBF 2 /* setvbuf should set unbuffered */
#define BUFSIZ 1024 /* size of buffer used by setbuf */
#define EOF (-1)
/*
* FOPEN_MAX is a minimum maximum, and is the number of streams that
* stdio can provide without attempting to allocate further resources
* (which could fail). Do not use this for anything.
*/
/* must be == _POSIX_STREAM_MAX <limits.h> */
#ifndef FOPEN_MAX
#define FOPEN_MAX 20 /* must be <= OPEN_MAX <sys/syslimits.h> */
#endif
# 212 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#define FILENAME_MAX 1024 /* must be <= PATH_MAX <sys/syslimits.h> */
/* System V/ANSI C; this is the wrong way to do this, do *not* use these. */
#if __XSI_VISIBLE
#define P_tmpdir "/tmp/"
#endif
# 218 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#define L_tmpnam 1024 /* XXX must be == PATH_MAX */
#define TMP_MAX 308915776
#ifndef SEEK_SET
#define SEEK_SET 0 /* set file offset to offset */
#endif
# 224 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#ifndef SEEK_CUR
#define SEEK_CUR 1 /* set file offset to current plus offset */
#endif
# 227 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#ifndef SEEK_END
#define SEEK_END 2 /* set file offset to EOF plus offset */
#endif
# 230 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#define stdin __stdinp
#define stdout __stdoutp
#define stderr __stderrp
__BEGIN_DECLS
#ifdef _XLOCALE_H_
#if 0 /* expanded by -frewrite-includes */
#include <xlocale/_stdio.h>
#endif /* expanded by -frewrite-includes */
# 237 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
# 238 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#endif
# 239 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
/*
* Functions defined in ANSI C standard.
*/
void clearerr(FILE *);
int fclose(FILE *);
int feof(FILE *);
int ferror(FILE *);
int fflush(FILE *);
int fgetc(FILE *);
int fgetpos(FILE * __restrict, fpos_t * __restrict);
char *fgets(char * __restrict, int, FILE * __restrict);
FILE *fopen(const char * __restrict, const char * __restrict);
int fprintf(FILE * __restrict, const char * __restrict, ...) __printflike(2, 3);
int fputc(int, FILE *);
int fputs(const char * __restrict, FILE * __restrict);
size_t fread(void * __restrict, size_t, size_t, FILE * __restrict);
FILE *freopen(const char * __restrict, const char * __restrict, FILE * __restrict);
int fscanf(FILE * __restrict, const char * __restrict, ...) __scanflike(2, 3);;
int fseek(FILE *, long, int);
int fsetpos(FILE *, const fpos_t *);
long ftell(FILE *);
size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict);
int getc(FILE *);
int getchar(void);
char *gets(char *);
void perror(const char *);
int printf(const char * __restrict, ...) __printflike(1, 2);
int putc(int, FILE *);
int putchar(int);
int puts(const char *);
int remove(const char *);
int rename(const char *, const char *);
void rewind(FILE *);
int scanf(const char * __restrict, ...) __scanflike(1, 2);
void setbuf(FILE * __restrict, char * __restrict);
int setvbuf(FILE * __restrict, char * __restrict, int, size_t);
int sprintf(char * __restrict, const char * __restrict, ...) __printflike(2, 3);
int sscanf(const char * __restrict, const char * __restrict, ...) __scanflike(2, 3);
FILE *tmpfile(void);
char *tmpnam(char *);
int ungetc(int, FILE *);
int vfprintf(FILE * __restrict, const char * __restrict,
__va_list);
int vprintf(const char * __restrict, __va_list);
int vsprintf(char * __restrict, const char * __restrict,
__va_list);
#if __ISO_C_VISIBLE >= 1999
int snprintf(char * __restrict, size_t, const char * __restrict,
...) __printflike(3, 4);
int vfscanf(FILE * __restrict, const char * __restrict, __va_list)
__scanflike(2, 0);
int vscanf(const char * __restrict, __va_list) __scanflike(1, 0);
int vsnprintf(char * __restrict, size_t, const char * __restrict,
__va_list) __printflike(3, 0);
int vsscanf(const char * __restrict, const char * __restrict, __va_list)
__scanflike(2, 0);
#endif
# 297 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
/*
* Functions defined in all versions of POSIX 1003.1.
*/
#if __BSD_VISIBLE || (__POSIX_VISIBLE && __POSIX_VISIBLE <= 199506)
#define L_cuserid 17 /* size for cuserid(3); MAXLOGNAME, legacy */
#endif
# 304 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if __POSIX_VISIBLE
#define L_ctermid 1024 /* size for ctermid(3); PATH_MAX */
char *ctermid(char *);
FILE *fdopen(int, const char *);
int fileno(FILE *);
#endif /* __POSIX_VISIBLE */
# 312 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if __POSIX_VISIBLE >= 199209
int pclose(FILE *);
FILE *popen(const char *, const char *);
#endif
# 317 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if __POSIX_VISIBLE >= 199506
int ftrylockfile(FILE *);
void flockfile(FILE *);
void funlockfile(FILE *);
/*
* These are normally used through macros as defined below, but POSIX
* requires functions as well.
*/
int getc_unlocked(FILE *);
int getchar_unlocked(void);
int putc_unlocked(int, FILE *);
int putchar_unlocked(int);
#endif
# 332 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if __BSD_VISIBLE
void clearerr_unlocked(FILE *);
int feof_unlocked(FILE *);
int ferror_unlocked(FILE *);
int fileno_unlocked(FILE *);
#endif
# 338 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if __POSIX_VISIBLE >= 200112
int fseeko(FILE *, __off_t, int);
__off_t ftello(FILE *);
#endif
# 343 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if __BSD_VISIBLE || __XSI_VISIBLE > 0 && __XSI_VISIBLE < 600
int getw(FILE *);
int putw(int, FILE *);
#endif /* BSD or X/Open before issue 6 */
# 348 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if __XSI_VISIBLE
char *tempnam(const char *, const char *);
#endif
# 352 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if __POSIX_VISIBLE >= 200809
FILE *fmemopen(void * __restrict, size_t, const char * __restrict);
ssize_t getdelim(char ** __restrict, size_t * __restrict, int,
FILE * __restrict);
FILE *open_memstream(char **, size_t *);
int renameat(int, const char *, int, const char *);
int vdprintf(int, const char * __restrict, __va_list) __printflike(2, 0);
/* _WITH_GETLINE to allow pre 11 sources to build on 11+ systems */
ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict);
int dprintf(int, const char * __restrict, ...) __printflike(2, 3);
#endif /* __POSIX_VISIBLE >= 200809 */
# 364 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
/*
* Routines that are purely local.
*/
#if __BSD_VISIBLE
int asprintf(char **, const char *, ...) __printflike(2, 3);
char *ctermid_r(char *);
void fcloseall(void);
int fdclose(FILE *, int *);
char *fgetln(FILE *, size_t *);
const char *fmtcheck(const char *, const char *) __format_arg(2);
int fpurge(FILE *);
void setbuffer(FILE *, char *, int);
int setlinebuf(FILE *);
int vasprintf(char **, const char *, __va_list)
__printflike(2, 0);
/*
* The system error table contains messages for the first sys_nerr
* positive errno values. Use strerror() or strerror_r() from <string.h>
* instead.
*/
extern const int sys_nerr;
extern const char * const sys_errlist[];
/*
* Stdio function-access interface.
*/
FILE *funopen(const void *,
int (*)(void *, char *, int),
int (*)(void *, const char *, int),
fpos_t (*)(void *, fpos_t, int),
int (*)(void *));
#define fropen(cookie, fn) funopen(cookie, fn, 0, 0, 0)
#define fwopen(cookie, fn) funopen(cookie, 0, fn, 0, 0)
typedef __ssize_t cookie_read_function_t(void *, char *, size_t);
typedef __ssize_t cookie_write_function_t(void *, const char *, size_t);
typedef int cookie_seek_function_t(void *, off64_t *, int);
typedef int cookie_close_function_t(void *);
typedef struct {
cookie_read_function_t *read;
cookie_write_function_t *write;
cookie_seek_function_t *seek;
cookie_close_function_t *close;
} cookie_io_functions_t;
FILE *fopencookie(void *, const char *, cookie_io_functions_t);
/*
* Portability hacks. See <sys/types.h>.
*/
#ifndef _FTRUNCATE_DECLARED
#define _FTRUNCATE_DECLARED
int ftruncate(int, __off_t);
#endif
# 419 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#ifndef _LSEEK_DECLARED
#define _LSEEK_DECLARED
__off_t lseek(int, __off_t, int);
#endif
# 423 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#ifndef _MMAP_DECLARED
#define _MMAP_DECLARED
void *mmap(void *, size_t, int, int, int, __off_t);
#endif
# 427 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#ifndef _TRUNCATE_DECLARED
#define _TRUNCATE_DECLARED
int truncate(const char *, __off_t);
#endif
# 431 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#endif /* __BSD_VISIBLE */
# 432 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
/*
* Functions internal to the implementation.
*/
int __srget(FILE *);
int __swbuf(int, FILE *);
/*
* The __sfoo macros are here so that we can
* define function versions in the C library.
*/
#define __sgetc(p) (--(p)->_r < 0 ? __srget(p) : (int)(*(p)->_p++))
#if defined(__GNUC__) && defined(__STDC__)
static __inline int __sputc(int _c, FILE *_p) {
if (--_p->_w >= 0 || (_p->_w >= _p->_lbfsize && (char)_c != '\n'))
return (*_p->_p++ = _c);
else
return (__swbuf(_c, _p));
}
#else
# 452 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
/*
* This has been tuned to generate reasonable code on the vax using pcc.
*/
#define __sputc(c, p) \
(--(p)->_w < 0 ? \
(p)->_w >= (p)->_lbfsize ? \
(*(p)->_p = (c)), *(p)->_p != '\n' ? \
(int)*(p)->_p++ : \
__swbuf('\n', p) : \
__swbuf((int)(c), p) : \
(*(p)->_p = (c), (int)*(p)->_p++))
#endif
# 464 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
extern int __isthreaded;
#ifndef __cplusplus
#define __sfeof(p) (((p)->_flags & __SEOF) != 0)
#define __sferror(p) (((p)->_flags & __SERR) != 0)
#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF)))
#define __sfileno(p) ((p)->_file)
#define feof(p) (!__isthreaded ? __sfeof(p) : (feof)(p))
#define ferror(p) (!__isthreaded ? __sferror(p) : (ferror)(p))
#define clearerr(p) (!__isthreaded ? __sclearerr(p) : (clearerr)(p))
#if __POSIX_VISIBLE
#define fileno(p) (!__isthreaded ? __sfileno(p) : (fileno)(p))
#endif
# 482 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#define getc(fp) (!__isthreaded ? __sgetc(fp) : (getc)(fp))
#define putc(x, fp) (!__isthreaded ? __sputc(x, fp) : (putc)(x, fp))
#define getchar() getc(stdin)
#define putchar(x) putc(x, stdout)
#if __BSD_VISIBLE
/*
* See ISO/IEC 9945-1 ANSI/IEEE Std 1003.1 Second Edition 1996-07-12
* B.8.2.7 for the rationale behind the *_unlocked() macros.
*/
#define feof_unlocked(p) __sfeof(p)
#define ferror_unlocked(p) __sferror(p)
#define clearerr_unlocked(p) __sclearerr(p)
#define fileno_unlocked(p) __sfileno(p)
#endif
# 499 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#if __POSIX_VISIBLE >= 199506
#define getc_unlocked(fp) __sgetc(fp)
#define putc_unlocked(x, fp) __sputc(x, fp)
#define getchar_unlocked() getc_unlocked(stdin)
#define putchar_unlocked(x) putc_unlocked(x, stdout)
#endif
# 506 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
#endif /* __cplusplus */
# 507 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
__END_DECLS
#endif /* !_STDIO_H_ */
# 510 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdio.h" 3 4
# 47 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <stdlib.h>
#endif /* expanded by -frewrite-includes */
# 47 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 1 3 4
/*-
* 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.
*
* @(#)stdlib.h 8.5 (Berkeley) 5/19/95
* $FreeBSD$
*/
#ifndef _STDLIB_H_
#define _STDLIB_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_null.h>
#endif /* expanded by -frewrite-includes */
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#if __BSD_VISIBLE
#ifndef _RUNE_T_DECLARED
typedef __rune_t rune_t;
#define _RUNE_T_DECLARED
#endif
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#endif
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#ifndef _SIZE_T_DECLARED
typedef __size_t size_t;
#define _SIZE_T_DECLARED
#endif
# 51 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#ifndef __cplusplus
#ifndef _WCHAR_T_DECLARED
typedef ___wchar_t wchar_t;
#define _WCHAR_T_DECLARED
#endif
# 57 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#endif
# 58 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
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
#define RAND_MAX 0x7ffffffd
__BEGIN_DECLS
#ifdef _XLOCALE_H_
#if 0 /* expanded by -frewrite-includes */
#include <xlocale/_stdlib.h>
#endif /* expanded by -frewrite-includes */
# 76 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
# 77 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#endif
# 78 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
extern int __mb_cur_max;
extern int ___mb_cur_max(void);
#define MB_CUR_MAX ((size_t)___mb_cur_max())
_Noreturn void abort(void);
int abs(int) __pure2;
int atexit(void (*)(void));
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 *, const void *));
void *calloc(size_t, size_t) __malloc_like __result_use_check
__alloc_size(1) __alloc_size(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 (*)(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 thie header is _Exit().)
*/
#if __ISO_C_VISIBLE >= 1999 || defined(__cplusplus)
#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 */
# 151 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
_Noreturn void _Exit(int);
#endif /* __ISO_C_VISIBLE >= 1999 */
# 154 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
/*
* If we're in a mode greater than C99, expose C11 functions.
*/
#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L
void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1)
__alloc_size(2);
int at_quick_exit(void (*)(void));
_Noreturn void
quick_exit(int);
#endif /* __ISO_C_VISIBLE >= 2011 */
# 165 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
/*
* Extensions made by POSIX relative to C.
*/
#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE
char *realpath(const char * __restrict, char * __restrict);
#endif
# 171 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#if __POSIX_VISIBLE >= 199506
int rand_r(unsigned *); /* (TSF) */
#endif
# 174 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#if __POSIX_VISIBLE >= 200112
int posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */
int setenv(const char *, const char *, int);
int unsetenv(const char *);
#endif
# 179 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#if __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE
int getsubopt(char **, char *const *, char **);
#ifndef _MKDTEMP_DECLARED
char *mkdtemp(char *);
#define _MKDTEMP_DECLARED
#endif
# 186 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#ifndef _MKSTEMP_DECLARED
int mkstemp(char *);
#define _MKSTEMP_DECLARED
#endif
# 190 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#endif /* __POSIX_VISIBLE >= 200809 || __XSI_VISIBLE */
# 191 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
/*
* 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 __XSI_VISIBLE
/* 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); */
int grantpt(int);
char *initstate(unsigned int, char *, size_t);
long jrand48(unsigned short[3]);
char *l64a(long);
void lcong48(unsigned short[7]);
long lrand48(void);
#if !defined(_MKTEMP_DECLARED) && (__BSD_VISIBLE || __XSI_VISIBLE <= 600)
char *mktemp(char *);
#define _MKTEMP_DECLARED
#endif
# 216 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
long mrand48(void);
long nrand48(unsigned short[3]);
int posix_openpt(int);
char *ptsname(int);
int putenv(char *);
long random(void);
unsigned short
*seed48(unsigned short[3]);
char *setstate(/* const */ char *);
void srand48(long);
void srandom(unsigned int);
int unlockpt(int);
#endif /* __XSI_VISIBLE */
# 229 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
#if __BSD_VISIBLE
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;
* in all other cases, provide a prototype, mainly to pacify various
* incarnations of lint. On platforms where alloca() is not in libc,
* programs which use it will fail to link when compiled with non-GNU
* compilers.
*/
#if __GNUC__ >= 2 || defined(__INTEL_COMPILER)
#undef alloca /* some GNU bits try to get cute and define this on their own */
#define alloca(sz) __builtin_alloca(sz)
#elif defined(lint)
# 247 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
void *alloca(size_t);
#endif
# 249 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
void abort2(const char *, int, void **) __dead2;
__uint32_t
arc4random(void);
void arc4random_addrandom(unsigned char *, int);
void arc4random_buf(void *, size_t);
void arc4random_stir(void);
__uint32_t
arc4random_uniform(__uint32_t);
#ifdef __BLOCKS__
int atexit_b(void (^)(void));
void *bsearch_b(const void *, const void *, size_t,
size_t, int (^)(const void *, const void *));
#endif
# 263 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
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 daemon(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 (*)(const void *, const void *));
#ifdef __BLOCKS__
int heapsort_b(void *, size_t, size_t, int (^)(const void *, const void *));
void qsort_b(void *, size_t, size_t,
int (^)(const void *, const void *));
#endif
# 291 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
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
# 296 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
int mkostemp(char *, int);
int mkostemps(char *, int, int);
void qsort_r(void *, size_t, size_t, void *,
int (*)(void *, const void *, const void *));
int radixsort(const unsigned char **, int, const unsigned char *,
unsigned);
void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2)
__alloc_size(3);
void *reallocf(void *, size_t) __alloc_size(2);
int rpmatch(const char *);
void setprogname(const char *);
int sradixsort(const unsigned char **, int, const unsigned char *,
unsigned);
void sranddev(void);
void srandomdev(void);
long long
strtonum(const char *, long long, long long, const char **);
/* Deprecated interfaces, to be removed in FreeBSD 6.0. */
__int64_t
strtoq(const char *, char **, int);
__uint64_t
strtouq(const char *, char **, int);
#if __has_feature(capabilities)
long strtol_c(__capability const char * __restrict,
__capability char ** __restrict, int);
long double
strtold_c(__capability const char * __restrict,
__capability char ** __restrict);
#endif
# 327 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
int timsort(void *base, size_t nel, size_t width,
int (*compar) (const void *, const void *));
extern char *suboptarg; /* getsubopt(3) external variable */
#endif /* __BSD_VISIBLE */
# 333 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
__END_DECLS
#endif /* !_STDLIB_H_ */
# 336 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/stdlib.h" 3 4
# 48 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <string.h>
#endif /* expanded by -frewrite-includes */
# 48 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 1 3 4
/*-
* 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.
*
* @(#)string.h 8.1 (Berkeley) 6/2/93
* $FreeBSD$
*/
#ifndef _STRING_H_
#define _STRING_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_null.h>
#endif /* expanded by -frewrite-includes */
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 38 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
/*
* Prototype functions which were historically defined in <string.h>, but
* are required by POSIX to be prototyped in <strings.h>.
*/
#if __BSD_VISIBLE
#if 0 /* expanded by -frewrite-includes */
#include <strings.h>
#endif /* expanded by -frewrite-includes */
# 45 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 1 3 4
/*-
* 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.
*
* $FreeBSD$
*/
#ifndef _STRINGS_H_
#define _STRINGS_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 32 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
# 33 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
#if 0 /* expanded by -frewrite-includes */
#include <sys/_types.h>
#endif /* expanded by -frewrite-includes */
# 33 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
# 34 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
#ifndef _SIZE_T_DECLARED
typedef __size_t size_t;
#define _SIZE_T_DECLARED
#endif
# 39 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
__BEGIN_DECLS
#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112
int bcmp(const void *, const void *, size_t) __pure; /* LEGACY */
void bcopy(const void *, void *, size_t); /* LEGACY */
void bzero(void *, size_t); /* LEGACY */
#endif
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
#if __BSD_VISIBLE
void explicit_bzero(void *, size_t);
#endif
# 49 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
#if __XSI_VISIBLE
int ffs(int) __pure2;
#endif
# 52 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
#if __BSD_VISIBLE
int ffsl(long) __pure2;
int ffsll(long long) __pure2;
int fls(int) __pure2;
int flsl(long) __pure2;
int flsll(long long) __pure2;
#endif
# 59 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
#if __BSD_VISIBLE || __POSIX_VISIBLE <= 200112
char *index(const char *, int) __pure; /* LEGACY */
char *rindex(const char *, int) __pure; /* LEGACY */
#endif
# 63 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
int strcasecmp(const char *, const char *) __pure;
int strncasecmp(const char *, const char *, size_t) __pure;
#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
#if 0 /* expanded by -frewrite-includes */
#include <xlocale/_strings.h>
#endif /* expanded by -frewrite-includes */
# 67 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_strings.h" 1 3 4
/*-
* Copyright (c) 2011, 2012 The FreeBSD Foundation
* 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.
*
* $FreeBSD$
*/
#ifndef _LOCALE_T_DEFINED
#define _LOCALE_T_DEFINED
typedef struct _xlocale *locale_t;
#endif
# 33 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_strings.h" 3 4
/*
* This file is included from both strings.h and xlocale.h. We need to expose
* the declarations unconditionally if we are included from xlocale.h, but only
* if we are in POSIX2008 mode if included from string.h.
*/
#ifndef _XLOCALE_STRINGS1_H
#define _XLOCALE_STRINGS1_H
/*
* POSIX2008 functions
*/
int strcasecmp_l(const char *, const char *, locale_t);
int strncasecmp_l(const char *, const char *, size_t, locale_t);
#endif /* _XLOCALE_STRINGS1_H */
# 49 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_strings.h" 3 4
# 68 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 2 3 4
#endif
# 69 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
__END_DECLS
#endif /* _STRINGS_H_ */
# 72 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/strings.h" 3 4
# 46 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 2 3 4
#endif
# 47 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
#ifndef _SIZE_T_DECLARED
typedef __size_t size_t;
#define _SIZE_T_DECLARED
#endif
# 52 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
__BEGIN_DECLS
#if __XSI_VISIBLE >= 600
void *memccpy(void * __restrict, const void * __restrict, int, size_t);
#endif
# 57 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
void *memchr(const void *, int, size_t) __pure;
#if __BSD_VISIBLE
void *memrchr(const void *, int, size_t) __pure;
#endif
# 61 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
int memcmp(const void *, const void *, size_t) __pure;
void *memcpy(void * __restrict, const void * __restrict, size_t);
#if __BSD_VISIBLE
void *memmem(const void *, size_t, const void *, size_t) __pure;
#endif
# 66 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
void *memmove(void *, const void *, size_t);
void *memset(void *, int, size_t);
#if __POSIX_VISIBLE >= 200809
char *stpcpy(char * __restrict, const char * __restrict);
char *stpncpy(char * __restrict, const char * __restrict, size_t);
#endif
# 72 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
#if __BSD_VISIBLE
char *strcasestr(const char *, const char *) __pure;
#endif
# 75 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
char *strcat(char * __restrict, const char * __restrict);
char *strchr(const char *, int) __pure;
#if __BSD_VISIBLE
char *strchrnul(const char*, int) __pure;
#endif
# 80 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
int strcmp(const char *, const char *) __pure;
int strcoll(const char *, const char *);
char *strcpy(char * __restrict, const char * __restrict);
size_t strcspn(const char *, const char *) __pure;
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
char *strdup(const char *) __malloc_like;
#endif
# 87 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
char *strerror(int);
#if __POSIX_VISIBLE >= 200112
int strerror_r(int, char *, size_t);
#endif
# 91 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
#if __BSD_VISIBLE
size_t strlcat(char * __restrict, const char * __restrict, size_t);
size_t strlcpy(char * __restrict, const char * __restrict, size_t);
#endif
# 95 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
size_t strlen(const char *) __pure;
#if __BSD_VISIBLE
void strmode(int, char *);
#endif
# 99 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
char *strncat(char * __restrict, const char * __restrict, size_t);
int strncmp(const char *, const char *, size_t) __pure;
char *strncpy(char * __restrict, const char * __restrict, size_t);
#if __POSIX_VISIBLE >= 200809
char *strndup(const char *, size_t) __malloc_like;
size_t strnlen(const char *, size_t) __pure;
#endif
# 106 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
#if __BSD_VISIBLE
char *strnstr(const char *, const char *, size_t) __pure;
#endif
# 109 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
char *strpbrk(const char *, const char *) __pure;
char *strrchr(const char *, int) __pure;
#if __BSD_VISIBLE
char *strsep(char **, const char *);
#endif
# 114 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
#if __POSIX_VISIBLE >= 200809
char *strsignal(int);
#endif
# 117 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
size_t strspn(const char *, const char *) __pure;
char *strstr(const char *, const char *) __pure;
char *strtok(char * __restrict, const char * __restrict);
#if __POSIX_VISIBLE >= 199506 || __XSI_VISIBLE >= 500
char *strtok_r(char *, const char *, char **);
#endif
# 123 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
size_t strxfrm(char * __restrict, const char * __restrict, size_t);
#if __BSD_VISIBLE
#ifndef _SWAB_DECLARED
#define _SWAB_DECLARED
#ifndef _SSIZE_T_DECLARED
typedef __ssize_t ssize_t;
#define _SSIZE_T_DECLARED
#endif /* _SIZE_T_DECLARED */
# 133 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
void swab(const void * __restrict, void * __restrict, ssize_t);
#endif /* _SWAB_DECLARED */
# 136 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
#if __has_feature(capabilities)
__capability const void *
memchr_c_const(__capability const void *, int, size_t) __pure;
__capability void
*memchr_c(__capability const void *, int, size_t) __pure;
int memcmp_c(__capability const void *, __capability const void *, size_t)
__pure;
__capability void
*memcpy_c(__capability void * __restrict,
__capability const void * __restrict, size_t);
void *memcpy_c_fromcap(void * __restrict,
__capability const void * __restrict, size_t);
__capability void
*memcpy_c_tocap(__capability void * __restrict,
const void * __restrict, size_t);
__capability void
*memmove_c(__capability void * __restrict,
__capability const void * __restrict, size_t);
__capability void
*memset_c(__capability void *, int, size_t);
__capability char
*strchr_c(__capability const char *, int) __pure;
int strcmp_c(__capability const char *,
__capability const char *s2) __pure;
__capability char
*strcpy_c(__capability char * __restrict,
__capability const char * __restrict);
int strncmp_c(__capability const char *, __capability const char *,
size_t) __pure;
__capability char
*strncpy_c(__capability char * __restrict, __capability const char * __restrict,
size_t);
char *strncpy_c_fromcap(char * __restrict,
__capability const char * __restrict, size_t);
__capability char
*strncpy_c_tocap(__capability char * __restrict,
const char * __restrict, size_t);
size_t strnlen_c(__capability const char *, size_t) __pure;
#endif
# 177 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
int timingsafe_bcmp(const void *, const void *, size_t);
int timingsafe_memcmp(const void *, const void *, size_t);
#endif /* __BSD_VISIBLE */
# 181 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
#if __POSIX_VISIBLE >= 200809 || defined(_XLOCALE_H_)
#if 0 /* expanded by -frewrite-includes */
#include <xlocale/_string.h>
#endif /* expanded by -frewrite-includes */
# 183 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_string.h" 1 3 4
/*-
* Copyright (c) 2011, 2012 The FreeBSD Foundation
* 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.
*
* $FreeBSD$
*/
#ifndef _LOCALE_T_DEFINED
#define _LOCALE_T_DEFINED
typedef struct _xlocale *locale_t;
#endif
# 33 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_string.h" 3 4
/*
* This file is included from both string.h and xlocale.h. We need to expose
* the declarations unconditionally if we are included from xlocale.h, but only
* if we are in POSIX2008 mode if included from string.h.
*/
#ifndef _XLOCALE_STRING1_H
#define _XLOCALE_STRING1_H
/*
* POSIX2008 functions
*/
int strcoll_l(const char *, const char *, locale_t);
size_t strxfrm_l(char *, const char *, size_t, locale_t);
#endif /* _XLOCALE_STRING1_H */
# 49 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_string.h" 3 4
/*
* xlocale extensions
*/
#ifdef _XLOCALE_H_
#ifndef _XLOCALE_STRING2_H
#define _XLOCALE_STRING2_H
char *strcasestr_l(const char *, const char *, locale_t);
#endif /* _XLOCALE_STRING2_H */
# 59 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_string.h" 3 4
#endif /* _XLOCALE_H_ */
# 60 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/xlocale/_string.h" 3 4
# 184 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 2 3 4
#endif
# 185 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
__END_DECLS
#endif /* _STRING_H_ */
# 188 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/string.h" 3 4
# 49 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c" 2
#if 0 /* expanded by -frewrite-includes */
#include <zlib.h>
#endif /* expanded by -frewrite-includes */
# 49 "/exports/users/alr48/sources/cheribsd-postmerge/libexec/cheritest-helper/cheritest-helper.c"
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zlib.h" 1 3 4
/* zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.8, April 28th, 2013
Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
The data format used by the zlib library is described by RFCs (Request for
Comments) 1950 to 1952 in the files http://tools.ietf.org/html/rfc1950
(zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).
*/
#ifndef ZLIB_H
#define ZLIB_H
#if 0 /* expanded by -frewrite-includes */
#include "zconf.h"
#endif /* expanded by -frewrite-includes */
# 34 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zlib.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 1 3 4
/* zconf.h -- configuration of the zlib compression library
* Copyright (C) 1995-2013 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $FreeBSD$ */
#ifndef ZCONF_H
#define ZCONF_H
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
* Even better than compiling with -DZ_PREFIX would be to use configure to set
* this permanently in zconf.h using "./configure --zprefix".
*/
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
# define Z_PREFIX_SET
/* all linked symbols */
# define _dist_code z__dist_code
# define _length_code z__length_code
# define _tr_align z__tr_align
# define _tr_flush_bits z__tr_flush_bits
# define _tr_flush_block z__tr_flush_block
# define _tr_init z__tr_init
# define _tr_stored_block z__tr_stored_block
# define _tr_tally z__tr_tally
# define adler32 z_adler32
# define adler32_combine z_adler32_combine
# define adler32_combine64 z_adler32_combine64
# ifndef Z_SOLO
# define compress z_compress
# define compress2 z_compress2
# define compressBound z_compressBound
# endif
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define crc32 z_crc32
# define crc32_combine z_crc32_combine
# define crc32_combine64 z_crc32_combine64
# define deflate z_deflate
# define deflateBound z_deflateBound
# define deflateCopy z_deflateCopy
# define deflateEnd z_deflateEnd
# define deflateInit2_ z_deflateInit2_
# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
# define deflatePending z_deflatePending
# define deflatePrime z_deflatePrime
# define deflateReset z_deflateReset
# define deflateResetKeep z_deflateResetKeep
# define deflateSetDictionary z_deflateSetDictionary
# define deflateSetHeader z_deflateSetHeader
# define deflateTune z_deflateTune
# define deflate_copyright z_deflate_copyright
# define get_crc_table z_get_crc_table
# ifndef Z_SOLO
# define gz_error z_gz_error
# define gz_intmax z_gz_intmax
# define gz_strwinerror z_gz_strwinerror
# define gzbuffer z_gzbuffer
# define gzclearerr z_gzclearerr
# define gzclose z_gzclose
# define gzclose_r z_gzclose_r
# define gzclose_w z_gzclose_w
# define gzdirect z_gzdirect
# define gzdopen z_gzdopen
# define gzeof z_gzeof
# define gzerror z_gzerror
# define gzflush z_gzflush
# define gzgetc z_gzgetc
# define gzgetc_ z_gzgetc_
# define gzgets z_gzgets
# define gzoffset z_gzoffset
# define gzoffset64 z_gzoffset64
# define gzopen z_gzopen
# define gzopen64 z_gzopen64
# ifdef _WIN32
# define gzopen_w z_gzopen_w
# endif
# 80 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define gzprintf z_gzprintf
# define gzvprintf z_gzvprintf
# define gzputc z_gzputc
# define gzputs z_gzputs
# define gzread z_gzread
# define gzrewind z_gzrewind
# define gzseek z_gzseek
# define gzseek64 z_gzseek64
# define gzsetparams z_gzsetparams
# define gztell z_gztell
# define gztell64 z_gztell64
# define gzungetc z_gzungetc
# define gzwrite z_gzwrite
# endif
# 94 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define inflate z_inflate
# define inflateBack z_inflateBack
# define inflateBackEnd z_inflateBackEnd
# define inflateBackInit_ z_inflateBackInit_
# define inflateCopy z_inflateCopy
# define inflateEnd z_inflateEnd
# define inflateGetHeader z_inflateGetHeader
# define inflateInit2_ z_inflateInit2_
# define inflateInit_ z_inflateInit_
# define inflateMark z_inflateMark
# define inflatePrime z_inflatePrime
# define inflateReset z_inflateReset
# define inflateReset2 z_inflateReset2
# define inflateSetDictionary z_inflateSetDictionary
# define inflateGetDictionary z_inflateGetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
# define inflateUndermine z_inflateUndermine
# define inflateResetKeep z_inflateResetKeep
# define inflate_copyright z_inflate_copyright
# define inflate_fast z_inflate_fast
# define inflate_table z_inflate_table
# ifndef Z_SOLO
# define uncompress z_uncompress
# endif
# 119 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define zError z_zError
# ifndef Z_SOLO
# define zcalloc z_zcalloc
# define zcfree z_zcfree
# endif
# 124 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define zlibCompileFlags z_zlibCompileFlags
# define zlibVersion z_zlibVersion
/* all zlib typedefs in zlib.h and zconf.h */
# define Byte z_Byte
# define Bytef z_Bytef
# define alloc_func z_alloc_func
# define charf z_charf
# define free_func z_free_func
# ifndef Z_SOLO
# define gzFile z_gzFile
# endif
# 136 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define gz_header z_gz_header
# define gz_headerp z_gz_headerp
# define in_func z_in_func
# define intf z_intf
# define out_func z_out_func
# define uInt z_uInt
# define uIntf z_uIntf
# define uLong z_uLong
# define uLongf z_uLongf
# define voidp z_voidp
# define voidpc z_voidpc
# define voidpf z_voidpf
/* all zlib structs in zlib.h and zconf.h */
# define gz_header_s z_gz_header_s
# define internal_state z_internal_state
#endif
# 154 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if defined(__MSDOS__) && !defined(MSDOS)
# define MSDOS
#endif
# 158 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
# define OS2
#endif
# 161 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if defined(_WINDOWS) && !defined(WINDOWS)
# define WINDOWS
#endif
# 164 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
# ifndef WIN32
# define WIN32
# endif
# 168 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 169 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
# ifndef SYS16BIT
# define SYS16BIT
# endif
# 174 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif
# 175 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 176 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
/*
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
* than 64k bytes at a time (needed on systems with 16-bit int).
*/
#ifdef SYS16BIT
# define MAXSEG_64K
#endif
# 184 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifdef MSDOS
# define UNALIGNED_OK
#endif
# 187 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifdef __STDC_VERSION__
# ifndef STDC
# define STDC
# endif
# 192 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# if __STDC_VERSION__ >= 199901L
# ifndef STDC99
# define STDC99
# endif
# 196 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif
# 197 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 198 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
# define STDC
#endif
# 201 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
# define STDC
#endif
# 204 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
# define STDC
#endif
# 207 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
# define STDC
#endif
# 210 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
# define STDC
#endif
# 214 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifndef STDC
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
# define const /* note: need a more gentle solution here */
# endif
# 219 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 220 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if defined(ZLIB_CONST) && !defined(z_const)
# define z_const const
#else
# 224 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define z_const
#endif
# 226 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
/* Some Mac compilers merge all .h files incorrectly: */
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
# define NO_DUMMY_DECL
#endif
# 231 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
/* Maximum value for memLevel in deflateInit2 */
#ifndef MAX_MEM_LEVEL
# ifdef MAXSEG_64K
# define MAX_MEM_LEVEL 8
# else
# 237 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define MAX_MEM_LEVEL 9
# endif
# 239 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 240 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
* created by gzip. (Files created by minigzip can still be extracted by
* gzip.)
*/
#ifndef MAX_WBITS
# define MAX_WBITS 15 /* 32K LZ77 window */
#endif
# 249 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
/* The memory requirements for deflate are (in bytes):
(1 << (windowBits+2)) + (1 << (memLevel+9))
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
plus a few kilobytes for small objects. For example, if you want to reduce
the default memory requirements from 256K to 128K, compile with
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
Of course this will generally degrade compression (there's no free lunch).
The memory requirements for inflate are (in bytes) 1 << windowBits
that is, 32K for windowBits=15 (default value) plus a few kilobytes
for small objects.
*/
/* Type declarations */
#ifndef OF /* function prototypes */
# ifdef STDC
# define OF(args) args
# else
# 269 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define OF(args) ()
# endif
# 271 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 272 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifndef Z_ARG /* function prototypes for stdarg */
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
# define Z_ARG(args) args
# else
# 277 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define Z_ARG(args) ()
# endif
# 279 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 280 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
/* The following definitions for FAR are needed only for MSDOS mixed
* model programming (small or medium model with some far allocations).
* This was tested only with MSC; for other MSDOS compilers you may have
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
* just define FAR to be empty.
*/
#ifdef SYS16BIT
# if defined(M_I86SM) || defined(M_I86MM)
/* MSC small or medium model */
# define SMALL_MEDIUM
# ifdef _MSC_VER
# define FAR _far
# else
# 294 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define FAR far
# endif
# 296 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif
# 297 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# if (defined(__SMALL__) || defined(__MEDIUM__))
/* Turbo C small or medium model */
# define SMALL_MEDIUM
# ifdef __BORLANDC__
# define FAR _far
# else
# 303 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define FAR far
# endif
# 305 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif
# 306 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 307 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if defined(WINDOWS) || defined(WIN32)
/* If building or using zlib as a DLL, define ZLIB_DLL.
* This is not mandatory, but it offers a little performance increase.
*/
# ifdef ZLIB_DLL
# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
# ifdef ZLIB_INTERNAL
# define ZEXTERN extern __declspec(dllexport)
# else
# 317 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define ZEXTERN extern __declspec(dllimport)
# endif
# 319 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif
# 320 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif /* ZLIB_DLL */
# 321 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
* define ZLIB_WINAPI.
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
*/
# ifdef ZLIB_WINAPI
# ifdef FAR
# undef FAR
# endif
# 329 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if 0 /* expanded by -frewrite-includes */
# include <windows.h>
#endif /* expanded by -frewrite-includes */
# 329 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# 330 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
/* No need for _export, use ZLIB.DEF instead. */
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
# define ZEXPORT WINAPI
# ifdef WIN32
# define ZEXPORTVA WINAPIV
# else
# 336 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define ZEXPORTVA FAR CDECL
# endif
# 338 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif
# 339 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 340 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if defined (__BEOS__)
# ifdef ZLIB_DLL
# ifdef ZLIB_INTERNAL
# define ZEXPORT __declspec(dllexport)
# define ZEXPORTVA __declspec(dllexport)
# else
# 347 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define ZEXPORT __declspec(dllimport)
# define ZEXPORTVA __declspec(dllimport)
# endif
# 350 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif
# 351 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 352 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifndef ZEXTERN
# define ZEXTERN extern
#endif
# 356 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifndef ZEXPORT
# define ZEXPORT
#endif
# 359 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifndef ZEXPORTVA
# define ZEXPORTVA
#endif
# 362 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifndef FAR
# define FAR
#endif
# 366 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if !defined(__MACTYPES__)
typedef unsigned char Byte; /* 8 bits */
#endif
# 370 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
typedef unsigned int uInt; /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
#ifdef SMALL_MEDIUM
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
# define Bytef Byte FAR
#else
# 377 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
typedef Byte FAR Bytef;
#endif
# 379 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
typedef char FAR charf;
typedef int FAR intf;
typedef uInt FAR uIntf;
typedef uLong FAR uLongf;
#ifdef STDC
typedef void const *voidpc;
typedef void FAR *voidpf;
typedef void *voidp;
#else
# 389 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
typedef Byte const *voidpc;
typedef Byte FAR *voidpf;
typedef Byte *voidp;
#endif
# 393 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
#if 0 /* expanded by -frewrite-includes */
# include <limits.h>
#endif /* expanded by -frewrite-includes */
# 395 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# 1 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 1 3 4
/*-
* 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.
*
* @(#)limits.h 8.2 (Berkeley) 1/4/94
* $FreeBSD$
*/
#ifndef _LIMITS_H_
#define _LIMITS_H_
#if 0 /* expanded by -frewrite-includes */
#include <sys/cdefs.h>
#endif /* expanded by -frewrite-includes */
# 36 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
# 37 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#if __POSIX_VISIBLE
#define _POSIX_ARG_MAX 4096
#define _POSIX_LINK_MAX 8
#define _POSIX_MAX_CANON 255
#define _POSIX_MAX_INPUT 255
#define _POSIX_NAME_MAX 14
#define _POSIX_PIPE_BUF 512
#define _POSIX_SSIZE_MAX 32767
#define _POSIX_STREAM_MAX 8
#if __POSIX_VISIBLE >= 200112
#define _POSIX_CHILD_MAX 25
#define _POSIX_NGROUPS_MAX 8
#define _POSIX_OPEN_MAX 20
#define _POSIX_PATH_MAX 256
#define _POSIX_TZNAME_MAX 6
#else
# 55 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#define _POSIX_CHILD_MAX 6
#define _POSIX_NGROUPS_MAX 0
#define _POSIX_OPEN_MAX 16
#define _POSIX_PATH_MAX 255
#define _POSIX_TZNAME_MAX 3
#endif
# 61 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#if __POSIX_VISIBLE >= 200112
#define BC_BASE_MAX 99 /* max ibase/obase values in bc(1) */
#define BC_DIM_MAX 2048 /* max array elements in bc(1) */
#define BC_SCALE_MAX 99 /* max scale value in bc(1) */
#define BC_STRING_MAX 1000 /* max const string length in bc(1) */
#define CHARCLASS_NAME_MAX 14 /* max character class name size */
#define COLL_WEIGHTS_MAX 10 /* max weights for order keyword */
#define EXPR_NEST_MAX 32 /* max expressions nested in expr(1) */
#define LINE_MAX 2048 /* max bytes in an input line */
#define RE_DUP_MAX 255 /* max RE's in interval notation */
#define _POSIX2_BC_BASE_MAX 99
#define _POSIX2_BC_DIM_MAX 2048
#define _POSIX2_BC_SCALE_MAX 99
#define _POSIX2_BC_STRING_MAX 1000
#define _POSIX2_CHARCLASS_NAME_MAX 14
#define _POSIX2_COLL_WEIGHTS_MAX 2
#define _POSIX2_EQUIV_CLASS_MAX 2
#define _POSIX2_EXPR_NEST_MAX 32
#define _POSIX2_LINE_MAX 2048
#define _POSIX2_RE_DUP_MAX 255
#endif
# 84 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#endif
# 85 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#if __POSIX_VISIBLE >= 199309
#define _POSIX_AIO_LISTIO_MAX 2
#define _POSIX_AIO_MAX 1
#define _POSIX_DELAYTIMER_MAX 32
#define _POSIX_MQ_OPEN_MAX 8
#define _POSIX_MQ_PRIO_MAX 32
#define _POSIX_RTSIG_MAX 8
#define _POSIX_SEM_NSEMS_MAX 256
#define _POSIX_SEM_VALUE_MAX 32767
#define _POSIX_SIGQUEUE_MAX 32
#define _POSIX_TIMER_MAX 32
#define _POSIX_CLOCKRES_MIN 20000000
#endif
# 100 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#if __POSIX_VISIBLE >= 199506
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
#define _POSIX_THREAD_KEYS_MAX 128
#define _POSIX_THREAD_THREADS_MAX 64
#endif
# 106 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#if __POSIX_VISIBLE >= 200112
#define _POSIX_HOST_NAME_MAX 255
#define _POSIX_LOGIN_NAME_MAX 9
#define _POSIX_SS_REPL_MAX 4
#define _POSIX_SYMLINK_MAX 255
#define _POSIX_SYMLOOP_MAX 8
#define _POSIX_TRACE_EVENT_NAME_MAX 30
#define _POSIX_TRACE_NAME_MAX 8
#define _POSIX_TRACE_SYS_MAX 8
#define _POSIX_TRACE_USER_EVENT_MAX 32
#define _POSIX_TTY_NAME_MAX 9
#define _POSIX_RE_DUP_MAX _POSIX2_RE_DUP_MAX
#endif
# 121 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#if __XSI_VISIBLE || __POSIX_VISIBLE >= 200809
#define NL_ARGMAX 65536 /* max # of position args for printf */
#define NL_MSGMAX 32767
#define NL_SETMAX 255
#define NL_TEXTMAX 2048
#endif
# 128 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#if __XSI_VISIBLE
#define _XOPEN_IOV_MAX 16
#define _XOPEN_NAME_MAX 255
#define _XOPEN_PATH_MAX 1024
#define PASS_MAX 128 /* _PASSWORD_LEN from <pwd.h> */
#define NL_LANGMAX 31 /* max LANG name length */
#define NL_NMAX 1
#endif
# 138 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#define MB_LEN_MAX 6 /* 31-bit UTF-8 */
#if 0 /* expanded by -frewrite-includes */
#include <sys/limits.h>
#endif /* expanded by -frewrite-includes */
# 141 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
# 142 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#if __POSIX_VISIBLE
#if 0 /* expanded by -frewrite-includes */
#include <sys/syslimits.h>
#endif /* expanded by -frewrite-includes */
# 144 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
# 145 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#endif
# 146 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
#endif /* !_LIMITS_H_ */
# 148 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/limits.h" 3 4
# 396 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 2 3 4
# if (UINT_MAX == 0xffffffffUL)
# define Z_U4 unsigned
# elif (ULONG_MAX == 0xffffffffUL)
# 399 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define Z_U4 unsigned long
# elif (USHRT_MAX == 0xffffffffUL)
# 401 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define Z_U4 unsigned short
# endif
# 403 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 404 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifdef Z_U4
typedef Z_U4 z_crc_t;
#else
# 408 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
typedef unsigned long z_crc_t;
#endif
# 410 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if 0 /* was set to #if 0 by ./configure */
# define Z_HAVE_UNISTD_H
#endif
# 414 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
# define Z_HAVE_STDARG_H
#endif
# 418 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifdef STDC
# ifndef Z_SOLO
#if 0 /* expanded by -frewrite-includes */
# include <sys/types.h> /* for off_t */
#endif /* expanded by -frewrite-includes */
# 421 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# 422 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif
# 423 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 424 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
# ifndef Z_SOLO
#if 0 /* expanded by -frewrite-includes */
# include <stdarg.h> /* for va_list */
#endif /* expanded by -frewrite-includes */
# 427 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# 428 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif
# 429 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 430 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifdef _WIN32
# ifndef Z_SOLO
#if 0 /* expanded by -frewrite-includes */
# include <stddef.h> /* for wchar_t */
#endif /* expanded by -frewrite-includes */
# 433 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# 434 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif
# 435 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 436 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
* though the former does not conform to the LFS document), but considering
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
* equivalently requesting no 64-bit operations
*/
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
# undef _LARGEFILE64_SOURCE
#endif
# 446 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
# define Z_HAVE_UNISTD_H
#endif
# 450 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifndef Z_SOLO
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
#if 0 /* expanded by -frewrite-includes */
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
#endif /* expanded by -frewrite-includes */
# 452 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# 453 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# ifdef VMS
#if 0 /* expanded by -frewrite-includes */
# include <unixio.h> /* for off_t */
#endif /* expanded by -frewrite-includes */
# 454 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# 455 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif
# 456 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# ifndef z_off_t
# define z_off_t off_t
# endif
# 459 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# endif
# 460 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 461 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
# define Z_LFS64
#endif
# 465 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
# define Z_LARGE64
#endif
# 469 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
# define Z_WANT64
#endif
# 473 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if !defined(SEEK_SET) && !defined(Z_SOLO)
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
# 479 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
/*
* This is hard-configured for FreeBSD.
*/
#define z_off_t off_t
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64
#endif
# 487 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#ifndef z_off_t
# define z_off_t long
#endif
# 491 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#if !defined(_WIN32) && defined(Z_LARGE64)
# define z_off64_t off64_t
#else
# 495 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
# define z_off64_t __int64
# else
# 498 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# define z_off64_t z_off_t
# endif
# 500 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif
# 501 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
/* MVS linker does not support external names larger than 8 bytes */
#if defined(__MVS__)
#pragma map(deflateInit_,"DEIN")
#pragma map(deflateInit2_,"DEIN2")
#pragma map(deflateEnd,"DEEND")
#pragma map(deflateBound,"DEBND")
#pragma map(inflateInit_,"ININ")
#pragma map(inflateInit2_,"ININ2")
#pragma map(inflateEnd,"INEND")
#pragma map(inflateSync,"INSY")
#pragma map(inflateSetDictionary,"INSEDI")
#pragma map(compressBound,"CMBND")
#pragma map(inflate_table,"INTABL")
#pragma map(inflate_fast,"INFA")
#pragma map(inflate_copyright,"INCOPY")
#endif
# 518 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
#endif /* ZCONF_H */
# 520 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-postmerge/tmp/usr/include/zconf.h" 3 4
# 35 "/home/alr48/cheri/build-postmerge/cheribsd-obj-256/mips.mips64/exports/users/alr48/sources/cheribsd-p
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment