All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] rtcansend.c problem if using together with -lpthread_rt
@ 2007-03-12 13:46 Daniel Schnell
  2007-03-12 13:54 ` Gilles Chanteperdrix
  2007-03-14 11:58 ` [Xenomai-help] rtcansend.c problem if using together with-lpthread_rt Daniel Schnell
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Schnell @ 2007-03-12 13:46 UTC (permalink / raw)
  To: xenomai

Hi,

Hunting down a RTCAN related bug in my application I ended up compiling
the rtcansend.c function with our make environment.

Basicly the compilation is done like this:

ppc_6xx-gcc -W -Wall -O2 -D_GNU_SOURCE -D_REENTRANT -D__XENO__
-I/usr/xenomai/include -c -o rtcansend.o rtcansend.c

Linking:

ppc_6xx-gcc  -o rtcansend rtcansend.o -L/usr/xenomai/lib -lpthread_rt
-lnative -lrtdm -lpthread -lrt

If run, the following happens:
bash-2.05b# ./rtcansend rtcan0 -v -i0 01
interface rtcan0
s=0, ifr_name=rtcan0
rt_task_shadow: Device or resource busy
Cleaning up...

If I leave away -lpthread_rt in the linking step, output is normal:

bash-2.05b# test/rtcansend rtcan0 -v -i0 01
interface rtcan0
s=0, ifr_name=rtcan0
<0x000> [1] 01
Cleaning up...

I am using svn version 2256.
Am I doing here something fundamentally wrong in providing -lpthread_rt
as an additional library ? Shouldn't the native skin and the POSIX skin
just work together ?


Best regards,

Daniel Schnell.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai-help] rtcansend.c problem if using together with -lpthread_rt
  2007-03-12 13:46 [Xenomai-help] rtcansend.c problem if using together with -lpthread_rt Daniel Schnell
@ 2007-03-12 13:54 ` Gilles Chanteperdrix
  2007-03-14 11:58 ` [Xenomai-help] rtcansend.c problem if using together with-lpthread_rt Daniel Schnell
  1 sibling, 0 replies; 6+ messages in thread
From: Gilles Chanteperdrix @ 2007-03-12 13:54 UTC (permalink / raw)
  To: Daniel Schnell; +Cc: xenomai

Daniel Schnell wrote:
> I am using svn version 2256.
> Am I doing here something fundamentally wrong in providing -lpthread_rt
> as an additional library ? Shouldn't the native skin and the POSIX skin
> just work together ?

The two libraries work together, but the POSIX skin automatically
shadows the main thread. So, if you are trying to shadow it with the
native library, you get the -EBUSY error, that is normal: you can not
shadow the same thread twice. If you want to link rtcansend with the
posix skin, simply remove the shadowing of the main thread with
rt_task_shadow.

-- 
                                                 Gilles Chanteperdrix


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [Xenomai-help] rtcansend.c problem if using together with-lpthread_rt
  2007-03-12 13:46 [Xenomai-help] rtcansend.c problem if using together with -lpthread_rt Daniel Schnell
  2007-03-12 13:54 ` Gilles Chanteperdrix
@ 2007-03-14 11:58 ` Daniel Schnell
  2007-03-14 12:55   ` Wolfgang Grandegger
  1 sibling, 1 reply; 6+ messages in thread
From: Daniel Schnell @ 2007-03-14 11:58 UTC (permalink / raw)
  To: Daniel Schnell, xenomai

Hi,

Sorry to repost this issue, which I posted some days ago, but there was
no reaction so far.
It should be easy to reproduce. I need just a short answer from somebody
with a RT-CAN driver.


Thanks in advance,

Best regards,

Daniel Schnell.


Daniel Schnell wrote:
> Hi,
> 
> Hunting down a RTCAN related bug in my application I ended up
> compiling the rtcansend.c function with our make environment. 
> 
> Basicly the compilation is done like this:
> 
> ppc_6xx-gcc -W -Wall -O2 -D_GNU_SOURCE -D_REENTRANT -D__XENO__
> -I/usr/xenomai/include -c -o rtcansend.o rtcansend.c 
> 
> Linking:
> 
> ppc_6xx-gcc  -o rtcansend rtcansend.o -L/usr/xenomai/lib -lpthread_rt
> -lnative -lrtdm -lpthread -lrt 
> 
> If run, the following happens:
> bash-2.05b# ./rtcansend rtcan0 -v -i0 01 interface rtcan0 s=0,
> ifr_name=rtcan0 
> rt_task_shadow: Device or resource busy
> Cleaning up...
> 
> If I leave away -lpthread_rt in the linking step, output is normal:
> 
> bash-2.05b# test/rtcansend rtcan0 -v -i0 01 interface rtcan0 s=0,
> ifr_name=rtcan0 <0x000> [1] 01 Cleaning up... 
> 
> I am using svn version 2256.
> Am I doing here something fundamentally wrong in providing
> -lpthread_rt as an additional library ? Shouldn't the native skin and
> the POSIX skin just work together ?  
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Xenomai-help] rtcansend.c problem if using together with-lpthread_rt
  2007-03-14 11:58 ` [Xenomai-help] rtcansend.c problem if using together with-lpthread_rt Daniel Schnell
@ 2007-03-14 12:55   ` Wolfgang Grandegger
  2007-03-14 13:29     ` Daniel Schnell
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Grandegger @ 2007-03-14 12:55 UTC (permalink / raw)
  To: Daniel Schnell; +Cc: xenomai

Daniel Schnell wrote:
> Hi,
> 
> Sorry to repost this issue, which I posted some days ago, but there was
> no reaction so far.
> It should be easy to reproduce. I need just a short answer from somebody
> with a RT-CAN driver.

Hm, Gilles already answered 
https://mail.gna.org/public/xenomai-help/2007-03/msg00198.html.

> 
> Thanks in advance,
> 
> Best regards,
> 
> Daniel Schnell.
> 
> 
> Daniel Schnell wrote:
>> Hi,
>>
>> Hunting down a RTCAN related bug in my application I ended up
>> compiling the rtcansend.c function with our make environment. 
>>
>> Basicly the compilation is done like this:
>>
>> ppc_6xx-gcc -W -Wall -O2 -D_GNU_SOURCE -D_REENTRANT -D__XENO__
>> -I/usr/xenomai/include -c -o rtcansend.o rtcansend.c 
>>
>> Linking:
>>
>> ppc_6xx-gcc  -o rtcansend rtcansend.o -L/usr/xenomai/lib -lpthread_rt
>> -lnative -lrtdm -lpthread -lrt 
>>
>> If run, the following happens:
>> bash-2.05b# ./rtcansend rtcan0 -v -i0 01 interface rtcan0 s=0,
>> ifr_name=rtcan0 
>> rt_task_shadow: Device or resource busy
>> Cleaning up...
>>
>> If I leave away -lpthread_rt in the linking step, output is normal:
>>
>> bash-2.05b# test/rtcansend rtcan0 -v -i0 01 interface rtcan0 s=0,
>> ifr_name=rtcan0 <0x000> [1] 01 Cleaning up... 
>>
>> I am using svn version 2256.
>> Am I doing here something fundamentally wrong in providing
>> -lpthread_rt as an additional library ? Shouldn't the native skin and
>> the POSIX skin just work together ?  
>>
>>
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
> 
> 



^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [Xenomai-help] rtcansend.c problem if using together with-lpthread_rt
  2007-03-14 12:55   ` Wolfgang Grandegger
@ 2007-03-14 13:29     ` Daniel Schnell
  2007-03-14 20:00       ` Gilles Chanteperdrix
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Schnell @ 2007-03-14 13:29 UTC (permalink / raw)
  To: Wolfgang Grandegger; +Cc: xenomai

Wolfgang Grandegger wrote:
 
> Hm, Gilles already answered
> https://mail.gna.org/public/xenomai-help/2007-03/msg00198.html.
> 

Oh, yes !? Something with my Outlook-rules apparently went wrong grrr...
*$@&% !!


Best regards,

Daniel Schnell.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: [Xenomai-help] rtcansend.c problem if using together with-lpthread_rt
  2007-03-14 13:29     ` Daniel Schnell
@ 2007-03-14 20:00       ` Gilles Chanteperdrix
  0 siblings, 0 replies; 6+ messages in thread
From: Gilles Chanteperdrix @ 2007-03-14 20:00 UTC (permalink / raw)
  To: Daniel Schnell; +Cc: xenomai

Daniel Schnell wrote:
 > Wolfgang Grandegger wrote:
 >  
 > > Hm, Gilles already answered
 > > https://mail.gna.org/public/xenomai-help/2007-03/msg00198.html.
 > > 
 > 
 > Oh, yes !? Something with my Outlook-rules apparently went wrong grrr...
 > *$@&% !!

No, actually, the problem comes from my mail server, I received a
"delivery failed" message, this afternoon, about 2 days after I answered
your mail.

-- 


					    Gilles Chanteperdrix.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-03-14 20:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-12 13:46 [Xenomai-help] rtcansend.c problem if using together with -lpthread_rt Daniel Schnell
2007-03-12 13:54 ` Gilles Chanteperdrix
2007-03-14 11:58 ` [Xenomai-help] rtcansend.c problem if using together with-lpthread_rt Daniel Schnell
2007-03-14 12:55   ` Wolfgang Grandegger
2007-03-14 13:29     ` Daniel Schnell
2007-03-14 20:00       ` Gilles Chanteperdrix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.