⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ktypes.h

📁 The main purpose of this project is to add a new scheduling algorithm to GeekOS and to implement a s
💻 H
字号:
/* * Kernel data types * Copyright (c) 2001,2003 David H. Hovemeyer <daveho@cs.umd.edu> * $Revision: 1.13 $ *  * This is free software.  You are permitted to use, * redistribute, and modify it as specified in the file "COPYING". */#ifndef GEEKOS_KTYPES_H#define GEEKOS_KTYPES_H/* * GeekOS uses the C99 bool type, with true and false * constant values. */#include <stdbool.h>/* * Shorthand for commonly used integer types. */typedef unsigned long ulong_t;typedef unsigned int uint_t;typedef unsigned short ushort_t;typedef unsigned char uchar_t;/* * MIN() and MAX() macros. * By using gcc extensions, they are type-correct and * evaulate their arguments only once. */#define MIN(a,b) ({typeof (a) _a = (a); typeof (b) _b = (b); (_a < _b) ? _a : _b; })#define MAX(a,b) ({typeof (a) _a = (a); typeof (b) _b = (b); (_a < _b) ? _a : _b; })/* * Some ASCII character access and manipulation macros. */#define ISDIGIT(c) ((c) >= '0' && (c) <= '9')#define TOLOWER(c) (((c) >= 'A' && (c) <= 'Z') ? ((c) + ('a' - 'A')) : (c))#define TOUPPER(c) (((c) >= 'a' && (c) <= 'z') ? ((c) - ('a' - 'A')) : (c))#endif  /* GEEKOS_KTYPES_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -