18 #ifndef _XENOMAI_ALCHEMY_HEAP_H 19 #define _XENOMAI_ALCHEMY_HEAP_H 22 #include <alchemy/timer.h> 38 typedef struct RT_HEAP RT_HEAP;
78 char name[XNOBJECT_NAME_LEN];
96 const struct timespec *abs_timeout,
101 size_t size, RTIME timeout,
void **blockp)
105 alchemy_abs_timeout(timeout, &ts),
111 size_t size, RTIME timeout,
void **blockp)
115 alchemy_rel_timeout(timeout, &ts),
int mode
Creation mode flags as given to rt_heap_create().
Definition: heap.h:56
int rt_heap_delete(RT_HEAP *heap)
Delete a heap.
Definition: heap.c:309
int rt_heap_create(RT_HEAP *heap, const char *name, size_t heapsize, int mode)
Create a heap.
Definition: heap.c:215
static int rt_heap_alloc(RT_HEAP *heap, size_t size, RTIME timeout, void **blockp)
Allocate a block from a heap (with relative scalar timeout).
Definition: heap.h:110
int nwaiters
Number of tasks waiting for available memory in rt_heap_alloc().
Definition: heap.h:52
int rt_heap_free(RT_HEAP *heap, void *block)
Release a block to a heap.
Definition: heap.c:513
size_t heapsize
Size of heap (in bytes) as given to rt_heap_create().
Definition: heap.h:62
static int rt_heap_alloc_until(RT_HEAP *heap, size_t size, RTIME timeout, void **blockp)
Allocate a block from a heap (with absolute scalar timeout).
Definition: heap.h:100
size_t usablemem
Maximum amount of memory available from the heap.
Definition: heap.h:68
int rt_heap_alloc_timed(RT_HEAP *heap, size_t size, const struct timespec *abs_timeout, void **blockp)
Allocate a block from a heap.
Definition: heap.c:421
int rt_heap_unbind(RT_HEAP *heap)
Unbind from a heap.
Definition: heap.c:670
char name[XNOBJECT_NAME_LEN]
Name of heap.
Definition: heap.h:78
int rt_heap_bind(RT_HEAP *heap, const char *name, RTIME timeout)
Bind to a heap.
Definition: heap.c:648
size_t usedmem
Amount of heap memory currently consumed.
Definition: heap.h:74
Heap status descriptor.
Definition: heap.h:47
int rt_heap_inquire(RT_HEAP *heap, RT_HEAP_INFO *info)
Query heap status.
Definition: heap.c:579