RTEMS: cpukit/libdl/rtl-bit-alloc.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
rtl-bit-alloc.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT (c) 2019 Chris Johns <chrisj@rtems.org>
3 *
4 * The license and distribution terms for this file may be
5 * found in the file LICENSE in this distribution or at
6 * http://www.rtems.org/license/LICENSE.
7 */
16#if !defined (_RTEMS_RTL_BIT_ALLOC_H_)
17#define _RTEMS_RTL_BIT_ALLOC_H_
18
19#include <rtems/rtl/rtl-fwd.h>
20#include <rtems/rtl/rtl-obj-fwd.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif /* __cplusplus */
25
29 typedef struct rtems_rtl_bit_alloc
30{
31 uint8_t* base;
32 size_t size;
33 uint32_t* bits;
34 size_t block_size;
35 size_t blocks;
36} rtems_rtl_bit_alloc;
37
48 rtems_rtl_bit_alloc* rtems_rtl_bit_alloc_open (void* base,
49 size_t size,
50 size_t block_size,
51 size_t used);
52
59void rtems_rtl_bit_alloc_close (rtems_rtl_bit_alloc* balloc);
60
70void* rtems_rtl_bit_alloc_balloc (rtems_rtl_bit_alloc* balloc, size_t size);
71
76void rtems_rtl_bit_alloc_bfree (rtems_rtl_bit_alloc* balloc, void* addr, size_t size);
77
78#ifdef __cplusplus
79}
80#endif /* __cplusplus */
81
82#endif
rtems_rtl_bit_alloc_open
rtems_rtl_bit_alloc * rtems_rtl_bit_alloc_open(void *base, size_t size, size_t block_size, size_t used)
Definition: rtl-bit-alloc.c:119
rtems_rtl_bit_alloc_bfree
void rtems_rtl_bit_alloc_bfree(rtems_rtl_bit_alloc *balloc, void *addr, size_t size)
Definition: rtl-bit-alloc.c:188
rtems_rtl_bit_alloc_balloc
void * rtems_rtl_bit_alloc_balloc(rtems_rtl_bit_alloc *balloc, size_t size)
Definition: rtl-bit-alloc.c:174
rtems_rtl_bit_alloc_close
void rtems_rtl_bit_alloc_close(rtems_rtl_bit_alloc *balloc)
Definition: rtl-bit-alloc.c:165
rtl-fwd.h
RTEMS Run-Time Linker ELF Headers.
rtl-obj-fwd.h
RTEMS Run-Time Linker ELF Headers.
rtems_rtl_bit_alloc
Definition: rtl-bit-alloc.h:30
rtems_rtl_bit_alloc::base
uint8_t * base
Definition: rtl-bit-alloc.h:31
rtems_rtl_bit_alloc::bits
uint32_t * bits
Definition: rtl-bit-alloc.h:33
rtems_rtl_bit_alloc::block_size
size_t block_size
Definition: rtl-bit-alloc.h:34
rtems_rtl_bit_alloc::blocks
size_t blocks
Definition: rtl-bit-alloc.h:35
rtems_rtl_bit_alloc::size
size_t size
Definition: rtl-bit-alloc.h:32