diff --git a/core/bitarithm.c b/core/bitarithm.c index 4ce7d34a2b..1a592e369b 100644 --- a/core/bitarithm.c +++ b/core/bitarithm.c @@ -30,11 +30,13 @@ unsigned bitarithm_msb(unsigned v) #if ARCH_32_BIT register unsigned shift; + /* begin{code-style-ignore} */ r = (v > 0xFFFF) << 4; v >>= r; shift = (v > 0xFF ) << 3; v >>= shift; r |= shift; shift = (v > 0xF ) << 2; v >>= shift; r |= shift; shift = (v > 0x3 ) << 1; v >>= shift; r |= shift; r |= (v >> 1); + /* end{code-style-ignore} */ #else r = 0; while (v >>= 1) { /* unroll for more speed... */ diff --git a/core/include/kernel_defines.h b/core/include/kernel_defines.h index 66d4eb7147..959736dd5d 100644 --- a/core/include/kernel_defines.h +++ b/core/include/kernel_defines.h @@ -27,6 +27,9 @@ extern "C" { #endif +/* uncrustify gets mightily confused by these macros... */ +/* begin{code-style-ignore} */ + /** * @def container_of(PTR, TYPE, MEMBER) * @brief Returns the container of a pointer to a member. @@ -216,6 +219,8 @@ * @endcond */ +/* end{code-style-ignore} */ + #ifdef __cplusplus } #endif diff --git a/core/include/mbox.h b/core/include/mbox.h index fd36800812..ffb63af1ae 100644 --- a/core/include/mbox.h +++ b/core/include/mbox.h @@ -31,7 +31,9 @@ extern "C" { #endif /** Static initializer for mbox objects */ -#define MBOX_INIT(queue, queue_size) {{0}, {0}, CIB_INIT(queue_size), queue} +#define MBOX_INIT(queue, queue_size) { \ + {0}, {0}, CIB_INIT(queue_size), queue \ + } /** * @brief Mailbox struct definition diff --git a/core/panic.c b/core/panic.c index d107d8f36c..393588a76c 100644 --- a/core/panic.c +++ b/core/panic.c @@ -41,7 +41,10 @@ const char assert_crash_message[] = "FAILED ASSERTION."; /* flag preventing "recursive crash printing loop" */ static int crashed = 0; -void __attribute__((weak)) panic_arch(void) {} +void __attribute__((weak)) panic_arch(void) +{ + return; +} /* WARNING: this function NEVER returns! */ NORETURN void core_panic(core_panic_t crash_code, const char *message) diff --git a/core/sched.c b/core/sched.c index 52a32c1dbe..2f4d09479e 100644 --- a/core/sched.c +++ b/core/sched.c @@ -85,9 +85,12 @@ int __attribute__((used)) sched_run(void) int nextrq = bitarithm_lsb(runqueue_bitcache); thread_t *next_thread = container_of(sched_runqueues[nextrq].next->next, thread_t, rq_entry); - DEBUG("sched_run: active thread: %" PRIkernel_pid ", next thread: %" PRIkernel_pid "\n", - (kernel_pid_t)((active_thread == NULL) ? KERNEL_PID_UNDEF : active_thread->pid), - next_thread->pid); + DEBUG( + "sched_run: active thread: %" PRIkernel_pid ", next thread: %" PRIkernel_pid "\n", + (kernel_pid_t)((active_thread == NULL) + ? KERNEL_PID_UNDEF + : active_thread->pid), + next_thread->pid); if (active_thread == next_thread) { DEBUG("sched_run: done, sched_active_thread was not changed.\n");