From: Philippe Gerum <rpm@xenomai.org>
To: "Hans Søndergaard (HSO)" <HSO@VIAUC.DK>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] rt_mutex_acquire returns -3
Date: Fri, 14 Aug 2009 11:41:54 +0200 [thread overview]
Message-ID: <1250242914.3019.6.camel@domain.hid> (raw)
In-Reply-To: <0AB95BFCF14F984980DE7149C21D6B90065D58B59F@FND-MAILB03.VIA.DK>
On Fri, 2009-08-14 at 09:31 +0200, Hans Søndergaard (HSO) wrote:
> I use objects of type:
>
>
>
> typedef struct object {
>
> RT_MUTEX *rt_lock;
>
> ..
>
> } Object;
>
>
>
> int err = rt_mutex_create (ob->rt_lock, NULL);
>
> printf ("[alloc.c]: rt_mutex_create err: %d; #%d \n", err, __LINE__);
>
>
>
> err = rt_mutex_acquire (ob->rt_lock, TM_INFINITE);
>
> printf ("[lock.c]: rt_mutex_acquire, err: %d; #%d \n", err, __LINE__);
>
>
>
> On creation, rt_mutex_create returns 0 (as expected).
>
> On acquiring, rt_mutex_acquire returns -3,
>
-ESRCH. This means that for some reason, the internal handle copied by
rt_mutex_create() to ob->rt_lock could not be found back in the system
registry when calling rt_mutex_acquire().
Any chance ob->rt_lock may have been overwritten, or this mutex deleted
by another thread in the meantime?
In userland, RT_MUTEX is a structure containing an opaque long integer
value. Maybe you could check that value (printf("%ld",
ob->rt_lock.opaque)) right after rt_mutex_create() returns, and just
before rt_mutex_acquire() is invoked.
> but this return value is not included among the possible return values
> in the documentation of Mutex services.
>
>
>
> Could you please explain what this return value -3 means?
>
>
>
> Best regards
>
> Hans So
>
>
>
>
>
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
--
Philippe.
next prev parent reply other threads:[~2009-08-14 9:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-14 7:31 [Xenomai-help] rt_mutex_acquire returns -3 Hans Søndergaard (HSO)
2009-08-14 8:26 ` Gilles Chanteperdrix
[not found] ` <0AB95BFCF14F984980DE7149C21D6B90065D58B5EA@FND-MAILB03.VIA.DK>
2009-08-14 9:20 ` Gilles Chanteperdrix
2009-08-14 9:41 ` Philippe Gerum [this message]
2009-08-22 7:49 ` Hans Søndergaard (HSO)
2009-08-22 10:01 ` Gilles Chanteperdrix
2009-08-22 18:44 ` Hans Søndergaard (HSO)
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=1250242914.3019.6.camel@domain.hid \
--to=rpm@xenomai.org \
--cc=HSO@VIAUC.DK \
--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.