fixed printf patterns

This commit is contained in:
Christian Mehlis 2013-07-16 15:25:23 +02:00
parent c5e62e238b
commit b8176f4488
3 changed files with 12 additions and 12 deletions

View File

@ -99,7 +99,7 @@ void mutex_unlock(struct mutex_t *mutex, int yield)
if (mutex->queue.next) { if (mutex->queue.next) {
queue_node_t *next = queue_remove_head(&(mutex->queue)); queue_node_t *next = queue_remove_head(&(mutex->queue));
tcb_t *process = (tcb_t*) next->data; tcb_t *process = (tcb_t*) next->data;
DEBUG("%s: waking up waiter %s.\n", process->name); DEBUG("%s: waking up waiter.\n", process->name);
sched_set_status(process, STATUS_PENDING); sched_set_status(process, STATUS_PENDING);
sched_switch(active_thread->priority, process->priority, inISR()); sched_switch(active_thread->priority, process->priority, inISR());

View File

@ -188,7 +188,7 @@ void hwtimer_arch_set(unsigned long offset, short timer)
if (offset < HWTIMERMINOFFSET) { if (offset < HWTIMERMINOFFSET) {
offset = HWTIMERMINOFFSET; offset = HWTIMERMINOFFSET;
DEBUG("hwtimer_arch_set: offset < MIN, set to: %i\n", offset); DEBUG("hwtimer_arch_set: offset < MIN, set to: %lu\n", offset);
} }
native_hwtimer_irq[timer] = 1; native_hwtimer_irq[timer] = 1;

View File

@ -73,7 +73,7 @@ static int update_shortterm(void)
hwtimer_id = hwtimer_set_absolute(HWTIMER_TICKS(next), vtimer_callback, NULL); hwtimer_id = hwtimer_set_absolute(HWTIMER_TICKS(next), vtimer_callback, NULL);
DEBUG("update_shortterm: Set hwtimer to %lu (now=%lu)\n", next, HWTIMER_TICKS_TO_US(hwtimer_now())); DEBUG("update_shortterm: Set hwtimer to %" PRIu32 " (now=%lu)\n", next, HWTIMER_TICKS_TO_US(hwtimer_now()));
return 0; return 0;
} }
@ -103,7 +103,7 @@ void vtimer_tick(void *ptr)
static int set_shortterm(vtimer_t *timer) static int set_shortterm(vtimer_t *timer)
{ {
DEBUG("set_shortterm(): Absolute: %lu %lu\n", timer->absolute.seconds, timer->absolute.microseconds); DEBUG("set_shortterm(): Absolute: %" PRIu32 " %" PRIu32 "\n", timer->absolute.seconds, timer->absolute.microseconds);
timer->queue_entry.priority = timer->absolute.microseconds; timer->queue_entry.priority = timer->absolute.microseconds;
queue_priority_add(&shortterm_queue_root, (queue_node_t *)timer); queue_priority_add(&shortterm_queue_root, (queue_node_t *)timer);
return 1; return 1;
@ -120,7 +120,7 @@ void vtimer_callback(void *ptr)
#ifdef ENABLE_DEBUG #ifdef ENABLE_DEBUG
vtimer_print(timer); vtimer_print(timer);
#endif #endif
DEBUG("vtimer_callback(): Shooting %lu.\n", timer->absolute.microseconds); DEBUG("vtimer_callback(): Shooting %" PRIu32 ".\n", timer->absolute.microseconds);
/* shoot timer */ /* shoot timer */
if (timer->action == (void *) msg_send_int) { if (timer->action == (void *) msg_send_int) {
@ -142,11 +142,11 @@ void vtimer_callback(void *ptr)
void normalize_to_tick(timex_t *time) void normalize_to_tick(timex_t *time)
{ {
DEBUG("Normalizing: %lu %lu\n", time->seconds, time->microseconds); DEBUG("Normalizing: %" PRIu32 " %" PRIu32 "\n", time->seconds, time->microseconds);
uint32_t seconds_tmp = time->seconds % SECONDS_PER_TICK; uint32_t seconds_tmp = time->seconds % SECONDS_PER_TICK;
time->seconds -= seconds_tmp; time->seconds -= seconds_tmp;
uint32_t usecs_tmp = time->microseconds + (seconds_tmp * 1000000); uint32_t usecs_tmp = time->microseconds + (seconds_tmp * 1000000);
DEBUG("Normalizin2: %lu %lu\n", time->seconds, usecs_tmp); DEBUG("Normalizin2: %" PRIu32 " %" PRIu32 "\n", time->seconds, usecs_tmp);
if (usecs_tmp < time->microseconds) { if (usecs_tmp < time->microseconds) {
usecs_tmp -= MICROSECONDS_PER_TICK; usecs_tmp -= MICROSECONDS_PER_TICK;
@ -159,20 +159,20 @@ void normalize_to_tick(timex_t *time)
} }
time->microseconds = usecs_tmp; time->microseconds = usecs_tmp;
DEBUG(" Result: %lu %lu\n", time->seconds, time->microseconds); DEBUG(" Result: %" PRIu32 " %" PRIu32 "\n", time->seconds, time->microseconds);
} }
static int vtimer_set(vtimer_t *timer) static int vtimer_set(vtimer_t *timer)
{ {
DEBUG("vtimer_set(): New timer. Offset: %lu %lu\n", timer->absolute.seconds, timer->absolute.microseconds); DEBUG("vtimer_set(): New timer. Offset: %" PRIu32 " %" PRIu32 "\n", timer->absolute.seconds, timer->absolute.microseconds);
timex_t now; timex_t now;
vtimer_now(&now); vtimer_now(&now);
timer->absolute = timex_add(now, timer->absolute); timer->absolute = timex_add(now, timer->absolute);
normalize_to_tick(&(timer->absolute)); normalize_to_tick(&(timer->absolute));
DEBUG("vtimer_set(): Absolute: %lu %lu\n", timer->absolute.seconds, timer->absolute.microseconds); DEBUG("vtimer_set(): Absolute: %" PRIu32 " %" PRIu32 "\n", timer->absolute.seconds, timer->absolute.microseconds);
DEBUG("vtimer_set(): NOW: %lu %lu\n", now.seconds, now.microseconds); DEBUG("vtimer_set(): NOW: %" PRIu32 " %" PRIu32 "\n", now.seconds, now.microseconds);
int result = 0; int result = 0;
@ -229,7 +229,7 @@ int vtimer_init()
longterm_tick_timer.absolute.seconds = 0; longterm_tick_timer.absolute.seconds = 0;
longterm_tick_timer.absolute.microseconds = MICROSECONDS_PER_TICK; longterm_tick_timer.absolute.microseconds = MICROSECONDS_PER_TICK;
DEBUG("vtimer_init(): Setting longterm tick to %lu\n", longterm_tick_timer.absolute.microseconds); DEBUG("vtimer_init(): Setting longterm tick to %" PRIu32 "\n", longterm_tick_timer.absolute.microseconds);
set_shortterm(&longterm_tick_timer); set_shortterm(&longterm_tick_timer);
update_shortterm(); update_shortterm();