Changeset 5d494b3 in mainline
- Timestamp:
- 2008-04-03T20:05:06Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 776f2e6
- Parents:
- dfa7bac
- Location:
- kernel
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/amd64/include/byteorder.h
rdfa7bac r5d494b3 36 36 #define KERN_amd64_BYTEORDER_H_ 37 37 38 #include <byteorder.h>39 40 38 /* AMD64 is little-endian */ 41 #define uint16_t_le2host(n) (n) 42 #define uint32_t_le2host(n) (n) 43 #define uint64_t_le2host(n) (n) 44 45 #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) 46 #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) 47 #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) 39 #define ARCH_IS_LITTLE_ENDIAN 48 40 49 41 #endif -
kernel/arch/arm32/include/byteorder.h
rdfa7bac r5d494b3 37 37 #define KERN_arm32_BYTEORDER_H_ 38 38 39 #include <byteorder.h>40 41 39 #ifdef BIG_ENDIAN 42 43 #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) 44 #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) 45 #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) 46 47 #define uint16_t_be2host(n) (n) 48 #define uint32_t_be2host(n) (n) 49 #define uint64_t_be2host(n) (n) 50 40 #define ARCH_IS_BIG_ENDIAN 51 41 #else 52 53 #define uint16_t_le2host(n) (n) 54 #define uint32_t_le2host(n) (n) 55 #define uint64_t_le2host(n) (n) 56 57 #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) 58 #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) 59 #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) 60 42 #define ARCH_IS_LITTLE_ENDIAN 61 43 #endif 62 44 -
kernel/arch/ia32/include/byteorder.h
rdfa7bac r5d494b3 36 36 #define KERN_ia32_BYTEORDER_H_ 37 37 38 #include <byteorder.h>39 40 38 /* IA-32 is little-endian */ 41 #define uint16_t_le2host(n) (n) 42 #define uint32_t_le2host(n) (n) 43 #define uint64_t_le2host(n) (n) 44 45 #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) 46 #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) 47 #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) 39 #define ARCH_IS_LITTLE_ENDIAN 48 40 49 41 #endif -
kernel/arch/ia64/include/byteorder.h
rdfa7bac r5d494b3 36 36 #define KERN_ia64_BYTEORDER_H_ 37 37 38 #include <byteorder.h>39 40 38 /* IA-64 is little-endian */ 41 #define uint16_t_le2host(n) (n) 42 #define uint32_t_le2host(n) (n) 43 #define uint64_t_le2host(n) (n) 44 45 #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) 46 #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) 47 #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) 39 #define ARCH_IS_LITTLE_ENDIAN 48 40 49 41 #endif -
kernel/arch/mips32/include/byteorder.h
rdfa7bac r5d494b3 36 36 #define KERN_mips32_BYTEORDER_H_ 37 37 38 #include <byteorder.h>39 40 38 #ifdef BIG_ENDIAN 41 42 #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) 43 #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) 44 #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) 45 46 #define uint16_t_be2host(n) (n) 47 #define uint32_t_be2host(n) (n) 48 #define uint64_t_be2host(n) (n) 49 39 #define ARCH_IS_BIG_ENDIAN 50 40 #else 51 52 #define uint16_t_le2host(n) (n) 53 #define uint32_t_le2host(n) (n) 54 #define uint64_t_le2host(n) (n) 55 56 #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) 57 #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) 58 #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) 59 41 #define ARCH_IS_LITTLE_ENDIAN 60 42 #endif 61 43 -
kernel/arch/mips32/src/drivers/arc.c
rdfa7bac r5d494b3 37 37 #include <print.h> 38 38 #include <arch.h> 39 #include < arch/byteorder.h>39 #include <byteorder.h> 40 40 #include <arch/mm/frame.h> 41 41 #include <mm/frame.h> -
kernel/arch/ppc32/include/byteorder.h
rdfa7bac r5d494b3 36 36 #define KERN_ppc32_BYTEORDER_H_ 37 37 38 #include <byteorder.h> 39 40 #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) 41 #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) 42 #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) 43 44 #define uint16_t_be2host(n) (n) 45 #define uint32_t_be2host(n) (n) 46 #define uint64_t_be2host(n) (n) 38 #define ARCH_IS_BIG_ENDIAN 47 39 48 40 #endif -
kernel/arch/ppc64/include/byteorder.h
rdfa7bac r5d494b3 36 36 #define KERN_ppc64_BYTEORDER_H_ 37 37 38 #include <byteorder.h> 39 40 #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) 41 #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) 42 #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) 43 44 #define uint16_t_be2host(n) (n) 45 #define uint32_t_be2host(n) (n) 46 #define uint64_t_be2host(n) (n) 38 #define ARCH_IS_BIG_ENDIAN 47 39 48 40 #endif -
kernel/arch/sparc64/include/byteorder.h
rdfa7bac r5d494b3 36 36 #define KERN_sparc64_BYTEORDER_H_ 37 37 38 #include <byteorder.h> 39 40 #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) 41 #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) 42 #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) 43 44 #define uint16_t_be2host(n) (n) 45 #define uint32_t_be2host(n) (n) 46 #define uint64_t_be2host(n) (n) 38 #define ARCH_IS_BIG_ENDIAN 47 39 48 40 #endif -
kernel/generic/include/byteorder.h
rdfa7bac r5d494b3 36 36 #define KERN_BYTEORDER_H_ 37 37 38 #include <arch/byteorder.h> 39 40 #if !(defined(ARCH_IS_BIG_ENDIAN) ^ defined(ARCH_IS_LITTLE_ENDIAN)) 41 #error The architecture must be either big-endian or little-endian. 42 #endif 43 44 #ifdef ARCH_IS_BIG_ENDIAN 45 46 #define uint16_t_le2host(n) uint16_t_byteorder_swap(n) 47 #define uint32_t_le2host(n) uint32_t_byteorder_swap(n) 48 #define uint64_t_le2host(n) uint64_t_byteorder_swap(n) 49 50 #define uint16_t_be2host(n) (n) 51 #define uint32_t_be2host(n) (n) 52 #define uint64_t_be2host(n) (n) 53 54 #else 55 56 #define uint16_t_le2host(n) (n) 57 #define uint32_t_le2host(n) (n) 58 #define uint64_t_le2host(n) (n) 59 60 #define uint16_t_be2host(n) uint16_t_byteorder_swap(n) 61 #define uint32_t_be2host(n) uint32_t_byteorder_swap(n) 62 #define uint64_t_be2host(n) uint64_t_byteorder_swap(n) 63 64 #endif 65 38 66 static inline uint64_t uint64_t_byteorder_swap(uint64_t n) 39 67 { -
kernel/generic/src/debug/symtab.c
rdfa7bac r5d494b3 37 37 38 38 #include <symtab.h> 39 #include < arch/byteorder.h>39 #include <byteorder.h> 40 40 #include <func.h> 41 41 #include <print.h> … … 54 54 count_t i; 55 55 56 for (i =1;symbol_table[i].address_le;++i) {56 for (i = 1; symbol_table[i].address_le; ++i) { 57 57 if (addr < uint64_t_le2host(symbol_table[i].address_le)) 58 58 break; 59 59 } 60 if (addr >= uint64_t_le2host(symbol_table[i -1].address_le))61 return symbol_table[i -1].symbol_name;60 if (addr >= uint64_t_le2host(symbol_table[i - 1].address_le)) 61 return symbol_table[i - 1].symbol_name; 62 62 return NULL; 63 63 } … … 73 73 unsigned int namelen = strlen(name); 74 74 char *curname; 75 int i, j;75 int i, j; 76 76 int colonoffset = -1; 77 77 78 for (i =0;name[i];i++)78 for (i = 0; name[i]; i++) 79 79 if (name[i] == ':') { 80 80 colonoffset = i; … … 82 82 } 83 83 84 for (i =*startpos;symbol_table[i].address_le;++i) {84 for (i = *startpos; symbol_table[i].address_le; ++i) { 85 85 /* Find a ':' in name */ 86 86 curname = symbol_table[i].symbol_name; 87 for (j =0; curname[j] && curname[j] != ':'; j++)87 for (j = 0; curname[j] && curname[j] != ':'; j++) 88 88 ; 89 89 if (!curname[j]) … … 95 95 if (strncmp(curname, name, namelen) == 0) { 96 96 *startpos = i; 97 return curname +namelen;97 return curname + namelen; 98 98 } 99 99 } … … 116 116 117 117 i = 0; 118 while ((hint =symtab_search_one(name, &i))) {118 while ((hint = symtab_search_one(name, &i))) { 119 119 if (!strlen(hint)) { 120 120 addr = uint64_t_le2host(symbol_table[i].address_le); … … 152 152 int symtab_compl(char *input) 153 153 { 154 char output[MAX_SYMBOL_NAME +1];154 char output[MAX_SYMBOL_NAME + 1]; 155 155 int startpos = 0; 156 156 char *foundtxt; … … 173 173 startpos++; 174 174 if (!found) 175 strncpy(output, foundtxt, strlen(foundtxt) +1);175 strncpy(output, foundtxt, strlen(foundtxt) + 1); 176 176 else { 177 for (i=0; output[i] && foundtxt[i] && output[i]==foundtxt[i]; i++) 177 for (i = 0; output[i] && foundtxt[i] && 178 output[i] == foundtxt[i]; i++) 178 179 ; 179 180 output[i] = '\0'; -
kernel/generic/src/lib/rd.c
rdfa7bac r5d494b3 39 39 40 40 #include <lib/rd.h> 41 #include < arch/byteorder.h>41 #include <byteorder.h> 42 42 #include <mm/frame.h> 43 43 #include <sysinfo/sysinfo.h>
Note:
See TracChangeset
for help on using the changeset viewer.