Am 20.11.2013 um 07:58 schrieb Gilles Chanteperdrix 
<[email protected]>:

> On 11/20/2013 03:33 PM, Michael Haberler wrote:
>> I'm looking for a simple method to post an event from an RT thread so
>> a userland non-RT thread can wait for, and pick it up via a file
>> descriptor (without switching the originating thread to primary
>> domain, of course)
>> 
>> event context can be minimal since the userland handler can figure;
>> actual data transfer not required - event number or mask a plus
>> 
>> purpose would be integration into existing event loops; only
>> RT->userland signalling needed
>> 
>> if it's possible from a kernel RT context, it's a plus
>> 
>> ---
>> 
>> one scheme I thought of was: using rt_event services, monitor the
>> event flag in a userland shadow thread and post to an eventfd whose
>> other side could be integrated into an event loop. Making sense?
>> 
>> thanks in advance,
>> 
>> Michael
>> 
>> ps: this needs to be portable across RT kernel variants; my approach
>> for RTAI would be to use rt_request_srq() and post to an eventfd from
>> the Linux context
> 
> You may use XDDP IPC for that, see:
> http://www.xenomai.org/documentation/xenomai-2.6/html/api/xddp-echo_8c-example.html

in the RT thread, I'd need to do a non-blocking read of the XDDP socket or test 
in some way if a message is present (man 2 recvfrom indicates by default it 
blocks until data available)

what would be the right/fastest way to do this - do the recvfrom() with the 
MSG_DONTWAIT option?

- Michael


_______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai

Reply via email to