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
|
#if ARCH_32_BIT
|
||||||
register unsigned shift;
|
register unsigned shift;
|
||||||
|
|
||||||
|
/* begin{code-style-ignore} */
|
||||||
r = (v > 0xFFFF) << 4; v >>= r;
|
r = (v > 0xFFFF) << 4; v >>= r;
|
||||||
shift = (v > 0xFF ) << 3; v >>= shift; r |= shift;
|
shift = (v > 0xFF ) << 3; v >>= shift; r |= shift;
|
||||||
shift = (v > 0xF ) << 2; v >>= shift; r |= shift;
|
shift = (v > 0xF ) << 2; v >>= shift; r |= shift;
|
||||||
shift = (v > 0x3 ) << 1; v >>= shift; r |= shift;
|
shift = (v > 0x3 ) << 1; v >>= shift; r |= shift;
|
||||||
r |= (v >> 1);
|
r |= (v >> 1);
|
||||||
|
/* end{code-style-ignore} */
|
||||||
#else
|
#else
|
||||||
r = 0;
|
r = 0;
|
||||||
while (v >>= 1) { /* unroll for more speed... */
|
while (v >>= 1) { /* unroll for more speed... */
|
||||||
|
|||||||
@ -27,6 +27,9 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* uncrustify gets mightily confused by these macros... */
|
||||||
|
/* begin{code-style-ignore} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def container_of(PTR, TYPE, MEMBER)
|
* @def container_of(PTR, TYPE, MEMBER)
|
||||||
* @brief Returns the container of a pointer to a member.
|
* @brief Returns the container of a pointer to a member.
|
||||||
@ -216,6 +219,8 @@
|
|||||||
* @endcond
|
* @endcond
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* end{code-style-ignore} */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -31,7 +31,9 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** Static initializer for mbox objects */
|
/** 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
|
* @brief Mailbox struct definition
|
||||||
|
|||||||
@ -41,7 +41,10 @@ const char assert_crash_message[] = "FAILED ASSERTION.";
|
|||||||
/* flag preventing "recursive crash printing loop" */
|
/* flag preventing "recursive crash printing loop" */
|
||||||
static int crashed = 0;
|
static int crashed = 0;
|
||||||
|
|
||||||
void __attribute__((weak)) panic_arch(void) {}
|
void __attribute__((weak)) panic_arch(void)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* WARNING: this function NEVER returns! */
|
/* WARNING: this function NEVER returns! */
|
||||||
NORETURN void core_panic(core_panic_t crash_code, const char *message)
|
NORETURN void core_panic(core_panic_t crash_code, const char *message)
|
||||||
|
|||||||
@ -85,8 +85,11 @@ int __attribute__((used)) sched_run(void)
|
|||||||
int nextrq = bitarithm_lsb(runqueue_bitcache);
|
int nextrq = bitarithm_lsb(runqueue_bitcache);
|
||||||
thread_t *next_thread = container_of(sched_runqueues[nextrq].next->next, thread_t, rq_entry);
|
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",
|
DEBUG(
|
||||||
(kernel_pid_t)((active_thread == NULL) ? KERNEL_PID_UNDEF : active_thread->pid),
|
"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);
|
next_thread->pid);
|
||||||
|
|
||||||
if (active_thread == next_thread) {
|
if (active_thread == next_thread) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user