* [Xenomai] Using xenomai posix routines instead of Linux POSIX routines
@ 2015-03-30 13:40 Sagi Maimon
2015-03-30 13:49 ` Philippe Gerum
0 siblings, 1 reply; 5+ messages in thread
From: Sagi Maimon @ 2015-03-30 13:40 UTC (permalink / raw)
To: xenomai@xenomai.org
Hi,
Until now I have created RT xenomai threads, by using the skin native API:
kernel/xenomai/skins/native/task.c (rt_task_create routine)
and for creating Linux threads, I have used the "pthread_create" routine (.../powerpc-e300c3-linux-gnu/usr/lib/libpthread.so)
xenomai also implements POSIX API:
kernel/xenomai/skins/posix/thread.c
And by looking at the code (and according to documentation), by calling "pthread_create" routine , xenomai creates RT threads.
My question:
I want to use the xenomai POSIX API, so How can I use the xenomai "pthread_create" routine, instead of the one from (.../powerpc-e300c3-linux-gnu/usr/lib/libpthread.so)?
should I add something to my Makefile?
Should I remove "-lpthread" parameter from my application Makefile?
Thanks,
Sagi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] Using xenomai posix routines instead of Linux POSIX routines
2015-03-30 13:40 [Xenomai] Using xenomai posix routines instead of Linux POSIX routines Sagi Maimon
@ 2015-03-30 13:49 ` Philippe Gerum
2015-03-31 6:23 ` Sagi Maimon
0 siblings, 1 reply; 5+ messages in thread
From: Philippe Gerum @ 2015-03-30 13:49 UTC (permalink / raw)
To: Sagi Maimon, xenomai@xenomai.org
On 03/30/2015 03:40 PM, Sagi Maimon wrote:
> Hi,
>
> Until now I have created RT xenomai threads, by using the skin native API:
> kernel/xenomai/skins/native/task.c (rt_task_create routine)
>
> and for creating Linux threads, I have used the "pthread_create" routine (.../powerpc-e300c3-linux-gnu/usr/lib/libpthread.so)
>
> xenomai also implements POSIX API:
> kernel/xenomai/skins/posix/thread.c
> And by looking at the code (and according to documentation), by calling "pthread_create" routine , xenomai creates RT threads.
>
>
> My question:
> I want to use the xenomai POSIX API, so How can I use the xenomai "pthread_create" routine, instead of the one from (.../powerpc-e300c3-linux-gnu/usr/lib/libpthread.so)?
> should I add something to my Makefile?
> Should I remove "-lpthread" parameter from my application Makefile?
>
This document explains how to create real-time POSIX applications with
Xenomai:
http://xenomai.org/2014/08/porting-a-linux-application-to-xenomai-dual-kernel/#Compilation_for_the_Xenomai_POSIX_skin
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] Using xenomai posix routines instead of Linux POSIX routines
2015-03-30 13:49 ` Philippe Gerum
@ 2015-03-31 6:23 ` Sagi Maimon
2015-03-31 7:04 ` Philippe Gerum
0 siblings, 1 reply; 5+ messages in thread
From: Sagi Maimon @ 2015-03-31 6:23 UTC (permalink / raw)
To: Philippe Gerum, xenomai@xenomai.org
Hi,
thanks for the help.
I have read the document, and the use of wrapper makes good sense.
According to the document, when calling "pthread_create" (by using the XENO_POSIX_LIBS flags), it will call "__wrap_pthread_create" routine.
But I am using Xenomai 2.6.4 , and there is no implementation of "__wrap_pthread_create" routine,
instead there is implementation of "pthread_create" under kernel/xenomai/skins/posix/thread.c
Can you please explain it?
Thanks,
Sagi
-----Original Message-----
From: Philippe Gerum [mailto:rpm@xenomai.org]
Sent: Monday, March 30, 2015 16:50
To: Sagi Maimon; xenomai@xenomai.org
Subject: Re: [Xenomai] Using xenomai posix routines instead of Linux POSIX routines
On 03/30/2015 03:40 PM, Sagi Maimon wrote:
> Hi,
>
> Until now I have created RT xenomai threads, by using the skin native API:
> kernel/xenomai/skins/native/task.c (rt_task_create routine)
>
> and for creating Linux threads, I have used the "pthread_create" routine (.../powerpc-e300c3-linux-gnu/usr/lib/libpthread.so)
>
> xenomai also implements POSIX API:
> kernel/xenomai/skins/posix/thread.c
> And by looking at the code (and according to documentation), by calling "pthread_create" routine , xenomai creates RT threads.
>
>
> My question:
> I want to use the xenomai POSIX API, so How can I use the xenomai "pthread_create" routine, instead of the one from (.../powerpc-e300c3-linux-gnu/usr/lib/libpthread.so)?
> should I add something to my Makefile?
> Should I remove "-lpthread" parameter from my application Makefile?
>
This document explains how to create real-time POSIX applications with
Xenomai:
http://xenomai.org/2014/08/porting-a-linux-application-to-xenomai-dual-kernel/#Compilation_for_the_Xenomai_POSIX_skin
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] Using xenomai posix routines instead of Linux POSIX routines
2015-03-31 6:23 ` Sagi Maimon
@ 2015-03-31 7:04 ` Philippe Gerum
2015-03-31 7:16 ` Sagi Maimon
0 siblings, 1 reply; 5+ messages in thread
From: Philippe Gerum @ 2015-03-31 7:04 UTC (permalink / raw)
To: Sagi Maimon, xenomai@xenomai.org
On 03/31/2015 08:23 AM, Sagi Maimon wrote:
> Hi,
> thanks for the help.
> I have read the document, and the use of wrapper makes good sense.
> According to the document, when calling "pthread_create" (by using the XENO_POSIX_LIBS flags), it will call "__wrap_pthread_create" routine.
> But I am using Xenomai 2.6.4 , and there is no implementation of "__wrap_pthread_create" routine,
> instead there is implementation of "pthread_create" under kernel/xenomai/skins/posix/thread.c
>
> Can you please explain it?
Wrappers are implemented in user-space (see src/skins/posix).
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] Using xenomai posix routines instead of Linux POSIX routines
2015-03-31 7:04 ` Philippe Gerum
@ 2015-03-31 7:16 ` Sagi Maimon
0 siblings, 0 replies; 5+ messages in thread
From: Sagi Maimon @ 2015-03-31 7:16 UTC (permalink / raw)
To: Philippe Gerum, xenomai@xenomai.org
Thanks again.
-----Original Message-----
From: Philippe Gerum [mailto:rpm@xenomai.org]
Sent: Tuesday, March 31, 2015 10:05
To: Sagi Maimon; xenomai@xenomai.org
Subject: Re: [Xenomai] Using xenomai posix routines instead of Linux POSIX routines
On 03/31/2015 08:23 AM, Sagi Maimon wrote:
> Hi,
> thanks for the help.
> I have read the document, and the use of wrapper makes good sense.
> According to the document, when calling "pthread_create" (by using the XENO_POSIX_LIBS flags), it will call "__wrap_pthread_create" routine.
> But I am using Xenomai 2.6.4 , and there is no implementation of
> "__wrap_pthread_create" routine, instead there is implementation of
> "pthread_create" under kernel/xenomai/skins/posix/thread.c
>
> Can you please explain it?
Wrappers are implemented in user-space (see src/skins/posix).
--
Philippe.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-31 7:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-30 13:40 [Xenomai] Using xenomai posix routines instead of Linux POSIX routines Sagi Maimon
2015-03-30 13:49 ` Philippe Gerum
2015-03-31 6:23 ` Sagi Maimon
2015-03-31 7:04 ` Philippe Gerum
2015-03-31 7:16 ` Sagi Maimon
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.