* [Xenomai-help] RT, nonRT communication
@ 2007-10-30 12:03 Patrick
2007-10-30 13:29 ` Gilles Chanteperdrix
0 siblings, 1 reply; 18+ messages in thread
From: Patrick @ 2007-10-30 12:03 UTC (permalink / raw)
To: xenomai
Ok, so if I understand I can't use a pthread_mutex between the main thread
and a rt_task ?
If I want use pthread_mutex between another pthread and a rt_task, must the
pthred be running with SCHED_OTHER ? This value is the default value for
pthread !
Thank's
-----Message d'origine-----
De : Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org
Envoyé : mardi, 30. octobre 2007 10:52
À : Patrick
Cc : xenomai@xenomai.org
Objet : Re: [Xenomai-help] TR: RT, nonRT communication
On 10/30/07, Patrick <kpa_info@domain.hid> wrote:
>
>
>
>
> Hi,
>
>
>
> Is it possible to share a pthread_mutex between a rt task and a linux
> pthread ?
No, it is not possible
>
> My two tasks must share resources and I must protect them against
concurrent
> access.
>
> If pthread_mutex is not the correct way to do it can you tell me how to
> achieve this ?
The way to handle these border line cases is to make your linux
pthread a xenomai thread running with the SCHED_OTHER scheduling
policy. Note that the main thread already has this property.
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [Xenomai-help] RT, nonRT communication
2007-10-30 12:03 [Xenomai-help] RT, nonRT communication Patrick
@ 2007-10-30 13:29 ` Gilles Chanteperdrix
2007-10-31 7:37 ` ROSSIER Daniel
0 siblings, 1 reply; 18+ messages in thread
From: Gilles Chanteperdrix @ 2007-10-30 13:29 UTC (permalink / raw)
To: Patrick; +Cc: xenomai
On 10/30/07, Patrick <kpa_info@domain.hid> wrote:
> > -----Message d'origine-----
> > De: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org]
> > Envoyé: mardi, 30. octobre 2007 10:52
> > À: Patrick
> > Cc: xenomai@xenomai.org
> > Objet: Re: [Xenomai-help] TR: RT, nonRT communication
> >
> > On 10/30/07, Patrick <kpa_info@domain.hid> wrote:
> > >
> > >
> > >
> > >
> > > Hi,
> > >
> > >
> > >
> > > Is it possible to share a pthread_mutex between a rt task and a linux
> > > pthread ?
> >
> > No, it is not possible
> >
> > >
> > > My two tasks must share resources and I must protect them against
> > concurrent
> > > access.
> > >
> > > If pthread_mutex is not the correct way to do it can you tell me how to
> > > achieve this ?
> >
> > The way to handle these border line cases is to make your linux
> > pthread a xenomai thread running with the SCHED_OTHER scheduling
> > policy. Note that the main thread already has this property.
> >
> Ok, so if I understand I can't use a pthread_mutex between the main thread
> and a rt_task ?
You CAN use a xenomai pthread_mutex between the main thread and a
rt_task, the main thread is a xenomai thread running with the
SCHED_OTHER scheduling policy.
> If I want use pthread_mutex between another pthread and a rt_task, must the
> pthred be running with SCHED_OTHER ? This value is the default value for
> pthread !
The pthread must be a xenomai posix skin thread running with the
SCHED_OTHER policy. You can achieve this by creating this pthread with
xenomai wrapped pthread_create, or by setting its policy (assuming the
thread was created with the non wrapped pthread_create, i.e.
__real_pthread_create) with xenomai wrapped pthread_setschedparam.
In other words, if you use Xenomai wrapped functions, everything
should be fine. Things become tricky when you decide to use __real_*
functions.
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [Xenomai-help] RT, nonRT communication
2007-10-30 13:29 ` Gilles Chanteperdrix
@ 2007-10-31 7:37 ` ROSSIER Daniel
2007-10-31 8:43 ` Gilles Chanteperdrix
2007-10-31 9:39 ` Daniel Schnell
0 siblings, 2 replies; 18+ messages in thread
From: ROSSIER Daniel @ 2007-10-31 7:37 UTC (permalink / raw)
To: Gilles Chanteperdrix, Patrick; +Cc: xenomai
>-----Original Message-----
>From: xenomai-help-bounces@domain.hid [mailto:xenomai-help-bounces@domain.hid]
>On Behalf Of Gilles Chanteperdrix
>Sent: mardi 30 octobre 2007 14:30
>To: Patrick
>Cc: xenomai@xenomai.org
>Subject: Re: [Xenomai-help] RT, nonRT communication
>
>On 10/30/07, Patrick <kpa_info@domain.hid> wrote:
>> > -----Message d'origine-----
>> > De: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org]
>> > Envoyé: mardi, 30. octobre 2007 10:52
>> > À: Patrick
>> > Cc: xenomai@xenomai.org
>> > Objet: Re: [Xenomai-help] TR: RT, nonRT communication
>> >
>> > On 10/30/07, Patrick <kpa_info@domain.hid> wrote:
>> > >
>> > >
>> > >
>> > >
>> > > Hi,
>> > >
>> > >
>> > >
>> > > Is it possible to share a pthread_mutex between a rt task and a
>linux
>> > > pthread ?
>> >
>> > No, it is not possible
>> >
>> > >
>> > > My two tasks must share resources and I must protect them against
>> > concurrent
>> > > access.
>> > >
>> > > If pthread_mutex is not the correct way to do it can you tell me
>how to
>> > > achieve this ?
>> >
>> > The way to handle these border line cases is to make your linux
>> > pthread a xenomai thread running with the SCHED_OTHER scheduling
>> > policy. Note that the main thread already has this property.
>> >
>> Ok, so if I understand I can't use a pthread_mutex between the main
>thread
>> and a rt_task ?
>
>You CAN use a xenomai pthread_mutex between the main thread and a
>rt_task, the main thread is a xenomai thread running with the
>SCHED_OTHER scheduling policy.
>
I guess there is a misunderstanding of "main thread" here. The main thread should actually not be a xenomai thread since it belongs to a non-RT application. Patrick is actually using the Qt framework on a PXA device which of course is not a RT-domain application. The thing is that the Qt application should somehow retrieve some data issued from RT-application. Currently the Qt application is starting a Xenomai thread - by doing an extern "c" invokation from Qt - and the data list is shared between the main (qt-)thread (non-RT) and the Xenomai thread; that's why Patrick wanted to use a mutex. But indeed, as far as I know, it will be not possible to do that since the waiting queues on sync objects as mutex are managed differently (dealing with linux threads on the one hand, with Xenomai threads on the other hand) between the RT and non-RT domains. So the question would be: how can data be exchanged in a safe way between a non-RT domain and a RT-domain?
>> If I want use pthread_mutex between another pthread and a rt_task,
>must the
>> pthred be running with SCHED_OTHER ? This value is the default value
>for
>> pthread !
>
>The pthread must be a xenomai posix skin thread running with the
>SCHED_OTHER policy. You can achieve this by creating this pthread with
>xenomai wrapped pthread_create, or by setting its policy (assuming the
>thread was created with the non wrapped pthread_create, i.e.
>__real_pthread_create) with xenomai wrapped pthread_setschedparam.
>
>In other words, if you use Xenomai wrapped functions, everything
>should be fine. Things become tricky when you decide to use __real_*
>functions.
>
>--
> Gilles Chanteperdrix
>
>_______________________________________________
>Xenomai-help mailing list
>Xenomai-help@domain.hid
>https://mail.gna.org/listinfo/xenomai-help
Daniel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
2007-10-31 7:37 ` ROSSIER Daniel
@ 2007-10-31 8:43 ` Gilles Chanteperdrix
2007-11-01 10:04 ` Patrick
2007-11-10 11:25 ` Patrick
2007-10-31 9:39 ` Daniel Schnell
1 sibling, 2 replies; 18+ messages in thread
From: Gilles Chanteperdrix @ 2007-10-31 8:43 UTC (permalink / raw)
To: ROSSIER Daniel; +Cc: xenomai
ROSSIER Daniel wrote:
> >-----Original Message-----
> >From: xenomai-help-bounces@domain.hid [mailto:xenomai-help-bounces@domain.hid]
> >On Behalf Of Gilles Chanteperdrix
> >Sent: mardi 30 octobre 2007 14:30
> >To: Patrick
> >Cc: xenomai@xenomai.org
> >Subject: Re: [Xenomai-help] RT, nonRT communication
> >
> >On 10/30/07, Patrick <kpa_info@domain.hid> wrote:
> >> > -----Message d'origine-----
> >> > De: Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org]
> >> > Envoyé: mardi, 30. octobre 2007 10:52
> >> > À: Patrick
> >> > Cc: xenomai@xenomai.org
> >> > Objet: Re: [Xenomai-help] TR: RT, nonRT communication
> >> >
> >> > On 10/30/07, Patrick <kpa_info@domain.hid> wrote:
> >> > >
> >> > >
> >> > >
> >> > >
> >> > > Hi,
> >> > >
> >> > >
> >> > >
> >> > > Is it possible to share a pthread_mutex between a rt task and a
> >linux
> >> > > pthread ?
> >> >
> >> > No, it is not possible
> >> >
> >> > >
> >> > > My two tasks must share resources and I must protect them against
> >> > concurrent
> >> > > access.
> >> > >
> >> > > If pthread_mutex is not the correct way to do it can you tell me
> >how to
> >> > > achieve this ?
> >> >
> >> > The way to handle these border line cases is to make your linux
> >> > pthread a xenomai thread running with the SCHED_OTHER scheduling
> >> > policy. Note that the main thread already has this property.
> >> >
> >> Ok, so if I understand I can't use a pthread_mutex between the main
> >thread
> >> and a rt_task ?
> >
> >You CAN use a xenomai pthread_mutex between the main thread and a
> >rt_task, the main thread is a xenomai thread running with the
> >SCHED_OTHER scheduling policy.
> >
>
> I guess there is a misunderstanding of "main thread" here. The main thread should actually not be a xenomai thread since it belongs to a non-RT application. Patrick is actually using the Qt framework on a PXA device which of course is not a RT-domain application. The thing is that the Qt application should somehow retrieve some data issued from RT-application. Currently the Qt application is starting a Xenomai thread - by doing an extern "c" invokation from Qt - and the data list is shared between the main (qt-)thread (non-RT) and the Xenomai thread; that's why Patrick wanted to use a mutex. But indeed, as far as I know, it will be not possible to do that since the waiting queues on sync objects as mutex are managed differently (dealing with linux threads on the one hand, with Xenomai threads on the other hand) between the RT and non-RT domains. So the question would be: how can data be exchanged in a safe way between a non-RT domain and a RT-domain?
As soon as you compile your application with the flags returned by
xeno-config --posix-cflags and xeno-config --posix-ldflags, it really
becomes an RT application where all threads are real-time threads. The
only way to create a non real-time thread in such an application is by
calling __real_pthread_create.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
2007-10-31 8:43 ` Gilles Chanteperdrix
@ 2007-11-01 10:04 ` Patrick
2007-11-01 11:14 ` Patrick
2007-11-01 15:46 ` Gilles Chanteperdrix
2007-11-10 11:25 ` Patrick
1 sibling, 2 replies; 18+ messages in thread
From: Patrick @ 2007-11-01 10:04 UTC (permalink / raw)
To: 'Gilles Chanteperdrix', xenomai
Hello,
Do I have to use --posix-cflags and --posix-ldflags together with the
--xeno-cflags and --xeno-ldflags or are they exclusive?
Patrick
-----Message d'origine-----
De : Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org
Envoyé : mercredi, 31. octobre 2007 09:44
À : ROSSIER Daniel
Cc : Patrick; xenomai@xenomai.org
Objet : RE: [Xenomai-help] RT, nonRT communication
[...]
As soon as you compile your application with the flags returned by
xeno-config --posix-cflags and xeno-config --posix-ldflags, it really
becomes an RT application where all threads are real-time threads. The
only way to create a non real-time thread in such an application is by
calling __real_pthread_create.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
2007-11-01 10:04 ` Patrick
@ 2007-11-01 11:14 ` Patrick
2007-11-01 11:23 ` Jan Kiszka
2007-11-01 15:46 ` Gilles Chanteperdrix
1 sibling, 1 reply; 18+ messages in thread
From: Patrick @ 2007-11-01 11:14 UTC (permalink / raw)
To: 'Gilles Chanteperdrix', xenomai
I have tried to compile my QT application with --posix-cflags and
--posix-ldflags but without success. I have a compilation error in syscall.h
:
/usr/xenomai/include/asm/xenomai/syscall.h:235: error: expected
primary-expression before . Token
I think it's because QT is C++ application so it uses g++ and not gcc. And
Xenomai is not intended to be compiled with C++ compiler.
Patrick
-----Message d'origine-----
De : xenomai-help-bounces@domain.hid [mailto:xenomai-help-bounces@domain.hid] De
la part de Patrick
Envoyé : jeudi, 1. novembre 2007 11:04
À : 'Gilles Chanteperdrix'; xenomai@xenomai.org
Objet : Re: [Xenomai-help] RT, nonRT communication
Hello,
Do I have to use --posix-cflags and --posix-ldflags together with the
--xeno-cflags and --xeno-ldflags or are they exclusive?
Patrick
-----Message d'origine-----
De : Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org
Envoyé : mercredi, 31. octobre 2007 09:44
À : ROSSIER Daniel
Cc : Patrick; xenomai@xenomai.org
Objet : RE: [Xenomai-help] RT, nonRT communication
[...]
As soon as you compile your application with the flags returned by
xeno-config --posix-cflags and xeno-config --posix-ldflags, it really
becomes an RT application where all threads are real-time threads. The
only way to create a non real-time thread in such an application is by
calling __real_pthread_create.
--
Gilles Chanteperdrix.
_______________________________________________
Xenomai-help mailing list
Xenomai-help@domain.hid
https://mail.gna.org/listinfo/xenomai-help
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
2007-11-01 11:14 ` Patrick
@ 2007-11-01 11:23 ` Jan Kiszka
2007-11-01 12:33 ` Patrick
2007-11-12 14:00 ` Patrick
0 siblings, 2 replies; 18+ messages in thread
From: Jan Kiszka @ 2007-11-01 11:23 UTC (permalink / raw)
To: Patrick; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 650 bytes --]
Patrick wrote:
> I have tried to compile my QT application with --posix-cflags and
> --posix-ldflags but without success. I have a compilation error in syscall.h
> :
>
> /usr/xenomai/include/asm/xenomai/syscall.h:235: error: expected
> primary-expression before ‘.’ Token
>
> I think it's because QT is C++ application so it uses g++ and not gcc. And
> Xenomai is not intended to be compiled with C++ compiler.
It _is_ intended and _is_ being used with C++. This doesn't exclude
regressions or arch-specific bugs in the headers though. What version,
what arch are you using? Can you post the full (related) compiler output?
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
2007-11-01 11:23 ` Jan Kiszka
@ 2007-11-01 12:33 ` Patrick
2007-11-01 15:46 ` Patrick
2007-11-12 14:00 ` Patrick
1 sibling, 1 reply; 18+ messages in thread
From: Patrick @ 2007-11-01 12:33 UTC (permalink / raw)
To: jan.kiszka; +Cc: xenomai
Ok. I use Xenomai 2.4-rc4 with adeos 1.7-06 for arm with 2.6.20 kernel.
And the compiler output:
/usr/local/qtopiarm/bin/qmake -unix -o Makefile gui.pro
arm-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -D_GNU_SOURCE
-D_REENTRANT -D__XENO__ -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/qtopiarm/mkspecs/qws/linux-arm-g++
-I. -I/usr/local/qtopiarm/include/QtCore
-I/usr/local/qtopiarm/include/QtCore -I/usr/local/qtopiarm/include/QtNetwork
-I/usr/local/qtopiarm/include/QtNetwork -I/usr/local/qtopiarm/include/QtGui
-I/usr/local/qtopiarm/include/QtGui -I/usr/local/qtopiarm/include -I.
-I/usr/xenomai/include -I/usr/xenomai/include/posix -Iprotlib -I. -I. -o
main.o main.cpp
/usr/xenomai/include/asm/xenomai/syscall.h:235: error: expected
primary-expression before . token
make: *** [main.o] Erreur 1
Thanks
Patrick
-----Message d'origine-----
De : jan.kiszka@domain.hid [mailto:jan.kiszka@domain.hid
Envoyé : jeudi, 1. novembre 2007 12:23
À : Patrick
Cc : 'Gilles Chanteperdrix'; xenomai@xenomai.org
Objet : Re: [Xenomai-help] RT, nonRT communication
Patrick wrote:
> I have tried to compile my QT application with --posix-cflags and
> --posix-ldflags but without success. I have a compilation error in
syscall.h
> :
>
> /usr/xenomai/include/asm/xenomai/syscall.h:235: error: expected
> primary-expression before . Token
>
> I think it's because QT is C++ application so it uses g++ and not gcc. And
> Xenomai is not intended to be compiled with C++ compiler.
It _is_ intended and _is_ being used with C++. This doesn't exclude
regressions or arch-specific bugs in the headers though. What version,
what arch are you using? Can you post the full (related) compiler output?
Jan
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
2007-11-01 12:33 ` Patrick
@ 2007-11-01 15:46 ` Patrick
2007-11-01 16:02 ` Gilles Chanteperdrix
0 siblings, 1 reply; 18+ messages in thread
From: Patrick @ 2007-11-01 15:46 UTC (permalink / raw)
To: xenomai
Hi all,
I found what was causing the problem (compiling with g++), it's simply that
the struct initialization is not g++ compatible :
__attribute__((weak)) struct __xn_tscinfo __xn_tscinfo = {
.type = -1
};
should be :
__attribute__((weak)) struct __xn_tscinfo __xn_tscinfo = {
type : -1
};
I tested this with g++ and gcc versions 4.1.2 and it compiles correctly.
Patrick
-----Message d'origine-----
De : xenomai-help-bounces@domain.hid [mailto:xenomai-help-bounces@domain.hid] De
la part de Patrick
Envoyé : jeudi, 1. novembre 2007 13:33
À : jan.kiszka@domain.hid
Cc : xenomai@xenomai.org
Objet : Re: [Xenomai-help] RT, nonRT communication
Ok. I use Xenomai 2.4-rc4 with adeos 1.7-06 for arm with 2.6.20 kernel.
And the compiler output:
/usr/local/qtopiarm/bin/qmake -unix -o Makefile gui.pro
arm-linux-gnueabi-g++ -c -pipe -O2 -Wall -W -D_REENTRANT -D_GNU_SOURCE
-D_REENTRANT -D__XENO__ -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB
-DQT_CORE_LIB -DQT_SHARED -I/usr/local/qtopiarm/mkspecs/qws/linux-arm-g++
-I. -I/usr/local/qtopiarm/include/QtCore
-I/usr/local/qtopiarm/include/QtCore -I/usr/local/qtopiarm/include/QtNetwork
-I/usr/local/qtopiarm/include/QtNetwork -I/usr/local/qtopiarm/include/QtGui
-I/usr/local/qtopiarm/include/QtGui -I/usr/local/qtopiarm/include -I.
-I/usr/xenomai/include -I/usr/xenomai/include/posix -Iprotlib -I. -I. -o
main.o main.cpp
/usr/xenomai/include/asm/xenomai/syscall.h:235: error: expected
primary-expression before . token
make: *** [main.o] Erreur 1
Thanks
Patrick
-----Message d'origine-----
De : jan.kiszka@domain.hid [mailto:jan.kiszka@domain.hid
Envoyé : jeudi, 1. novembre 2007 12:23
À : Patrick
Cc : 'Gilles Chanteperdrix'; xenomai@xenomai.org
Objet : Re: [Xenomai-help] RT, nonRT communication
Patrick wrote:
> I have tried to compile my QT application with --posix-cflags and
> --posix-ldflags but without success. I have a compilation error in
syscall.h
> :
>
> /usr/xenomai/include/asm/xenomai/syscall.h:235: error: expected
> primary-expression before . Token
>
> I think it's because QT is C++ application so it uses g++ and not gcc. And
> Xenomai is not intended to be compiled with C++ compiler.
It _is_ intended and _is_ being used with C++. This doesn't exclude
regressions or arch-specific bugs in the headers though. What version,
what arch are you using? Can you post the full (related) compiler output?
Jan
_______________________________________________
Xenomai-help mailing list
Xenomai-help@domain.hid
https://mail.gna.org/listinfo/xenomai-help
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [Xenomai-help] RT, nonRT communication
2007-11-01 15:46 ` Patrick
@ 2007-11-01 16:02 ` Gilles Chanteperdrix
0 siblings, 0 replies; 18+ messages in thread
From: Gilles Chanteperdrix @ 2007-11-01 16:02 UTC (permalink / raw)
To: Patrick; +Cc: xenomai
Patrick wrote:
> Hi all,
>
> I found what was causing the problem (compiling with g++), it's simply that
> the struct initialization is not g++ compatible :
>
> __attribute__((weak)) struct __xn_tscinfo __xn_tscinfo = {
> .type = -1
> };
>
> should be :
>
> __attribute__((weak)) struct __xn_tscinfo __xn_tscinfo = {
> type : -1
> };
>
> I tested this with g++ and gcc versions 4.1.2 and it compiles correctly.
...but is fragile, if we are not trying to initialize the structure
first member, g++ says:
sorry, unimplemented: non-trivial designated initializers not supported
So, we are better off do it the C++ way.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
2007-11-01 11:23 ` Jan Kiszka
2007-11-01 12:33 ` Patrick
@ 2007-11-12 14:00 ` Patrick
2007-11-12 15:48 ` Gilles Chanteperdrix
2007-11-12 21:20 ` Jan Kiszka
1 sibling, 2 replies; 18+ messages in thread
From: Patrick @ 2007-11-12 14:00 UTC (permalink / raw)
To: jan.kiszka; +Cc: xenomai
Hi,
I have another error when I try to compile Xenomai with g++ :
/usr/xenomai/include/native/task.h:292: error: expected , or ... before
protected
I have tried to include this file with and without extern "C" but the issue
is the same.
Do you have an idea ?
Thanks in advance
Patrick
-----Message d'origine-----
De : jan.kiszka@domain.hid [mailto:jan.kiszka@domain.hid
Envoyé : jeudi, 1. novembre 2007 12:23
À : Patrick
Cc : 'Gilles Chanteperdrix'; xenomai@xenomai.org
Objet : Re: [Xenomai-help] RT, nonRT communication
>Patrick wrote:
>> I have tried to compile my QT application with --posix-cflags and
>> --posix-ldflags but without success. I have a compilation error in
>syscall.h
>> :
>>
>> /usr/xenomai/include/asm/xenomai/syscall.h:235: error: expected
>> primary-expression before . Token
>>
>> I think it's because QT is C++ application so it uses g++ and not gcc.
>> And Xenomai is not intended to be compiled with C++ compiler.
>
>It _is_ intended and _is_ being used with C++. This doesn't exclude
>regressions or arch-specific bugs in the headers though. What version,
>what arch are you using? Can you post the full (related) compiler output?
>
>Jan
>
Ok. I use Xenomai 2.4-rc4 with adeos 1.7-06 for arm with 2.6.20 kernel.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
2007-11-12 14:00 ` Patrick
@ 2007-11-12 15:48 ` Gilles Chanteperdrix
2007-11-12 21:20 ` Jan Kiszka
1 sibling, 0 replies; 18+ messages in thread
From: Gilles Chanteperdrix @ 2007-11-12 15:48 UTC (permalink / raw)
To: Patrick; +Cc: xenomai, jan.kiszka
On Nov 12, 2007 3:00 PM, Patrick <kpa_info@domain.hid> wrote:
>
> Hi,
>
> I have another error when I try to compile Xenomai with g++ :
>
> /usr/xenomai/include/native/task.h:292: error: expected ',' or '...' before
> 'protected'
>
> I have tried to include this file with and without extern "C" but the issue
> is the same.
>
> Do you have an idea ?
Please post some example code that we can compile, because simply
#including <native/task.h> in a C++ program works here.
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [Xenomai-help] RT, nonRT communication
2007-11-12 14:00 ` Patrick
2007-11-12 15:48 ` Gilles Chanteperdrix
@ 2007-11-12 21:20 ` Jan Kiszka
1 sibling, 0 replies; 18+ messages in thread
From: Jan Kiszka @ 2007-11-12 21:20 UTC (permalink / raw)
To: Patrick; +Cc: xenomai
[-- Attachment #1: Type: text/plain, Size: 556 bytes --]
Patrick wrote:
> Hi,
>
> I have another error when I try to compile Xenomai with g++ :
>
> /usr/xenomai/include/native/task.h:292: error: expected ‘,’ or ‘...’ before
> ‘protected’
There is no "protected" text pattern in that file, not even in Xenomai
files task.h includes.
Are you sure that you do not drag in some third-party preprocessor
definition that replaces something happened to be used in Xenomai
headers? Try g++ with "-E" to check what the compiler tries to crunch
(or post a simple test case as Gilles requested).
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
2007-11-01 10:04 ` Patrick
2007-11-01 11:14 ` Patrick
@ 2007-11-01 15:46 ` Gilles Chanteperdrix
1 sibling, 0 replies; 18+ messages in thread
From: Gilles Chanteperdrix @ 2007-11-01 15:46 UTC (permalink / raw)
To: Patrick; +Cc: xenomai
Patrick wrote:
> -----Message d'origine-----
> De : Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org]
> Envoyé : mercredi, 31. octobre 2007 09:44
> À : ROSSIER Daniel
> Cc : Patrick; xenomai@xenomai.org
> Objet : RE: [Xenomai-help] RT, nonRT communication
>
> [...]
>
> > As soon as you compile your application with the flags returned by
> > xeno-config --posix-cflags and xeno-config --posix-ldflags, it really
> > becomes an RT application where all threads are real-time threads. The
> > only way to create a non real-time thread in such an application is by
> > calling __real_pthread_create.
>
> Do I have to use --posix-cflags and --posix-ldflags together with the
> --xeno-cflags and --xeno-ldflags or are they exclusive?
>
--posix-*flags is for compilation for the posix skin, --xeno-*flags is
for compilation for other skins. You can use them together if your
application uses the posix skin at the same time as another skin.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
2007-10-31 8:43 ` Gilles Chanteperdrix
2007-11-01 10:04 ` Patrick
@ 2007-11-10 11:25 ` Patrick
2007-11-10 12:24 ` Gilles Chanteperdrix
1 sibling, 1 reply; 18+ messages in thread
From: Patrick @ 2007-11-10 11:25 UTC (permalink / raw)
To: 'Gilles Chanteperdrix'; +Cc: xenomai
> [...]
> As soon as you compile your application with the flags returned by
> xeno-config --posix-cflags and xeno-config --posix-ldflags, it really
> becomes an RT application where all threads are real-time threads. The
> only way to create a non real-time thread in such an application is by
> calling __real_pthread_create.
>
> Gilles Chanteperdrix.
Hi all,
What is the (default) priority of RT pthreads in comparison with native
rt_task ?
Thanks in advance
Patrick
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
2007-11-10 11:25 ` Patrick
@ 2007-11-10 12:24 ` Gilles Chanteperdrix
0 siblings, 0 replies; 18+ messages in thread
From: Gilles Chanteperdrix @ 2007-11-10 12:24 UTC (permalink / raw)
To: Patrick; +Cc: xenomai
Patrick wrote:
>
> > [...]
> > As soon as you compile your application with the flags returned by
> > xeno-config --posix-cflags and xeno-config --posix-ldflags, it really
> > becomes an RT application where all threads are real-time threads. The
> > only way to create a non real-time thread in such an application is by
> > calling __real_pthread_create.
> >
> > Gilles Chanteperdrix.
>
>
> Hi all,
>
> What is the (default) priority of RT pthreads in comparison with native
> rt_task ?
The default scheduling of RT pthreads is SCHED_OTHER, which means that
their priority is 0. This makes them suitable mostly for non real-time
duties. native rt_task have no default priority, since passing a
priority to rt_task_create is mandatory, but you can create them with a
null priority as well if you like.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
2007-10-31 7:37 ` ROSSIER Daniel
2007-10-31 8:43 ` Gilles Chanteperdrix
@ 2007-10-31 9:39 ` Daniel Schnell
1 sibling, 0 replies; 18+ messages in thread
From: Daniel Schnell @ 2007-10-31 9:39 UTC (permalink / raw)
To: ROSSIER Daniel; +Cc: xenomai
ROSSIER Daniel wrote:
> .....
>
> I guess there is a misunderstanding of "main thread" here. The main
> thread should actually not be a xenomai thread since it belongs to a
> non-RT application. Patrick is actually using the Qt framework on a
> PXA device which of course is not a RT-domain application. The thing
> is that the Qt application should somehow retrieve some data issued
> from RT-application. Currently the Qt application is starting a
> Xenomai thread - by doing an extern "c" invokation from Qt - and the
> data list is shared between the main (qt-)thread (non-RT) and the
> Xenomai thread; that's why Patrick wanted to use a mutex. But indeed,
> as far as I know, it will be not possible to do that since the
> waiting queues on sync objects as mutex are managed differently
> (dealing with linux threads on the one hand, with Xenomai threads on
> the other hand) between the RT and non-RT domains. So the question
> would be: how can data be exchanged in a safe way between a non-RT
> domain and a RT-domain?
We are using Posix message queues and/or shared memory.
Works for either way.
Best regards,
Daniel.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [Xenomai-help] RT, nonRT communication
@ 2007-11-13 7:37 Patrick
0 siblings, 0 replies; 18+ messages in thread
From: Patrick @ 2007-11-13 7:37 UTC (permalink / raw)
To: xenomai
Sorry I had answered only to Gilles Chanteperdrix, I forgot you guys :-),
sorry!
PAtrick
-----Message d'origine-----
De : Patrick [mailto:kpa_info@domain.hid
Envoyé : lundi, 12. novembre 2007 17:52
À : 'Gilles Chanteperdrix'
Objet : RE: [Xenomai-help] RT, nonRT communication
Hi,
I have found the problem. The second parameters of rt_task_notify is named
signals and QT define a keywords named signals, and thus the QT pre-compiler
hangs on this declaration. Would it be possible to rename signals to
something like sigs or _signals?
Thank you,
Patrick
-----Message d'origine-----
De : Gilles Chanteperdrix [mailto:gilles.chanteperdrix@xenomai.org
Envoyé : lundi, 12. novembre 2007 16:49
À : Patrick
Cc : jan.kiszka@domain.hid; xenomai@xenomai.org
Objet : Re: [Xenomai-help] RT, nonRT communication
On Nov 12, 2007 3:00 PM, Patrick <kpa_info@domain.hid> wrote:
>
> Hi,
>
> I have another error when I try to compile Xenomai with g++ :
>
> /usr/xenomai/include/native/task.h:292: error: expected ',' or '...'
before
> 'protected'
>
> I have tried to include this file with and without extern "C" but the
issue
> is the same.
>
> Do you have an idea ?
Please post some example code that we can compile, because simply
#including <native/task.h> in a C++ program works here.
--
Gilles Chanteperdrix
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2007-11-13 7:37 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-30 12:03 [Xenomai-help] RT, nonRT communication Patrick
2007-10-30 13:29 ` Gilles Chanteperdrix
2007-10-31 7:37 ` ROSSIER Daniel
2007-10-31 8:43 ` Gilles Chanteperdrix
2007-11-01 10:04 ` Patrick
2007-11-01 11:14 ` Patrick
2007-11-01 11:23 ` Jan Kiszka
2007-11-01 12:33 ` Patrick
2007-11-01 15:46 ` Patrick
2007-11-01 16:02 ` Gilles Chanteperdrix
2007-11-12 14:00 ` Patrick
2007-11-12 15:48 ` Gilles Chanteperdrix
2007-11-12 21:20 ` Jan Kiszka
2007-11-01 15:46 ` Gilles Chanteperdrix
2007-11-10 11:25 ` Patrick
2007-11-10 12:24 ` Gilles Chanteperdrix
2007-10-31 9:39 ` Daniel Schnell
-- strict thread matches above, loose matches on Subject: below --
2007-11-13 7:37 Patrick
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.