kernel: fix obsolete access to fields in K_DEBUG() calls

When moving arch-specific thread structure to arch-agnostic, some field
accesses were missed when used in K_DEBUG statements, which are turned
off by default.

Change-Id: Ife0f49b8185a0db468deab73555f7034f20ca3e8
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
Benjamin Walsh 2016-11-18 16:08:24 -05:00 committed by Anas Nashif
commit a4e033fdba
3 changed files with 5 additions and 5 deletions

View file

@ -204,7 +204,7 @@ static inline void _sched_lock(void)
atomic_inc(&_current->base.sched_locked);
K_DEBUG("scheduler locked (%p:%d)\n",
_current, _current->sched_locked);
_current, _current->base.sched_locked);
}
/**

View file

@ -121,7 +121,7 @@ static void adjust_owner_prio(struct k_mutex *mutex, int new_prio)
K_DEBUG("%p (ready (y/n): %c) prio changed to %d (was %d)\n",
mutex->owner, _is_thread_ready(mutex->owner) ?
'y' : 'n',
new_prio, mutex->owner->prio);
new_prio, mutex->owner->base.prio);
_thread_priority_set(mutex->owner, new_prio);
}
@ -238,7 +238,7 @@ void k_mutex_unlock(struct k_mutex *mutex)
struct k_thread *new_owner = _unpend_first_thread(&mutex->wait_q);
K_DEBUG("new owner of mutex %p: %p (prio: %d)\n",
mutex, new_owner, new_owner ? new_owner->prio : -1000);
mutex, new_owner, new_owner ? new_owner->base.prio : -1000);
if (new_owner) {
_abort_thread_timeout(new_owner);

View file

@ -123,7 +123,7 @@ void k_sched_unlock(void)
atomic_dec(&_current->base.sched_locked);
K_DEBUG("scheduler unlocked (%p:%d)\n",
_current, _current->sched_locked);
_current, _current->base.sched_locked);
_reschedule_threads(key);
}
@ -220,7 +220,7 @@ struct k_thread *_get_next_ready_thread(void)
int __must_switch_threads(void)
{
K_DEBUG("current prio: %d, highest prio: %d\n",
_current->prio, _get_highest_ready_prio());
_current->base.prio, _get_highest_ready_prio());
extern void _dump_ready_q(void);
_dump_ready_q();