Tracing: Incorrect Unlock Mutex Trace Hook Fix
Changed location of the last k_mutex_unlock trace hook since it was being called after k_sched_unlock, which could result in tracing scenarios (other thread waiting for lock) where it appeared that a mutex was being locked again before becoming unlocked. Signed-off-by: Torbjörn Leksell <torbjorn.leksell@percepio.com>
This commit is contained in:
parent
cb8c90e62b
commit
70d721c1bb
1 changed files with 2 additions and 2 deletions
|
@ -264,10 +264,10 @@ int z_impl_k_mutex_unlock(struct k_mutex *mutex)
|
||||||
|
|
||||||
|
|
||||||
k_mutex_unlock_return:
|
k_mutex_unlock_return:
|
||||||
k_sched_unlock();
|
|
||||||
|
|
||||||
SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_mutex, unlock, mutex, 0);
|
SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_mutex, unlock, mutex, 0);
|
||||||
|
|
||||||
|
k_sched_unlock();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue