kernel: Convert formatter strings to use PRI defines

To allow for various libc implementations (like newlib) in which the way
various {u}int{8,16,32}_t types are defined vary between both libc
implementations and across architectures we need to utilize the PRI
defines.

Change-Id: Ie884fb67015502288152ecbd64c37961a4f538e4
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
Kumar Gala 2017-04-17 10:26:47 -05:00
commit 7b9dc107a8
6 changed files with 23 additions and 20 deletions

View file

@ -241,7 +241,7 @@ static inline void _sched_lock(void)
compiler_barrier();
K_DEBUG("scheduler locked (%p:%d)\n",
K_DEBUG("scheduler locked (%p:%" PRIu8 ")\n",
_current, _current->base.sched_locked);
#endif
}
@ -391,13 +391,15 @@ static inline void _ready_thread(struct k_thread *thread)
__ASSERT(_is_prio_higher(thread->base.prio, K_LOWEST_THREAD_PRIO) ||
((thread->base.prio == K_LOWEST_THREAD_PRIO) &&
(thread == _idle_thread)),
"thread %p prio too low (is %d, cannot be lower than %d)",
"thread %p prio too low (is %" PRId8 ", "
"cannot be lower than %d)",
thread, thread->base.prio,
thread == _idle_thread ? K_LOWEST_THREAD_PRIO :
K_LOWEST_APPLICATION_THREAD_PRIO);
__ASSERT(!_is_prio_higher(thread->base.prio, K_HIGHEST_THREAD_PRIO),
"thread %p prio too high (id %d, cannot be higher than %d)",
"thread %p prio too high (id %" PRId8 ", "
"cannot be higher than %d)",
thread, thread->base.prio, K_HIGHEST_THREAD_PRIO);
/* needed to handle the start-with-delay case */