[Xenomai] RTDM !xnpod_unblockable_p() question
rpm at xenomai.org
Wed Aug 13 14:55:41 CEST 2014
On 08/13/2014 02:52 PM, Philippe Gerum wrote:
> On 08/13/2014 02:28 PM, Michael Smith wrote:
>> I have been struggling with this problem for days on end, but there is just
>> not enough information in the code
>> or documentation for me to solve it.
>> I am calling rtdm_mutex_lock() inside a device driver module. It is called
>> by my PCI probe function as
>> the driver is initializing.
>> I keep on getting the error message:
>> Xenomai: assertion failed at kernel/xenomai/skins/rtdm/drvlib.c:1534
>> And the resultant -EPERM error message from the return of the function.
>> I know these checks were inserted to stop any call from an incorrect
>> context. But as far as the documentation states
>> it can be called from a kernel module.
> The doc (2.6) reads:
> * This service can be called from:
> * - Kernel-based task
> * - User-space task (RT)
> The generic "kernel module" context is not mentioned. You get -EPERM
> because you cannot call this from a probe() routine, which runs in
> secondary/pure linux mode. Acquiring a RTDM mutex requires the caller to
> run in real-time mode.
By "kernel based task", the doc always implicitly means kernel-based
_Xenomai_ task, e.g. RTDM driver task. Such one always runs in primary mode.
More information about the Xenomai