All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Perrine Martignoni <perrmart@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Question about rtdm_mmap_to_user()
Date: Thu, 03 Apr 2008 15:07:24 +0200	[thread overview]
Message-ID: <47F4D68C.6020208@domain.hid> (raw)
In-Reply-To: <7289437c0804030552q79d1bb84jf5f40d1a57a443b5@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

Perrine Martignoni wrote:
>> Why don't you try rt_heap_* functions? Quick example:
>>
>> Kernel space:
>>
>> RT_HEAP heap_desc;
>> void *shared;
>>
>> rt_heap_create (&heap_desc, "MySHM", 2048, H_SHARED);
>> rt_heap_alloc (&heap_desc, 0, TM_NONBLOCK, &shared);
>> [.. cleanup ..]
>> rt_heap_delete (&heap_desc);
>> User space:
>>
>> RT_HEAP heap_desc;
>> void *shared;
>>
>> rt_heap_bind (&heap_desc, "MySHM", TM_NONBLOCK);
>> rt_heap_alloc (&heap_desc, 0, TM_NONBLOCK, &shared);
>> [..cleanup..]
>> rt_heap_unbind (&heap_desc);
> 
> I tried exactly what you wrote. And it doesn't work. I have error -11. It
> doesn't find the Heap I created in kernel space.
> I don't understand why. I put exactly the same name.

Mixing up RTDM and native API usage, though technically feasible, isn't 
a good idea anyway. Better have a look at Hannes' example, and if that 
one or your own version still doesn't work, post more details (Xenomai 
version, target architecture, test code, etc.).

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

  reply	other threads:[~2008-04-03 13:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-03  9:46 [Xenomai-help] Question about rtdm_mmap_to_user() Perrine Martignoni
2008-04-03 10:00 ` Bosko Radivojevic
2008-04-03 12:52   ` Perrine Martignoni
2008-04-03 13:07     ` Jan Kiszka [this message]
2008-04-04  7:18     ` Bosko Radivojevic
2008-04-04 12:59       ` Perrine Martignoni
2008-04-04 13:04         ` Gilles Chanteperdrix
2008-04-03 13:42   ` Gilles Chanteperdrix
2008-04-03 14:34     ` Perrine Martignoni
2008-04-03 16:25       ` Philippe Gerum
2008-04-03 10:07 ` Hannes Mayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47F4D68C.6020208@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=perrmart@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.