* [Xenomai-help] special glibc support for Xenomai?
@ 2007-01-17 11:16 Steven Scholz
2007-01-17 11:33 ` Philippe Gerum
0 siblings, 1 reply; 9+ messages in thread
From: Steven Scholz @ 2007-01-17 11:16 UTC (permalink / raw)
To: xenomai
Hi all,
I wonder if I would need a special glibc support in order to build and run
xenomai applications.
Especially I think about high resolution timer support and NTPL thread
library (which would be need if I'd do plain
http://people.redhat.com/mingo/realtime-preempt right).
Thanks a million!
Steven
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] special glibc support for Xenomai?
2007-01-17 11:16 [Xenomai-help] special glibc support for Xenomai? Steven Scholz
@ 2007-01-17 11:33 ` Philippe Gerum
2007-01-17 11:46 ` Steven Scholz
0 siblings, 1 reply; 9+ messages in thread
From: Philippe Gerum @ 2007-01-17 11:33 UTC (permalink / raw)
To: Steven Scholz; +Cc: xenomai
On Wed, 2007-01-17 at 12:16 +0100, Steven Scholz wrote:
> Hi all,
>
> I wonder if I would need a special glibc support in order to build and run
> xenomai applications.
>
In short, no. You could use the oldish linuxthreads, or the NPTL as you
see fit, from any glibc version. Hi-res timing is provided by the
Xenomai nucleus directly, and it is implicitely made available by the
Xenomai APIs to the bound applications.
In the particular POSIX case, calling e.g. nanosleep() over a Xenomai
thread context already gives you a microsecond-level precision for
timings. You just need to make sure to compile/link with the hardened
Xenomai POSIX library, try running:
$ xeno-config --posix-cflags|--posix-ldflags.
> Especially I think about high resolution timer support and NTPL thread
> library (which would be need if I'd do plain
> http://people.redhat.com/mingo/realtime-preempt right).
>
> Thanks a million!
>
> Steven
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
--
Philippe.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] special glibc support for Xenomai?
2007-01-17 11:33 ` Philippe Gerum
@ 2007-01-17 11:46 ` Steven Scholz
2007-01-17 12:14 ` Philippe Gerum
0 siblings, 1 reply; 9+ messages in thread
From: Steven Scholz @ 2007-01-17 11:46 UTC (permalink / raw)
To: rpm; +Cc: xenomai
Philippe,
>> I wonder if I would need a special glibc support in order to build and run
>> xenomai applications.
>
> In short, no. You could use the oldish linuxthreads, or the NPTL as you
> see fit, from any glibc version...
Thanks.
> ... Hi-res timing is provided by the
> Xenomai nucleus directly, and it is implicitely made available by the
> Xenomai APIs to the bound applications.
But that would need some low level support for my special platform? Cause
hrtimers are platform specific. Right?
> In the particular POSIX case, calling e.g. nanosleep() over a Xenomai
> thread context already gives you a microsecond-level precision for
> timings.
Ok.
> You just need to make sure to compile/link with the hardened
> Xenomai POSIX library, try running:
> $ xeno-config --posix-cflags|--posix-ldflags.
What does it do?
Can I use it for cross-compiling as well?
Steven
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] special glibc support for Xenomai?
2007-01-17 11:46 ` Steven Scholz
@ 2007-01-17 12:14 ` Philippe Gerum
2007-01-17 13:03 ` Steven Scholz
0 siblings, 1 reply; 9+ messages in thread
From: Philippe Gerum @ 2007-01-17 12:14 UTC (permalink / raw)
To: Steven Scholz; +Cc: xenomai
On Wed, 2007-01-17 at 12:46 +0100, Steven Scholz wrote:
> Philippe,
>
> >> I wonder if I would need a special glibc support in order to build and run
> >> xenomai applications.
> >
> > In short, no. You could use the oldish linuxthreads, or the NPTL as you
> > see fit, from any glibc version...
> Thanks.
>
> > ... Hi-res timing is provided by the
> > Xenomai nucleus directly, and it is implicitely made available by the
> > Xenomai APIs to the bound applications.
>
> But that would need some low level support for my special platform? Cause
> hrtimers are platform specific. Right?
Since Xenomai implements its own hi-res timers, the "only" thing you
need is to have it ported over your platform of choice. The Xenomai
(user-space) API side is totally independent from the way hi-res timing
is obtained.
>
> > In the particular POSIX case, calling e.g. nanosleep() over a Xenomai
> > thread context already gives you a microsecond-level precision for
> > timings.
> Ok.
>
> > You just need to make sure to compile/link with the hardened
> > Xenomai POSIX library, try running:
> > $ xeno-config --posix-cflags|--posix-ldflags.
> What does it do?
It returns the proper CFLAGS and LDFLAGS to use in order to compile a
POSIX application using the Xenomai hardened POSIX library. In short,
libpthread.so is partially shadowed by our libpthread_rt.so library.
What's not shadowed remains handled by the vanilla glibc/Linux code, the
rest is handled by Xenomai, i.e. with timeliness and predictability in
mind.
> Can I use it for cross-compiling as well?
>
Same principles.
> Steven
--
Philippe.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] special glibc support for Xenomai?
2007-01-17 12:14 ` Philippe Gerum
@ 2007-01-17 13:03 ` Steven Scholz
2007-01-17 13:34 ` Gilles Chanteperdrix
0 siblings, 1 reply; 9+ messages in thread
From: Steven Scholz @ 2007-01-17 13:03 UTC (permalink / raw)
To: rpm; +Cc: xenomai
Philippe,
>>> You just need to make sure to compile/link with the hardened
>>> Xenomai POSIX library, try running:
>>> $ xeno-config --posix-cflags|--posix-ldflags.
>> What does it do?
>
> It returns the proper CFLAGS and LDFLAGS to use in order to compile a
> POSIX application using the Xenomai hardened POSIX library. In short,
> libpthread.so is partially shadowed by our libpthread_rt.so library.
xeno-config --verbose
--version="2.3.50"
--cc="arm-softfloat-linux-gnu-gcc"
--arch="arm"
--prefix="/usr/xenomai"
--xeno-cflags="-I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT"
--xeno-ldflags="-L/usr/xenomai/lib -lpthread "
--posix-cflags="-I/usr/xenomai/include -I/usr/xenomai/include/posix
-D_GNU_SOURCE -D_REENTRANT -D__XENO__"
--posix-ldflags="-L/usr/xenomai/lib -lpthread_rt -lpthread -lrt "
--library-dir="/usr/xenomai/lib"
Sorry. I have to ask again. What am I supposed to do with these lines?
Shell I use all of it whenn calling arm-softfloat-linux-gnu-gcc to compile
my application?
Thanks!
Steven
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] special glibc support for Xenomai?
2007-01-17 13:03 ` Steven Scholz
@ 2007-01-17 13:34 ` Gilles Chanteperdrix
2007-01-18 9:57 ` Steven Scholz
0 siblings, 1 reply; 9+ messages in thread
From: Gilles Chanteperdrix @ 2007-01-17 13:34 UTC (permalink / raw)
To: Steven Scholz; +Cc: xenomai
Steven Scholz wrote:
> Philippe,
>
>
>>>>You just need to make sure to compile/link with the hardened
>>>>Xenomai POSIX library, try running:
>>>>$ xeno-config --posix-cflags|--posix-ldflags.
>>>
>>>What does it do?
>>
>>It returns the proper CFLAGS and LDFLAGS to use in order to compile a
>>POSIX application using the Xenomai hardened POSIX library. In short,
>>libpthread.so is partially shadowed by our libpthread_rt.so library.
>
>
> xeno-config --verbose
> --version="2.3.50"
> --cc="arm-softfloat-linux-gnu-gcc"
> --arch="arm"
> --prefix="/usr/xenomai"
> --xeno-cflags="-I/usr/xenomai/include -D_GNU_SOURCE -D_REENTRANT"
> --xeno-ldflags="-L/usr/xenomai/lib -lpthread "
> --posix-cflags="-I/usr/xenomai/include -I/usr/xenomai/include/posix
> -D_GNU_SOURCE -D_REENTRANT -D__XENO__"
> --posix-ldflags="-L/usr/xenomai/lib -lpthread_rt -lpthread -lrt "
> --library-dir="/usr/xenomai/lib"
>
> Sorry. I have to ask again. What am I supposed to do with these lines?
> Shell I use all of it whenn calling arm-softfloat-linux-gnu-gcc to compile
> my application?
Yes, you should pass the result of xeno-config --posix-cflags and
xeno-config --posix-ldflags to arm-softfloat-linux-gnu-gcc. When running
xeno-config --posix-ldflags here, I get:
-Wl,--wrap,pthread_create -Wl,--wrap,pthread_setschedparam
-Wl,--wrap,pthread_getschedparam -Wl,--wrap,pthread_yield
-Wl,--wrap,sched_yield -Wl,--wrap,sem_init -Wl,--wrap,sem_destroy
-Wl,--wrap,sem_post -Wl,--wrap,sem_timedwait -Wl,--wrap,sem_wait
-Wl,--wrap,sem_trywait -Wl,--wrap,sem_getvalue -Wl,--wrap,sem_open
-Wl,--wrap,sem_close -Wl,--wrap,sem_unlink -Wl,--wrap,clock_getres
-Wl,--wrap,clock_gettime -Wl,--wrap,clock_settime
-Wl,--wrap,clock_nanosleep -Wl,--wrap,nanosleep
-Wl,--wrap,pthread_mutexattr_init -Wl,--wrap,pthread_mutexattr_destroy
-Wl,--wrap,pthread_mutexattr_gettype
-Wl,--wrap,pthread_mutexattr_settype
-Wl,--wrap,pthread_mutexattr_getprotocol
-Wl,--wrap,pthread_mutexattr_setprotocol
-Wl,--wrap,pthread_mutexattr_getpshared
-Wl,--wrap,pthread_mutexattr_setpshared -Wl,--wrap,pthread_mutex_init
-Wl,--wrap,pthread_mutex_destroy -Wl,--wrap,pthread_mutex_lock
-Wl,--wrap,pthread_mutex_trylock -Wl,--wrap,pthread_mutex_timedlock
-Wl,--wrap,pthread_mutex_unlock -Wl,--wrap,pthread_condattr_init
-Wl,--wrap,pthread_condattr_destroy -Wl,--wrap,pthread_condattr_getclock
-Wl,--wrap,pthread_condattr_setclock
-Wl,--wrap,pthread_condattr_getpshared
-Wl,--wrap,pthread_condattr_setpshared -Wl,--wrap,pthread_cond_init
-Wl,--wrap,pthread_cond_destroy -Wl,--wrap,pthread_cond_wait
-Wl,--wrap,pthread_cond_timedwait -Wl,--wrap,pthread_cond_signal
-Wl,--wrap,pthread_cond_broadcast -Wl,--wrap,mq_open -Wl,--wrap,mq_close
-Wl,--wrap,mq_unlink -Wl,--wrap,mq_getattr -Wl,--wrap,mq_setattr
-Wl,--wrap,mq_send -Wl,--wrap,mq_timedsend -Wl,--wrap,mq_receive
-Wl,--wrap,mq_timedreceive -Wl,--wrap,mq_notify -Wl,--wrap,open
-Wl,--wrap,socket -Wl,--wrap,close -Wl,--wrap,ioctl -Wl,--wrap,read
-Wl,--wrap,write -Wl,--wrap,recvmsg -Wl,--wrap,sendmsg
-Wl,--wrap,recvfrom -Wl,--wrap,sendto -Wl,--wrap,recv -Wl,--wrap,send
-Wl,--wrap,getsockopt -Wl,--wrap,setsockopt -Wl,--wrap,bind
-Wl,--wrap,connect -Wl,--wrap,listen -Wl,--wrap,accept
-Wl,--wrap,getsockname -Wl,--wrap,getpeername -Wl,--wrap,shutdown
-Wl,--wrap,timer_create -Wl,--wrap,timer_delete -Wl,--wrap,timer_settime
-Wl,--wrap,timer_getoverrun -Wl,--wrap,timer_gettime
-Wl,--wrap,ftruncate -Wl,--wrap,close -Wl,--wrap,shm_open
-Wl,--wrap,shm_unlink -Wl,--wrap,mmap -Wl,--wrap,munmap
-L/home/gcx/repository/HardV3/linux2.6/trunk/lib/xenomai/inst//lib
-lpthread_rt -lpthread -lrt
The wrapped calls are handled by xenomai libpthread_rt.so library.
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] special glibc support for Xenomai?
2007-01-17 13:34 ` Gilles Chanteperdrix
@ 2007-01-18 9:57 ` Steven Scholz
2007-01-18 10:02 ` Gilles Chanteperdrix
2007-01-18 10:17 ` Steven Scholz
0 siblings, 2 replies; 9+ messages in thread
From: Steven Scholz @ 2007-01-18 9:57 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
Gilles,
>> Sorry. I have to ask again. What am I supposed to do with these lines?
>> Shell I use all of it whenn calling arm-softfloat-linux-gnu-gcc to compile
>> my application?
>
> Yes, you should pass the result of xeno-config --posix-cflags and
> xeno-config --posix-ldflags to arm-softfloat-linux-gnu-gcc. When running
> xeno-config --posix-ldflags here, I get:
>
> -Wl,--wrap,pthread_create -Wl,--wrap,pthread_setschedparam
> ...
Ah. Thanks! Passing these flags seems to work now.
But I had to copy and paste it from your mail since when I run ./xeno-config
--posix-ldflags I get
POSIX support is not available
???
How is that?
Steven
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] special glibc support for Xenomai?
2007-01-18 9:57 ` Steven Scholz
@ 2007-01-18 10:02 ` Gilles Chanteperdrix
2007-01-18 10:17 ` Steven Scholz
1 sibling, 0 replies; 9+ messages in thread
From: Gilles Chanteperdrix @ 2007-01-18 10:02 UTC (permalink / raw)
To: Steven Scholz; +Cc: xenomai
Steven Scholz wrote:
> Ah. Thanks! Passing these flags seems to work now.
> But I had to copy and paste it from your mail since when I run ./xeno-config
> --posix-ldflags I get
>
> POSIX support is not available
>
> ???
>
> How is that?
These flags are stored in the posix.wrappers file. xeno-config has to
find it. So, if you installed Xenomai with DESTDIR set to a non null
value you should set DESTDIR to the same value in xeno-config environment.
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Xenomai-help] special glibc support for Xenomai?
2007-01-18 9:57 ` Steven Scholz
2007-01-18 10:02 ` Gilles Chanteperdrix
@ 2007-01-18 10:17 ` Steven Scholz
1 sibling, 0 replies; 9+ messages in thread
From: Steven Scholz @ 2007-01-18 10:17 UTC (permalink / raw)
To: Steven Scholz; +Cc: xenomai
Steven Scholz wrote:
> Gilles,
>
>>> Sorry. I have to ask again. What am I supposed to do with these lines?
>>> Shell I use all of it whenn calling arm-softfloat-linux-gnu-gcc to compile
>>> my application?
>> Yes, you should pass the result of xeno-config --posix-cflags and
>> xeno-config --posix-ldflags to arm-softfloat-linux-gnu-gcc. When running
>> xeno-config --posix-ldflags here, I get:
>>
>> -Wl,--wrap,pthread_create -Wl,--wrap,pthread_setschedparam
>> ...
>
> Ah. Thanks! Passing these flags seems to work now.
> But I had to copy and paste it from your mail since when I run ./xeno-config
> --posix-ldflags I get
>
> POSIX support is not available
>
> ???
Ah. Ok. Nevermind. I was using the script on my developent hsot where no
xenomai libs are install. Running it directly on the target I get all these
linker flags as well.
Thanks
Steven
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-01-18 10:17 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-17 11:16 [Xenomai-help] special glibc support for Xenomai? Steven Scholz
2007-01-17 11:33 ` Philippe Gerum
2007-01-17 11:46 ` Steven Scholz
2007-01-17 12:14 ` Philippe Gerum
2007-01-17 13:03 ` Steven Scholz
2007-01-17 13:34 ` Gilles Chanteperdrix
2007-01-18 9:57 ` Steven Scholz
2007-01-18 10:02 ` Gilles Chanteperdrix
2007-01-18 10:17 ` Steven Scholz
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.