📄 types.h
字号:
/* * This code derived from linux kernel 2.6 * Some small changes to adopt code to bootloader * Copyright 2005 by Pawel Kolodziejski * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */#ifndef _TYPES_H#define _TYPES_Htypedef signed char s8;typedef unsigned char u8;typedef signed short s16;typedef unsigned short u16;typedef signed int s32;typedef unsigned int u32;typedef signed long long s64;typedef unsigned long long u64;typedef u8 u_int8_t;typedef s8 int8_t;typedef u16 u_int16_t;typedef s16 int16_t;typedef u32 u_int32_t;typedef s32 int32_t;typedef u8 uint8_t;typedef u16 uint16_t;typedef u32 uint32_t;typedef u64 uint64_t;typedef u64 u_int64_t;typedef s64 int64_t;typedef u8 uint8;typedef s8 int8;typedef u16 uint16;typedef s16 int16;typedef u32 uint32;typedef s32 int32;typedef u8 u_char;typedef unsigned int size_t;#define PAGE_SIZE 4096#define NULL 0typedef char *va_list;#define _AUPBND (sizeof (int) - 1)#define _ADNBND (sizeof (int) - 1)#define _bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd)))#define va_arg(ap, T) (*(T *)(((ap) += (_bnd (T, _AUPBND))) - (_bnd (T,_ADNBND))))#define va_end(ap) (void) 0#define va_start(ap, A) (void) ((ap) = (((char *) &(A)) + (_bnd (A,_AUPBND))))#define isdigit(c) (c >= 0x30 && c<= 0x39)#define do_div(n,base) ({ \ uint32_t __base = (base); \ uint32_t __rem; \ (void)(((typeof((n)) *)0) == ((uint64_t *)0)); \ if ((n >> 32) == 0) { \ __rem = (uint32_t)(n) % __base; \ (n) = (uint32_t)(n) / __base; \ } else \ __rem = __div64_32(&(n), __base); \ __rem; \ })#define BITS_PER_UNIT 8#define SI_TYPE_SIZE (sizeof (SItype) * BITS_PER_UNIT)typedef unsigned int UQItype __attribute__ ((mode (QI)));typedef int SItype __attribute__ ((mode (SI)));typedef unsigned int USItype __attribute__ ((mode (SI)));typedef int DItype __attribute__ ((mode (DI)));typedef int word_type __attribute__ ((mode (__word__)));typedef unsigned int UDItype __attribute__ ((mode (DI)));struct DIstruct{SItype low, high;};typedef union { struct DIstruct s; DItype ll;} DIunion;#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -