how to check RT_MUTEX_INFO.owner
In the documentation of RT_MUTEX_INFO is described :RT_TASK owner : Current mutex owner, or null if unlocked.
But this is not a pointer, so it can't be compared with NULL. Should you check RT_TASK.handle ?
Frederik
Quoted 5 lines · Frederik Bayart
In the documentation of
RT_MUTEX_INFOis described :RT_TASKowner : Current mutex owner, or null if unlocked.But this is not a pointer, so it can't be compared with NULL. Should you check RT_TASK.handle ?
You should compare the handle to NO_ALCHEMY_TASK, i.e.:
include/alchemy/task.h:#define NO_ALCHEMY_TASK ((RT_TASK){ 0, 0 })
Signature · 1 line
Philippe.