* [Xenomai-help] binding to memory heap from user space
@ 2006-02-20 10:55 Cedric Herreman
2006-02-20 13:00 ` Gilles Chanteperdrix
0 siblings, 1 reply; 4+ messages in thread
From: Cedric Herreman @ 2006-02-20 10:55 UTC (permalink / raw)
To: xenomai-help
[-- Attachment #1: Type: text/plain, Size: 699 bytes --]
Hello,
I have created a memory heap in the init_module routine of a kernel module :
rt_heap_create(&heap_data,"RT_LOG_HEAP",sizeof(ttv_log_data),H_FIFO|H_SHARED);
and
rt_heap_alloc(&heap_data,0,TM_NONBLOCK,&loc_ptr);
Both calls return succesful.
When i try to bind to this memory in an user space application :
rt_heap_bind(&rt_heap,"RT_LOG_HEAP",TM_NONBLOCK);
the call returns with error -2, this error does not seem to be documented (i test on all the constants defined in the html API docs, xenomai v2.0).
Can anyone give me a hint on what's wrong here ?
Cedric.
---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
[-- Attachment #2: Type: text/html, Size: 838 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-help] binding to memory heap from user space
2006-02-20 10:55 [Xenomai-help] binding to memory heap from user space Cedric Herreman
@ 2006-02-20 13:00 ` Gilles Chanteperdrix
2006-02-20 14:56 ` Cedric Herreman
0 siblings, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2006-02-20 13:00 UTC (permalink / raw)
To: Cedric Herreman; +Cc: xenomai-help
Cedric Herreman wrote:
> Hello,
>
> I have created a memory heap in the init_module routine of a kernel module :
> rt_heap_create(&heap_data,"RT_LOG_HEAP",sizeof(ttv_log_data),H_FIFO|H_SHARED);
> and
> rt_heap_alloc(&heap_data,0,TM_NONBLOCK,&loc_ptr);
> Both calls return succesful.
>
> When i try to bind to this memory in an user space application :
> rt_heap_bind(&rt_heap,"RT_LOG_HEAP",TM_NONBLOCK);
> the call returns with error -2, this error does not seem to be documented (i test on all the constants defined in the html API docs, xenomai v2.0).
>
> Can anyone give me a hint on what's wrong here ?
-2 is -ENOENT, no such file or directory.
You are probably missing the /dev/rtheap file. In order to create it,
run "make devices" with root privileges.
--
Gilles Chanteperdrix.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-help] binding to memory heap from user space
2006-02-20 13:00 ` Gilles Chanteperdrix
@ 2006-02-20 14:56 ` Cedric Herreman
2006-02-20 19:21 ` Philippe Gerum
0 siblings, 1 reply; 4+ messages in thread
From: Cedric Herreman @ 2006-02-20 14:56 UTC (permalink / raw)
To: xenomai-help
[-- Attachment #1: Type: text/plain, Size: 1429 bytes --]
Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org> wrote: Cedric Herreman wrote:
> Hello,
>
> I have created a memory heap in the init_module routine of a kernel module :
> rt_heap_create(&heap_data,"RT_LOG_HEAP",sizeof(ttv_log_data),H_FIFO|H_SHARED);
> and
> rt_heap_alloc(&heap_data,0,TM_NONBLOCK,&loc_ptr);
> Both calls return succesful.
>
> When i try to bind to this memory in an user space application :
> rt_heap_bind(&rt_heap,"RT_LOG_HEAP",TM_NONBLOCK);
> the call returns with error -2, this error does not seem to be documented (i test on all the constants defined in the html API docs, xenomai v2.0).
>
> Can anyone give me a hint on what's wrong here ?
-2 is -ENOENT, no such file or directory.
You are probably missing the /dev/rtheap file. In order to create it,
run "make devices" with root privileges.
Gilles Chanteperdrix.
Yes, i was. I added the file on the target system (doesn't have the src tree, so i can't "run make devices") like this :
mknod /dev/rtheap b 1 0
Now, it is giving me the error : -EPERM. The doc says the call is made from a context that cannot sleep (interrupt, non-realtime, scheduler locked). Is it not possible to link to shared mem from a non-realtime userspace application in this way ?
Cedric.
---------------------------------
Brings words and photos together (easily) with
PhotoMail - it's free and works with Yahoo! Mail.
[-- Attachment #2: Type: text/html, Size: 1793 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Xenomai-help] binding to memory heap from user space
2006-02-20 14:56 ` Cedric Herreman
@ 2006-02-20 19:21 ` Philippe Gerum
0 siblings, 0 replies; 4+ messages in thread
From: Philippe Gerum @ 2006-02-20 19:21 UTC (permalink / raw)
To: Cedric Herreman; +Cc: xenomai-help
Cedric Herreman wrote:
> */Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>/* wrote:
>
> Cedric Herreman wrote:
> > Hello,
> >
> > I have created a memory heap in the init_module routine of a
> kernel module :
> >
> rt_heap_create(&heap_data,"RT_LOG_HEAP",sizeof(ttv_log_data),H_FIFO|H_SHARED);
> > and
> > rt_heap_alloc(&heap_data,0,TM_NONBLOCK,&loc_ptr);
> > Both calls return succesful.
> >
> > When i try to bind to this memory in an user space application :
> > rt_heap_bind(&rt_heap,"RT_LOG_HEAP",TM_NONBLOCK);
> > the call returns with error -2, this error does not seem to be
> documented (i test on all the constants defined in the html API
> docs, xenomai v2.0).
> >
> > Can anyone give me a hint on what's wrong here ?
>
> -2 is -ENOENT, no such file or directory.
>
> You are probably missing the /dev/rtheap file. In order to create it,
> run "make devices" with root privileges.
>
> Gilles Chanteperdrix.
>
> Yes, i was. I added the file on the target system (doesn't have the src
> tree, so i can't "run make devices") like this :
> mknod /dev/rtheap b 1 0
mknod /dev/rtheap c 10 254
>
> Now, it is giving me the error : -EPERM. The doc says the call is made
> from a context that cannot sleep (interrupt, non-realtime, scheduler
> locked). Is it not possible to link to shared mem from a non-realtime
> userspace application in this way ?
>
> Cedric.
>
> ------------------------------------------------------------------------
> Brings words and photos together (easily) with
> PhotoMail
> <http://us.rd.yahoo.com/mail_us/taglines/PMall/*http://photomail.mail.yahoo.com>
> - it's free and works with Yahoo! Mail.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
--
Philippe.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-02-20 19:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-20 10:55 [Xenomai-help] binding to memory heap from user space Cedric Herreman
2006-02-20 13:00 ` Gilles Chanteperdrix
2006-02-20 14:56 ` Cedric Herreman
2006-02-20 19:21 ` Philippe Gerum
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.