mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
core: make some formatting uncrustify friendly (or ignore)
This commit is contained in:
parent
4a31068d15
commit
f99bc894de
@ -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... */
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user