Message-ID: <2ff1a98a0804030642i79cf9d98uce4034295d3e2d4d@domain.hid> Date: Thu, 3 Apr 2008 15:42:50 +0200 From: "Gilles Chanteperdrix" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <7289437c0804030246v7992ec23kedcc2c8b71dc14f8@domain.hid> Subject: Re: [Xenomai-help] Question about rtdm_mmap_to_user() List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Bosko Radivojevic Cc: xenomai-help On Thu, Apr 3, 2008 at 12:00 PM, Bosko Radivojevic 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); > > ============================================ > > Hope this helps :) This is a bad example. A good example would check the return values of the services called. -- Gilles