* [Xenomai] how to check RT_MUTEX_INFO.owner
@ 2015-09-14 12:03 Frederik Bayart
2015-09-14 12:12 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: Frederik Bayart @ 2015-09-14 12:03 UTC (permalink / raw)
To: xenomai@xenomai.org
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Xenomai] how to check RT_MUTEX_INFO.owner
2015-09-14 12:03 [Xenomai] how to check RT_MUTEX_INFO.owner Frederik Bayart
@ 2015-09-14 12:12 ` Philippe Gerum
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2015-09-14 12:12 UTC (permalink / raw)
To: Frederik Bayart, xenomai@xenomai.org
On 09/14/2015 02:03 PM, Frederik Bayart wrote:
> 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 ?
>
You should compare the handle to NO_ALCHEMY_TASK, i.e.:
include/alchemy/task.h:#define NO_ALCHEMY_TASK ((RT_TASK){ 0, 0 })
--
Philippe.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-14 12:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14 12:03 [Xenomai] how to check RT_MUTEX_INFO.owner Frederik Bayart
2015-09-14 12:12 ` Philippe Gerum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.