matrix_df hotmail wrote:
> Hello
> 
>> Both lines above are essential. The first one makes sure your
>> application's memory will remain physically present and not swapped away
>> e.g. The second one turns the main thread of this program into a Xenomai
>> thread, and this is required to block on an event out of the real-time
>> domain like the arrival of a TDMA SYNC frame.
>>
>> But if you have a demo code that doesn't work while the above example
>> does, please post it.
> 
> 
> This mean, when I want to use WAITONCYCLE in xmit_msg(void *arg)  of
> frag-ip.c I need to add
> 
> mlockall(MCL_CURRENT | MCL_FUTURE) in main()
> 

Yep (Xenomai will complain otherwise anyway).

> and
> 
> rt_task_shadow(&task, "waitonsync", 1, 0) in xmit_msg(void *arg)
> 

That depends. This function enables Xenomai support for a Linux thread
*after* it has been created (like main...). But when you use
rt_task_create/start or rt_task_spawn, both creation and Xenomai-mapping
are combined. See also the Xenomai API documentation for details or, if
something remains unclear, ask on xenomai-help.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
RTnet-users mailing list
RTnet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rtnet-users

Reply via email to