rt_heap_create failure in user space
dmitry.adamushko at datacon.at
Fri Aug 12 13:51:51 CEST 2005
> Hi, list,
> I am trying to create shared memory in user space by using
> but it fails with errno: No such file or directory.
> The returned error code is -2 (ENOENT), which is very strange since it
> should not be returned by the function according to API doc.
> Nothing special in my code, see below
static int __map_heap_memory (RT_HEAP *heap, RT_HEAP_PLACEHOLDER *php)
int err, heapfd;
/* Open the heap device to share the heap memory with the
in-kernel skin and bound clients. */
heapfd = open(XNHEAP_DEV_NAME,O_RDWR);
if (heapfd < 0)
This routine, in turn, is called from rt_heap_create() in the same file.
That's how -ENOENT comes.
The reason, as you might have already guessed, is the absence of the proper
character device file.
#define XNHEAP_DEV_NAME "/dev/rtheap"
At first, run "make devices" from a fusion's source directory or extract
the corresponding code and run it manualy in case there is no source
directory on the target system. Then run your program.
> Best regards,
> Zhang Yuchen
> MSc Student
> Control Engineering Group
> University of Twente
> The Netherlands
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Rtai