From: Philippe Gerum <rpm@xenomai.org>
To: Filip Van Rillaer <Filip.VanRillaer@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] xnpipe EPOLLIN starvation
Date: Thu, 31 Jul 2008 12:33:33 +0200 [thread overview]
Message-ID: <489194FD.8000004@domain.hid> (raw)
In-Reply-To: <406CC9939904F143B9D42CEEA3E56E563AC08E@oab1mx1.oneaccess.intra>
Filip Van Rillaer wrote:
> Hello Gilles,
>
> EPOLLET is indeed enabled.
> The first time EPOLLIN is received in the 2nd domain, I do a read (it
> receives 1 byte in a buffer of 256). So the read is exhausted and I
> expect that the next time data arrives I should get the EPOLLIN (as it
> BECOMES readable). But even adding another read (which returns -EAGAIN)
> did not make it possible to receive the EPOLLIN when a little bit later
> data is written at the Xenomai side of the xnpipe.
>
Does this help?
--- ksrc/nucleus/pipe.c (revision 4044)
+++ ksrc/nucleus/pipe.c (working copy)
@@ -1029,9 +1029,12 @@
{
xnpipe_state_t *state = (xnpipe_state_t *)file->private_data;
unsigned r_mask = 0, w_mask = 0;
+ spl_t s;
poll_wait(file, &state->readq, pt);
+ xnlock_get_irqsave(&nklock, s);
+
if (testbits(state->status, XNPIPE_KERN_CONN))
w_mask |= (POLLOUT | POLLWRNORM);
@@ -1046,6 +1049,8 @@
*/
xnpipe_enqueue_wait(state, XNPIPE_USER_WREAD);
+ xnlock_put_irqrestore(&nklock, s);
+
/*
* A descriptor is always ready for writing with the current
* implementation, so there is no need to have/handle the
--
Philippe.
next prev parent reply other threads:[~2008-07-31 10:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 9:20 [Xenomai-help] xnpipe EPOLLIN starvation Filip Van Rillaer
2008-07-31 10:12 ` Gilles Chanteperdrix
2008-07-31 10:20 ` Filip Van Rillaer
2008-07-31 10:33 ` Philippe Gerum [this message]
2008-07-31 10:45 ` Filip Van Rillaer
[not found] ` <4891D5A3.1060004@domain.hid>
[not found] ` <406CC9939904F143B9D42CEEA3E56E563EE103@domain.hid>
[not found] ` <4891DEBC.2050400@domain.hid>
2008-08-01 10:50 ` Filip Van Rillaer
2008-08-22 20:22 ` Philippe Gerum
2008-07-31 12:14 ` Gilles Chanteperdrix
2008-07-31 13:27 ` Filip Van Rillaer
2008-07-31 14:21 ` Philippe Gerum
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=489194FD.8000004@domain.hid \
--to=rpm@xenomai.org \
--cc=Filip.VanRillaer@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.