Hello 
    I use linux-4.1.18 with xenomai-2.6.5 , the new version change the pipe  
only open once .I find the changes in the flowing code. But I  do not know why?


ksrc\nucleus\pipe.c  function   static int xnpipe_open(struct inode *inode, 
struct file *file)




new:
/* Enforce exclusive open for the message queues. */
if (state->status & (XNPIPE_USER_CONN | XNPIPE_USER_LCONN)) {
xnlock_put_irqrestore(&nklock, s);
return -EBUSY;
}


//__setbits(state->status, XNPIPE_USER_CONN);
__setbits(state->status, XNPIPE_USER_LCONN);
xnlock_put_irqrestore(&nklock, s);
file->private_data = state;
init_waitqueue_head(&state->readq);
init_waitqueue_head(&state->syncq);
xnlock_get_irqsave(&nklock, s);
__setbits(state->status, state->status|XNPIPE_USER_CONN);
__setbits(state->status ,state->status&~XNPIPE_USER_LCONN);


old:
    /* Enforce exclusive open for the message queues. */
if (testbits(state->status, XNPIPE_USER_CONN)) {
xnlock_put_irqrestore(&nklock, s);
return -EBUSY;
}


__setbits(state->status, XNPIPE_USER_CONN);


file->private_data = state;
init_waitqueue_head(&state->readq);
init_waitqueue_head(&state->syncq);
_______________________________________________
Xenomai mailing list
Xenomai@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai

Reply via email to