Changeset 94dfb92 in mainline for kernel/generic
- Timestamp:
- 2013-05-30T13:05:10Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9e40355e, b8e72fd1
- Parents:
- c90aed4 (diff), ea15a89a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- kernel/generic
- Files:
-
- 3 edited
-
include/debug.h (modified) (1 diff)
-
include/printf/verify.h (modified) (1 diff)
-
src/main/main.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/debug.h
rc90aed4 r94dfb92 77 77 } while (0) 78 78 79 /** Static assert macro 80 * 81 */ 82 #define STATIC_ASSERT(expr) \ 83 _Static_assert(expr, "") 84 85 #define STATIC_ASSERT_VERBOSE(expr, msg) \ 86 _Static_assert(expr, msg) 87 88 79 89 #else /* CONFIG_DEBUG */ 80 90 81 91 #define ASSERT(expr) 82 92 #define ASSERT_VERBOSE(expr, msg) 93 #define STATIC_ASSERT(expr) 94 #define STATIC_ASSERT_VERBOSE(expr, msg) 83 95 84 96 #endif /* CONFIG_DEBUG */ -
kernel/generic/include/printf/verify.h
rc90aed4 r94dfb92 38 38 #ifndef NVERIFY_PRINTF 39 39 40 #ifdef __clang__ 41 #define PRINTF_ATTRIBUTE(start, end) \ 42 __attribute__((format(__printf__, start, end))) 43 #else 40 44 #define PRINTF_ATTRIBUTE(start, end) \ 41 45 __attribute__((format(gnu_printf, start, end))) 46 #endif 47 42 48 43 49 #else /* NVERIFY_PRINTF */ -
kernel/generic/src/main/main.c
rc90aed4 r94dfb92 89 89 #include <lib/ra.h> 90 90 91 /* Ensure [u]int*_t types are of correct size. 92 * 93 * Probably, this is not the best place for such tests 94 * but this file is compiled on all architectures. 95 */ 96 #define CHECK_INT_TYPE_(signness, size) \ 97 STATIC_ASSERT_VERBOSE(sizeof(signness##size##_t) * 8 == size, \ 98 #signness #size "_t does not have " #size " bits"); 99 #define CHECK_INT_TYPE(size) \ 100 CHECK_INT_TYPE_(int, size); CHECK_INT_TYPE_(uint, size) 101 102 CHECK_INT_TYPE(8); 103 CHECK_INT_TYPE(16); 104 CHECK_INT_TYPE(32); 105 CHECK_INT_TYPE(64); 106 107 108 109 91 110 /** Global configuration structure. */ 92 111 config_t config = {
Note:
See TracChangeset
for help on using the changeset viewer.
