All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Frederik Bayart <frederik_bayart@yahoo.co.uk>,
	"xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] how to check RT_MUTEX_INFO.owner
Date: Mon, 14 Sep 2015 14:12:15 +0200	[thread overview]
Message-ID: <55F6B99F.1090707@xenomai.org> (raw)
In-Reply-To: <1252191047.2961926.1442232205723.JavaMail.yahoo@mail.yahoo.com>

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.


      reply	other threads:[~2015-09-14 12:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14 12:03 [Xenomai] how to check RT_MUTEX_INFO.owner Frederik Bayart
2015-09-14 12:12 ` Philippe Gerum [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55F6B99F.1090707@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=frederik_bayart@yahoo.co.uk \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.