Nathaniel J Villaume wrote:
> Hi,
>
> I have a simple user-space program (see below) that tries to
> create a heap. If the heap already exists, then the program tries
> to delete it. I have no other threads binding to the heap.
>
> I can create, but not delete the heap. The error returned is
> -EPERM. According to the API manual, this means the call occurred
> in an asynchronous context. What does this mean, exactly? How
> should I delete this heap?
>
> Any advice?
You should not try and delete a heap if you did not succeed in creating
or binding it. The contents of the RT_HEAP object are uninitialized
when rt_heap_create fails, rt_heap_delete call munmap passing the
contents of this uninitialized object, and munmap returns -1 with errno
set to EINVAL. rt_heap_delete should be fixed to return -errno in this
case, but you should bind the heap before deleting it.
--
Gilles Chanteperdrix.
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help