Hello Gilles,

Thanks, but unfortunately it doesn't cure the problem.

Best regards,
Filip 

-----Original Message-----
From: Philippe Gerum [mailto:[EMAIL PROTECTED] 
Sent: 31 July 2008 12:34
To: Filip Van Rillaer
Cc: Gilles Chanteperdrix; [email protected]
Subject: Re: [Xenomai-help] xnpipe EPOLLIN starvation

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.

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to