All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: juanba romance <juanba.romance@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Posix skin and message queues operation mode	misunderstanding
Date: Sat, 08 Mar 2008 12:44:10 +0100	[thread overview]
Message-ID: <47D27C0A.2010507@domain.hid> (raw)
In-Reply-To: <e39c9190803080255s7020537co8ea96ab71ed6ecc2@domain.hid>

juanba romance wrote:
> Hello all i am trying to use a POSIX message queue object to interface a
> couple of application modules and  i am fully confused.
> 
> The execution environment is configured with a fully operational 
> xenomai-2.4.2 /linux 2.6.24-2 framework
> 
> First at all a test program is written/assembled using the librt stuff
> without any xenomai component in order to check the "standard POSIX"
> behavior
> The program works in two modes via input switches
> the "r" mode creates a POSIX queue and attach a notifier through the
> method SIGEV_THREAD, the main sleeps a while before close the created object
> for each callback the notifier empties the queue dumping the values and
> register again the callback symbol up to main flow is timed out .
> the "w" mode tries to push a pattern data set into the created queue in
> burst mode
> So one pid empties the queue and the other apply data. The linux domain
> version using the librt works at expected.
> 
> The weird thing is when we compile the stuff using the xeno-config
> switches so we build xenomai domain message queues..
> Such stuff doesn't provide any feedback to the notifier symbol of the
> reader PID ??
> The writer PID however doesn't provide any error relative to queue
> open/send system calls
> 
> It seems that i am misunderstanding something really basic when these
> objects are applied on the Xenomai domain.
> 
> Could somebody provide me any hint ?

your mq_notify() call actually fails, because SIGEV_THREAD is not currently
supported. SIGEV_SIGNAL is. A bug in the interface library prevents you from
getting the right call status.

--- src/skins/posix/mq.c	(revision 3549)
+++ src/skins/posix/mq.c	(working copy)
@@ -191,6 +191,14 @@

 int __wrap_mq_notify(mqd_t mqdes, const struct sigevent *notification)
 {
-	return -XENOMAI_SKINCALL2(__pse51_muxid,
-				  __pse51_mq_notify, mqdes, notification);
+	int err;
+
+	err = XENOMAI_SKINCALL2(__pse51_muxid,
+				__pse51_mq_notify, mqdes, notification);
+	if (err) {
+		errno = -err;
+		return -1;
+	}
+
+	return 0;
 }

-- 
Philippe.


  reply	other threads:[~2008-03-08 11:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-08 10:55 [Xenomai-help] Posix skin and message queues operation mode misunderstanding juanba romance
2008-03-08 11:44 ` Philippe Gerum [this message]
2008-03-08 14:24   ` juanba romance
     [not found]     ` <e39c9190803080942k302e66a6m75ed94dccd55aaac@domain.hid>
     [not found]       ` <47D2D537.7020106@domain.hid>
2008-03-08 18:26         ` juanba romance
2008-03-08 20:35           ` Gilles Chanteperdrix
2008-03-08 20:55             ` juanba romance
2008-03-08 21:45               ` Gilles Chanteperdrix

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=47D27C0A.2010507@domain.hid \
    --to=rpm@xenomai.org \
    --cc=juanba.romance@domain.hid \
    --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.