[Xenomai] 2 potential udd drivers fixes

Philippe Gerum rpm at xenomai.org
Fri May 18 09:04:53 CEST 2018

On 05/18/2018 05:34 AM, Pham, Phong wrote:
> Hi,
> Currently, a user space driver write() API does not clear the number of interrupts occurred since the last read() API.  Instead it disable interrupt unless a UDD_RTIOC_IRQEN request comes in to enable interrupt.  The fact that ioctl() does support these requests makes write(UDD_RTIOC_IRQEN/anything) a redundant and inappropriate API.  Code change is to set both event  count and context->event_count to 0.
> The second issue is the event ur->pulse needs to be cleared in udd_read_rt() because a select() on the file descriptor will return immediately as a result of a previous select() call when both select() invocation is on the same file descriptor even when the read() is sandwiched in between the select() calls while no interrupt occurs for the second select() call.
> Below are the suggested code fixes for both issues.  I am using 4.9.51 Linux kernel with patch: ipipe-core-4.9.51-powerpc-3.

Please send separate patches implementing the changes, not the whole
file. The latter is unpractical for the reviewing process.


More information about the Xenomai mailing list