RTEMS  5.0.0
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
23 extern "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;
37 
49  size_t size,
50  size_t block_size,
51  size_t used);
52 
60 
71 
76 void 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 Run-Time Linker ELF Headers.
uint8_t * base
Definition: rtl-bit-alloc.h:31
void rtems_rtl_bit_alloc_close(rtems_rtl_bit_alloc *balloc)
Definition: rtl-bit-alloc.c:165
void * rtems_rtl_bit_alloc_balloc(rtems_rtl_bit_alloc *balloc, size_t size)
Definition: rtl-bit-alloc.c:174
Definition: rtl-bit-alloc.h:29
uint32_t * bits
Definition: rtl-bit-alloc.h:33
size_t block_size
Definition: rtl-bit-alloc.h:34
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
size_t size
Definition: rtl-bit-alloc.h:32
struct rtems_rtl_bit_alloc rtems_rtl_bit_alloc
void rtems_rtl_bit_alloc_bfree(rtems_rtl_bit_alloc *balloc, void *addr, size_t size)
Definition: rtl-bit-alloc.c:188
RTEMS Run-Time Linker ELF Headers.
size_t blocks
Definition: rtl-bit-alloc.h:35