All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Xenomai RT user application- POSIX interface
@ 2012-06-22  1:57 Mohit Jandwani
  2012-06-22  7:13 ` Gilles Chanteperdrix
  2012-06-22  7:27 ` Gilles Chanteperdrix
  0 siblings, 2 replies; 6+ messages in thread
From: Mohit Jandwani @ 2012-06-22  1:57 UTC (permalink / raw)
  To: xenomai

Hello I am trying to develop a real time Ethercat master on xenomai on an
exynos board.While I am still stuck with installing xenomai(and plan to
give it all next week), I have run into some problems which I  have not
been able to find on the website anywhere.

I am trying to use the posix skin of xenomai(as I need the stdio functions
and socket functions) simply because of portability and the fact that I
don't have to install it(I can build it while building the kernel).What I
want to ask is:
If I use the sockets in posix skin , does that still guarantee real-time ?
Why is the socket interface not listed in the Posix API pdf ?
 If my code is still real-time does that means I can do file handling in
real time too?(because I can use local protocol family for reading files
through sockets)


Also I tried using the pthread file in the posix skin folder, I was unable
to include the functions
.Everytime I used pthread_mutex_init it gave me a implicit declaration of
function error
.I even tried using #include "posix/pthread" but it didn't work although my
eclipse clearly shows that the header file has been included.
(PS: I can include almost all other header files including the
posix/socket.h  without a problem).
Is this a bug? or am I doing something wrong?

-- 
Mohit Kumar
Third Year Student
Indian Institute of Technology,Delhi

He who can no longer pause to wonder and stand rapt in awe, is as good as
dead; his eyes are closed.
Albert Einstein

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

* Re: [Xenomai] Xenomai RT user application- POSIX interface
  2012-06-22  1:57 [Xenomai] Xenomai RT user application- POSIX interface Mohit Jandwani
@ 2012-06-22  7:13 ` Gilles Chanteperdrix
       [not found]   ` <CAHyVJywmT80V8WK=2ERmqfj+OXdjLjv4Hatu+8sonvZn0KJ+mA@mail.gmail.com>
  2012-06-22  7:27 ` Gilles Chanteperdrix
  1 sibling, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2012-06-22  7:13 UTC (permalink / raw)
  To: Mohit Jandwani; +Cc: xenomai

On 06/22/2012 03:57 AM, Mohit Jandwani wrote:
> Hello I am trying to develop a real time Ethercat master on xenomai on an
> exynos board.While I am still stuck with installing xenomai(and plan to
> give it all next week), I have run into some problems which I  have not
> been able to find on the website anywhere.
> 
> I am trying to use the posix skin of xenomai(as I need the stdio functions
> and socket functions) simply because of portability and the fact that I
> don't have to install it(I can build it while building the kernel).What I
> want to ask is:
> If I use the sockets in posix skin , does that still guarantee real-time ?
> Why is the socket interface not listed in the Posix API pdf ?
>  If my code is still real-time does that means I can do file handling in
> real time too?(because I can use local protocol family for reading files
> through sockets)

The sockets call in xenomai posix skin are implemented by the RTDM 
skin, you need an RTDM driver to implement them if you want real-time 
sockets. For instance, for real-time UDP or TCP sockets, you have to 
install RTnet, .

> 
> 
> Also I tried using the pthread file in the posix skin folder, I was unable
> to include the functions
> .Everytime I used pthread_mutex_init it gave me a implicit declaration of
> function error
> .I even tried using #include "posix/pthread" but it didn't work although my
> eclipse clearly shows that the header file has been included.
> (PS: I can include almost all other header files including the
> posix/socket.h  without a problem).
> Is this a bug? or am I doing something wrong?
> 

In order to compile applications using xenomai posix skin, see:
http://www.xenomai.org/index.php/Porting_POSIX_applications_to_Xenomai#Compilation_for_the_Xenomai_POSIX_skin

-- 
                                                                Gilles.


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

* Re: [Xenomai] Xenomai RT user application- POSIX interface
  2012-06-22  1:57 [Xenomai] Xenomai RT user application- POSIX interface Mohit Jandwani
  2012-06-22  7:13 ` Gilles Chanteperdrix
@ 2012-06-22  7:27 ` Gilles Chanteperdrix
  1 sibling, 0 replies; 6+ messages in thread
From: Gilles Chanteperdrix @ 2012-06-22  7:27 UTC (permalink / raw)
  To: Mohit Jandwani; +Cc: xenomai

On 06/22/2012 03:57 AM, Mohit Jandwani wrote:
> Hello I am trying to develop a real time Ethercat master on xenomai on an
> exynos board.While I am still stuck with installing xenomai(and plan to
> give it all next week), I have run into some problems which I  have not
> been able to find on the website anywhere.
> 
> I am trying to use the posix skin of xenomai(as I need the stdio functions
> and socket functions) simply because of portability and the fact that I
> don't have to install it(I can build it while building the kernel).What I
> want to ask is:

Whatever skin you use, you have to enable it in xenomai kernel
configuration, and you have to install xenomai user-space support by
running "make DESTDIR=/some/dir", which installs headers and libraries
for all skins. Then you can start building applications using this skin
by getting flags with xeno-config. So, the posix skin is not different
from any other skin.

-- 
                                                                Gilles.


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

* Re: [Xenomai] Xenomai RT user application- POSIX interface
       [not found]   ` <CAHyVJywmT80V8WK=2ERmqfj+OXdjLjv4Hatu+8sonvZn0KJ+mA@mail.gmail.com>
@ 2012-06-22  8:44     ` Gilles Chanteperdrix
  2012-06-23  2:28       ` Mohit Jandwani
  0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2012-06-22  8:44 UTC (permalink / raw)
  To: Mohit Jandwani; +Cc: Xenomai

On 06/22/2012 09:33 AM, Mohit Jandwani wrote:
> I am not able to install the rtnet because of the posix skin, I saw one of
> your posts on which you looked at the problem and in the end some person
> named jan gave a patch
> 
> http://www.mail-archive.com/rtnet-users@lists.sourceforge.net/msg02981.html

I do not see any relation in this message with xenomai posix skin.

> 
> but it is not working.Anyways I need a simple solution as I will have to
> reproduce this on my exynos board.I am using the makefile they gave for
> compiling the examples.It works fine in native skin.I have already tested a
> few simple example codes and my own code on that.
> I have read that rtnet has socket interface of its own.I just want to
> implement a raw socket(n need only socket and ioctl).Do you recommend I
> reinstall xenomai with posix skin as module
> Also is there any support for function like memcpy or memset(in string.h)
> or will I have to write my own functions?
> Thanks a lot for your continued help..you are a life saver!
> 

When writing applications for xenomai posix skin, the whole glibc is
avaiable. Only a few functions are substituted with xenomai specific
real-time services.

Anyway, I do not understand what you are trying to do and what fails.

Could you show us the code using the posix skin you are trying to
compile, with the makefile you use, so that we are able to investigate
the issue you face? Have you read the "porting posix applications to
xenomai" guide, in order to understand how to use xenomai posix skin?

Please no private mails.

Regards.

-- 
					    Gilles.


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

* Re: [Xenomai] Xenomai RT user application- POSIX interface
  2012-06-22  8:44     ` Gilles Chanteperdrix
@ 2012-06-23  2:28       ` Mohit Jandwani
  2012-06-23 11:09         ` Gilles Chanteperdrix
  0 siblings, 1 reply; 6+ messages in thread
From: Mohit Jandwani @ 2012-06-23  2:28 UTC (permalink / raw)
  To: xenomai

Ok I got it figured out..but one thing where I am still stuck is-
does using files like string.h(functions like memcpy memset) which are in
the glibc make system calls?
(cause from porting POSIX to xenomai i think they don't).
n srry abt the personal mail I just clicked on reply n it sent it to u.

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

* Re: [Xenomai] Xenomai RT user application- POSIX interface
  2012-06-23  2:28       ` Mohit Jandwani
@ 2012-06-23 11:09         ` Gilles Chanteperdrix
  0 siblings, 0 replies; 6+ messages in thread
From: Gilles Chanteperdrix @ 2012-06-23 11:09 UTC (permalink / raw)
  To: Mohit Jandwani; +Cc: xenomai

On 06/23/2012 04:28 AM, Mohit Jandwani wrote:
> Ok I got it figured out..but one thing where I am still stuck is-
> does using files like string.h(functions like memcpy memset) which are in
> the glibc make system calls?
> (cause from porting POSIX to xenomai i think they don't).

You got it right.

-- 
                                                                Gilles.


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

end of thread, other threads:[~2012-06-23 11:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-22  1:57 [Xenomai] Xenomai RT user application- POSIX interface Mohit Jandwani
2012-06-22  7:13 ` Gilles Chanteperdrix
     [not found]   ` <CAHyVJywmT80V8WK=2ERmqfj+OXdjLjv4Hatu+8sonvZn0KJ+mA@mail.gmail.com>
2012-06-22  8:44     ` Gilles Chanteperdrix
2012-06-23  2:28       ` Mohit Jandwani
2012-06-23 11:09         ` Gilles Chanteperdrix
2012-06-22  7:27 ` 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.