Jeff Weber wrote: > I have a need for task t1 to switch task t2 to and from primary mode, > using the native API. The rt_task_set_mode() API does not have an > argument for the target task, and assumes the current task. How can I > initiate a 3rd party task mode switch? Umm, could you explain why you need this? Sounds a bit weird to me. We basically have this feature to support RTDM drivers that provide mode-dependent (overloaded) services like resource allocation from Linux vs. real-time pools. Normally, you should not need to touch the mode explicitly, Xenomai will switch for you when required and feasible. > > On a related note, the task info returned from rt_task_inquire() does > not indicate task mode switches in the corresponding T_PRIMARY (0x200) > bit, which is the bit used to command the mode switch. However, a mode > switch can be seen in the 0x100 status bit, which corresponds to the > XNRELAX bit, (not in the public native/task.h API). What's the best way > to inquire if an arbitrary task is in primary or secondary mode? I would say there is no official way yet, but I think we should create one, likely by translating XNRELAX to the native-specific T_PRIMARY flag. Should be trivial. > > I am using Xenomai-2.2.0. > > thanks, > Jeff Weber > Jan