25 #if !defined (_RTEMS_RFS_BITMAPS_H_) 26 #define _RTEMS_RFS_BITMAPS_H_ 37 #define RTEMS_RFS_BITMAP_CLEAR_ZERO 0 39 #if RTEMS_RFS_BITMAP_CLEAR_ZERO 43 #define RTEMS_RFS_BITMAP_BIT_CLEAR 0 44 #define RTEMS_RFS_BITMAP_BIT_SET 1 45 #define RTEMS_RFS_BITMAP_ELEMENT_SET (RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK) 46 #define RTEMS_RFS_BITMAP_ELEMENT_CLEAR (0) 47 #define RTEMS_RFS_BITMAP_SET_BITS(_t, _b) ((_t) | (_b)) 48 #define RTEMS_RFS_BITMAP_CLEAR_BITS(_t, _b) ((_t) & ~(_b)) 49 #define RTEMS_RFS_BITMAP_TEST_BIT(_t, _b) (((_t) & (1 << (_b))) != 0 ? true : false) 54 #define RTEMS_RFS_BITMAP_BIT_CLEAR 1 55 #define RTEMS_RFS_BITMAP_BIT_SET 0 56 #define RTEMS_RFS_BITMAP_ELEMENT_SET (0) 57 #define RTEMS_RFS_BITMAP_ELEMENT_CLEAR (RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK) 58 #define RTEMS_RFS_BITMAP_SET_BITS(_t, _b) ((_t) & ~(_b)) 59 #define RTEMS_RFS_BITMAP_CLEAR_BITS(_t, _b) ((_t) | (_b)) 60 #define RTEMS_RFS_BITMAP_TEST_BIT(_t, _b) (((_t) & (1 << (_b))) == 0 ? true : false) 66 #define RTEMS_RFS_BITMAP_INVERT_MASK(_mask) (~(_mask)) 73 #define RTEMS_RFS_BITMAP_ELEMENT_FULL_MASK (0xffffffffUL) 79 #define RTEMS_RFS_BITMAP_SEARCH_WINDOW (rtems_rfs_bitmap_element_bits () * 64) 94 #define RTEMS_RFS_ELEMENT_BITS_POWER_2 (5) 120 #define rtems_rfs_bitmap_numof_bits(_bytes) (8 * (_bytes)) 126 #define rtems_rfs_bitmap_element_bits() \ 127 rtems_rfs_bitmap_numof_bits (sizeof (rtems_rfs_bitmap_element)) 132 #define rtems_rfs_bitmap_search_element_bits() \ 133 (rtems_rfs_bitmap_element_bits() * rtems_rfs_bitmap_element_bits()) 138 #define rtems_rfs_bitmap_elements(_bits) \ 139 ((((_bits) - 1) / rtems_rfs_bitmap_element_bits()) + 1) 144 #define rtems_rfs_bitmap_release_buffer(_fs, _bm) \ 145 rtems_rfs_buffer_handle_release (_fs, (_bm)->buffer) 155 #define rtems_rfs_bitmap_map_index(_b) \ 156 ((_b) >> RTEMS_RFS_ELEMENT_BITS_POWER_2) 162 #define rtems_rfs_bitmap_map_offset(_b) \ 163 ((_b) & ((1 << RTEMS_RFS_ELEMENT_BITS_POWER_2) - 1)) 168 #define rtems_rfs_bitmap_map_size(_c) ((_c)->size) 173 #define rtems_rfs_bitmap_map_free(_c) ((_c)->free) 178 #define rtems_rfs_bitmap_map_handle(_c) ((_c)->buffer) 183 #define rtems_rfs_bitmap_map_block(_c) ((_c)->block) int rtems_rfs_bitmap_map_alloc(rtems_rfs_bitmap_control *control, rtems_rfs_bitmap_bit seed, bool *allocate, rtems_rfs_bitmap_bit *bit)
Definition: rtems-rfs-bitmaps.c:509
rtems_rfs_bitmap_element rtems_rfs_bitmap_mask(unsigned int size)
Definition: rtems-rfs-bitmaps.c:167
int rtems_rfs_bitmap_map_clear(rtems_rfs_bitmap_control *control, rtems_rfs_bitmap_bit bit)
Definition: rtems-rfs-bitmaps.c:229
int32_t rtems_rfs_bitmap_bit
Definition: rtems-rfs-bitmaps.h:84
int rtems_rfs_bitmap_map_test(rtems_rfs_bitmap_control *control, rtems_rfs_bitmap_bit bit, bool *state)
Definition: rtems-rfs-bitmaps.c:270
Definition: rtems-rfs-bitmaps.h:104
Definition: rtems-rfs-file-system.h:123
uint32_t rtems_rfs_buffer_block
Definition: rtems-rfs-buffer.h:62
int rtems_rfs_bitmap_create_search(rtems_rfs_bitmap_control *control)
Definition: rtems-rfs-bitmaps.c:585
rtems_rfs_bitmap_element * rtems_rfs_bitmap_map
Definition: rtems-rfs-bitmaps.h:99
rtems_rfs_bitmap_element rtems_rfs_bitmap_mask_section(unsigned int start, unsigned int end)
Definition: rtems-rfs-bitmaps.c:175
Manages the Trace and Debugging Features of the RTEMS RFS File System.
int rtems_rfs_bitmap_map_clear_all(rtems_rfs_bitmap_control *control)
Definition: rtems-rfs-bitmaps.c:317
int rtems_rfs_bitmap_close(rtems_rfs_bitmap_control *control)
Definition: rtems-rfs-bitmaps.c:671
int rtems_rfs_bitmap_map_set_all(rtems_rfs_bitmap_control *control)
Definition: rtems-rfs-bitmaps.c:288
Definition: intercom.c:74
int rtems_rfs_bitmap_open(rtems_rfs_bitmap_control *control, rtems_rfs_file_system *fs, rtems_rfs_buffer_handle *buffer, size_t size, rtems_rfs_buffer_block block)
Definition: rtems-rfs-bitmaps.c:648
uint32_t rtems_rfs_bitmap_element
Definition: rtems-rfs-bitmaps.h:89
int rtems_rfs_bitmap_map_set(rtems_rfs_bitmap_control *control, rtems_rfs_bitmap_bit bit)
Definition: rtems-rfs-bitmaps.c:184
Maps Blocks to the Media Interface Layers.
Definition: rtems-rfs-buffer.h:91
RTEMS File Systems Data Forward Declaration.
struct rtems_rfs_bitmap_control_s rtems_rfs_bitmap_control
unsigned size
Definition: tte.h:74