|
||||
Warning, cross-references for /kernel/include/arch/cc.h need to be fixed.
0001 /* The Quest Operating System 0002 * Copyright (C) 2005-2010 Richard West, Boston University 0003 * 0004 * This program is free software: you can redistribute it and/or modify 0005 * it under the terms of the GNU General Public License as published by 0006 * the Free Software Foundation, either version 3 of the License, or 0007 * (at your option) any later version. 0008 * 0009 * This program is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0012 * GNU General Public License for more details. 0013 * 0014 * You should have received a copy of the GNU General Public License 0015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0016 */ 0017 0018 /* 0019 * Portions Copyright (c) 2001-2003 Swedish Institute of Computer Science. 0020 * All rights reserved. 0021 * 0022 * Redistribution and use in source and binary forms, with or without modification, 0023 * are permitted provided that the following conditions are met: 0024 * 0025 * 1. Redistributions of source code must retain the above copyright notice, 0026 * this list of conditions and the following disclaimer. 0027 * 2. Redistributions in binary form must reproduce the above copyright notice, 0028 * this list of conditions and the following disclaimer in the documentation 0029 * and/or other materials provided with the distribution. 0030 * 3. The name of the author may not be used to endorse or promote products 0031 * derived from this software without specific prior written permission. 0032 * 0033 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 0034 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 0035 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT 0036 * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 0037 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT 0038 * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 0039 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 0040 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 0041 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 0042 * OF SUCH DAMAGE. 0043 * 0044 * This file is part of the lwIP TCP/IP stack. 0045 * 0046 * Author: Adam Dunkels <adam@sics.se> 0047 * 0048 */ 0049 0050 /* The Quest Operating System 0051 * Portions Copyright (C) 2005-2010 Richard West, Boston University 0052 * 0053 * This program is free software: you can redistribute it and/or modify 0054 * it under the terms of the GNU General Public License as published by 0055 * the Free Software Foundation, either version 3 of the License, or 0056 * (at your option) any later version. 0057 * 0058 * This program is distributed in the hope that it will be useful, 0059 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0060 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0061 * GNU General Public License for more details. 0062 * 0063 * You should have received a copy of the GNU General Public License 0064 * along with this program. If not, see <http://www.gnu.org/licenses/>. 0065 */ 0066 0067 /* Ported to Quest by: Matthew Danish (md) */ 0068 0069 #ifndef __ARCH_CC_H__ 0070 #define __ARCH_CC_H__ 0071 0072 #include "types.h" 0073 #include "lwipopts.h" 0074 0075 /* Include some files for defining library routines */ 0076 //#include <linux/string.h> 0077 0078 /* Define platform endianness */ 0079 #ifndef BYTE_ORDER 0080 #define BYTE_ORDER LITTLE_ENDIAN 0081 #endif /* BYTE_ORDER */ 0082 0083 /* Define generic types used in lwIP */ 0084 typedef uint8 u8_t; 0085 typedef sint8 s8_t; 0086 typedef uint16 u16_t; 0087 typedef sint16 s16_t; 0088 typedef uint32 u32_t; 0089 typedef sint32 s32_t; 0090 0091 typedef u32_t mem_ptr_t; 0092 0093 /* Define (sn)printf formatters for these lwIP types */ 0094 #define U16_F "hu" 0095 #define S16_F "hd" 0096 #define X16_F "hx" 0097 #define U32_F "u" 0098 #define S32_F "d" 0099 #define X32_F "x" 0100 0101 /* Compiler hints for packing structures */ 0102 #if 1 /* GCC */ 0103 #define PACK_STRUCT_FIELD(x) x __attribute__((packed)) 0104 #define PACK_STRUCT_STRUCT __attribute__((packed)) 0105 #else 0106 #define PACK_STRUCT_FIELD(x) x 0107 #define PACK_STRUCT_STRUCT 0108 #endif 0109 #define PACK_STRUCT_BEGIN 0110 #define PACK_STRUCT_END 0111 0112 void printf(const char *fmt, ...); 0113 void com1_printf(const char *fmt, ...); 0114 void logger_printf(const char *fmt, ...); 0115 0116 /* Plaform specific diagnostic output */ 0117 /* Plaform specific diagnostic output */ 0118 #define LWIP_PLATFORM_DIAG(x) do {logger_printf x;} while(0) 0119 0120 #define LWIP_PLATFORM_ASSERT(x) do {logger_printf("Assertion \"%s\" failed at line %d in %s\n", \ 0121 x, __LINE__, __FILE__);} while(0) 0122 0123 #define PERF_START /* null definition */ 0124 #define PERF_STOP(x) /* null definition */ 0125 0126 #endif /* __ARCH_CC_H__ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 1.2.0 LXR engine. |