Johan Borkhuis wrote:
> Hello,
> 
> I am trying to use semaphores inside my driver. It is a driver that can 
> be used as standard Linux driver and RTDM driver.
> 
> However, when I use rt_sem_p or rtdm_sem_timeddown in my read_nrt 

Calling those blocking RT services over a non-RT RTDM handler is a
strong indication that you are doing something fundamentally wrong.

(BTW, for consistency reasons, you shouldn't use native API services in
RTDM drivers. Technically, this can be OK, but it is at least very unclean.)

> function I get a -1 return value, indicating EPERM. When I look at the 
> thread state I see a value of 0x00400080, which indicates a standard 
> Linux thread. The rtdm-context is 0x00000001.
> The userspace thread has a thread state of 00300380.
> 
> What am I doing wrong here? How can I get a semaphore or other sync 
> mechanism to work inside my RTDM driver?

RT resources are for RT threads in _primary_ mode. Why do you want to
pend on those resources while the threads are in secondary ("nrt") more?

> 
> We are using Xenomai 2.4.1 on Linux 2.6.20 for powerpc.
> 
> Kind regards,
>     Johan Borkhuis
> 

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to