Example #1
0
int rt_heap_unbind(RT_HEAP *heap)
{
	int err = __real_munmap(heap->mapbase, heap->mapsize);

	if (err == -1)
		err = -errno;

	heap->opaque = XN_NO_HANDLE;
	heap->mapbase = NULL;
	heap->mapsize = 0;

	return err;
}
Example #2
0
int rt_queue_unbind(RT_QUEUE *q)
{
	int err = __real_munmap(q->mapbase, q->mapsize);

	if (err)	/* Most likely already deleted or unbound. */
		return -EINVAL;

	q->opaque = XN_NO_HANDLE;
	q->mapbase = NULL;
	q->mapsize = 0;

	return 0;
}