You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
123 lines
3.0 KiB
C
123 lines
3.0 KiB
C
/* See the end of this file for copyright and license terms. */
|
|
|
|
#pragma once
|
|
|
|
#include <gay/_null.h>
|
|
#include <arch/_types.h>
|
|
|
|
#ifndef _BOOL_DECLARED
|
|
# define _BOOL_DECLARED 1
|
|
# ifndef __cplusplus
|
|
# if __STDC_VERSION__ >= 199901L
|
|
typedef _Bool bool;
|
|
# else
|
|
typedef __uint8_t bool;
|
|
# endif
|
|
# define true ((bool)1)
|
|
# define false ((bool)0)
|
|
# endif /* not __cplusplus */
|
|
#endif /* not _BOOL_DECLARED */
|
|
|
|
typedef __int8_t i8;
|
|
typedef __uint8_t u8;
|
|
|
|
typedef __int16_t i16;
|
|
typedef __uint16_t u16;
|
|
|
|
typedef __int32_t i32;
|
|
typedef __uint32_t u32;
|
|
|
|
typedef __int64_t i64;
|
|
typedef __uint64_t u64;
|
|
|
|
typedef __ssize_t isize;
|
|
typedef __size_t usize;
|
|
|
|
typedef __register_t word_t;
|
|
typedef __u_register_t uword_t;
|
|
|
|
#ifndef _SIZE_T_DECLARED
|
|
#define _SIZE_T_DECLARED 1
|
|
typedef __size_t size_t;
|
|
#endif /* not _SIZE_T_DECLARED */
|
|
|
|
#ifndef _PTRDIFF_T_DECLARED
|
|
#define _PTRDIFF_T_DECLARED 1
|
|
typedef __ptrdiff_t ptrdiff_t;
|
|
#endif /* not _PTRDIFF_T_DECLARED */
|
|
|
|
#ifndef _INTPTR_T_DECLARED
|
|
#define _INTPTR_T_DECLARED 1
|
|
typedef __intptr_t intptr_t;
|
|
#endif /* not _INTPTR_T_DECLARED */
|
|
|
|
#ifndef _UINTPTR_T_DECLARED
|
|
#define _UINTPTR_T_DECLARED 1
|
|
typedef __uintptr_t uintptr_t;
|
|
#endif /* not _UINTPTR_T_DECLARED */
|
|
|
|
#ifndef _SSIZE_T_DECLARED
|
|
#define _SSIZE_T_DECLARED 1
|
|
typedef __ssize_t ssize_t;
|
|
#endif /* not _SSIZE_T_DECLARED */
|
|
|
|
#ifndef _INTMAX_T_DECLARED
|
|
#define _INTMAX_T_DECLARED 1
|
|
typedef __intmax_t intmax_t;
|
|
#endif /* not _INTMAX_T_DECLARED */
|
|
|
|
#ifndef _UINTMAX_T_DECLARED
|
|
#define _UINTMAX_T_DECLARED 1
|
|
typedef __uintmax_t uintmax_t;
|
|
#endif /* not _UINTMAX_T_DECLARED */
|
|
|
|
#ifndef _WCHAR_T_DECLARED
|
|
#define _WCHAR_T_DECLARED 1
|
|
typedef __WCHAR_TYPE__ wchar_t;
|
|
#endif /* not _WCHAR_T_DECLARED */
|
|
|
|
#ifndef _WINT_T_DECLARED
|
|
#define _WINT_T_DECLARED 1
|
|
typedef __WINT_TYPE__ wint_t;
|
|
#endif /* not _WINT_T_DECLARED */
|
|
|
|
#ifndef _REGISTER_T_DECLARED
|
|
#define _REGISTER_T_DECLARED 1
|
|
typedef __register_t register_t;
|
|
#endif /* not _REGISTER_T_DECLARED */
|
|
|
|
#ifndef _U_REGISTER_T_DECLARED
|
|
#define _U_REGISTER_T_DECLARED 1
|
|
typedef __u_register_t u_register_t;
|
|
#endif /* not _U_REGISTER_T_DECLARED */
|
|
|
|
/**
|
|
* @brief The primitive atomic integral type.
|
|
* For use with the APIs defined in `arch/atomic.h`.
|
|
*/
|
|
typedef struct {
|
|
volatile int _value;
|
|
} atom_t;
|
|
|
|
/** @brief Atom definition body for static initialization of higher level components. */
|
|
#define ATOM_DEFINE(val) { ._value = (val) }
|
|
|
|
#ifndef _PID_T_DECLARED
|
|
#define _PID_T_DECLARED 1
|
|
typedef int pid_t;
|
|
#endif /* not _PID_T_DECLARED */
|
|
|
|
/*
|
|
* This file is part of GayBSD.
|
|
* Copyright (c) 2021 fef <owo@fef.moe>.
|
|
*
|
|
* GayBSD is nonviolent software: you may only use, redistribute, and/or
|
|
* modify it under the terms of the Cooperative Nonviolent Public License
|
|
* (CNPL) as found in the LICENSE file in the source code root directory
|
|
* or at <https://git.pixie.town/thufie/npl-builder>; either version 7
|
|
* of the license, or (at your option) any later version.
|
|
*
|
|
* GayBSD comes with ABSOLUTELY NO WARRANTY, to the extent
|
|
* permitted by applicable law. See the CNPL for details.
|
|
*/
|