From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Steve <sbxenomai@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] mq_send takes longer than expected
Date: Wed, 15 Jul 2009 17:29:47 +0200 [thread overview]
Message-ID: <4A5DF5EB.8040509@domain.hid> (raw)
In-Reply-To: <abaf774b0907150825l289e7730h60ed03ca8db83d9a@domain.hid>
Steve wrote:
> Hi,
>
> Calling mq_send takes significantly varied amounts of time depending
> on the queue length. I was not expecting this behaviour, particularly
> as this does not happen when using RTAI mq_send calls. I can
> understand that queue creation / opening times will heavily depend on
> the queue's overall size, however I would have thought that sending a
> message (adding it to the queue's data structure (linked list?)) would
> take a constant time.
>
> Is this a bug, or expected behaviour? I have attached an example.
mq_send is expected by the posix specification to block its caller when
the queue is full. If you do not want this behaviour, you should pass
O_NONBLOCK to mq_open and be prepared for mq_send to return -1 with
errno set to EAGAIN/EWOULDBLOCK.
Would this be your problem ?
--
Gilles
next prev parent reply other threads:[~2009-07-15 15:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-15 15:25 [Xenomai-help] mq_send takes longer than expected Steve
2009-07-15 15:29 ` Gilles Chanteperdrix [this message]
2009-07-15 16:20 ` Gilles Chanteperdrix
2009-07-15 16:31 ` Gilles Chanteperdrix
2009-07-17 11:07 ` Steve
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=4A5DF5EB.8040509@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=sbxenomai@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.