CUBRID Engine  latest
bit.h File Reference
#include "system.h"
Include dependency graph for bit.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define BIT8_FULL   ((UINT8) 0xFF)
 
#define BIT16_FULL   ((UINT16) 0xFFFF)
 
#define BIT32_FULL   ((UINT32) 0xFFFFFFFF)
 
#define BIT64_FULL   ((UINT64) 0xFFFFFFFFFFFFFFFF)
 
#define BIT8_HEXA_PRINT_FORMAT   "0x%02x"
 
#define BIT16_HEXA_PRINT_FORMAT   "0x%04x"
 
#define BIT32_HEXA_PRINT_FORMAT   "0x%08x"
 
#define BIT64_HEXA_PRINT_FORMAT   "0x%016llx"
 

Functions

int bit8_count_ones (UINT8 i)
 
int bit8_count_zeros (UINT8 i)
 
int bit8_count_trailing_ones (UINT8 i)
 
int bit8_count_trailing_zeros (UINT8 i)
 
int bit8_count_leading_ones (UINT8 i)
 
int bit8_count_leading_zeros (UINT8 i)
 
bool bit8_is_set (UINT8 i, int off)
 
UINT8 bit8_set (UINT8 i, int off)
 
UINT8 bit8_clear (UINT8 i, int off)
 
UINT8 bit8_set_trailing_bits (UINT8 i, int n)
 
int bit16_count_ones (UINT16 i)
 
int bit16_count_zeros (UINT16 i)
 
int bit16_count_trailing_ones (UINT16 i)
 
int bit16_count_trailing_zeros (UINT16 i)
 
int bit16_count_leading_ones (UINT16 i)
 
int bit16_count_leading_zeros (UINT16 i)
 
bool bit16_is_set (UINT16 i, int off)
 
UINT16 bit16_set (UINT16 i, int off)
 
UINT16 bit16_clear (UINT16 i, int off)
 
UINT16 bit16_set_trailing_bits (UINT16 i, int n)
 
int bit32_count_ones (UINT32 i)
 
int bit32_count_zeros (UINT32 i)
 
int bit32_count_trailing_ones (UINT32 i)
 
int bit32_count_trailing_zeros (UINT32 i)
 
int bit32_count_leading_ones (UINT32 i)
 
int bit32_count_leading_zeros (UINT32 i)
 
bool bit32_is_set (UINT32 i, int off)
 
UINT32 bit32_set (UINT32 i, int off)
 
UINT32 bit32_clear (UINT32 i, int off)
 
UINT32 bit32_set_trailing_bits (UINT32 i, int n)
 
int bit64_count_ones (UINT64 i)
 
int bit64_count_zeros (UINT64 i)
 
int bit64_count_trailing_ones (UINT64 i)
 
int bit64_count_trailing_zeros (UINT64 i)
 
int bit64_count_leading_ones (UINT64 i)
 
int bit64_count_leading_zeros (UINT64 i)
 
bool bit64_is_set (UINT64 i, int off)
 
UINT64 bit64_set (UINT64 i, int off)
 
UINT64 bit64_clear (UINT64 i, int off)
 
UINT64 bit64_set_trailing_bits (UINT64 i, int n)
 

Macro Definition Documentation

#define BIT16_FULL   ((UINT16) 0xFFFF)

Definition at line 31 of file bit.h.

#define BIT16_HEXA_PRINT_FORMAT   "0x%04x"

Definition at line 36 of file bit.h.

#define BIT32_FULL   ((UINT32) 0xFFFFFFFF)

Definition at line 32 of file bit.h.

#define BIT32_HEXA_PRINT_FORMAT   "0x%08x"

Definition at line 37 of file bit.h.

#define BIT64_FULL   ((UINT64) 0xFFFFFFFFFFFFFFFF)
#define BIT64_HEXA_PRINT_FORMAT   "0x%016llx"

Definition at line 38 of file bit.h.

Referenced by disk_rv_reserve_sectors(), and disk_rv_unreserve_sectors().

#define BIT8_FULL   ((UINT8) 0xFF)

Definition at line 30 of file bit.h.

#define BIT8_HEXA_PRINT_FORMAT   "0x%02x"

Definition at line 35 of file bit.h.

Function Documentation

UINT16 bit16_clear ( UINT16  i,
int  off 
)

Definition at line 284 of file bit.c.

References assert, and i.

int bit16_count_leading_ones ( UINT16  i)

Definition at line 263 of file bit.c.

References bit16_count_leading_zeros().

int bit16_count_leading_zeros ( UINT16  i)

Definition at line 226 of file bit.c.

Referenced by bit16_count_leading_ones().

Here is the caller graph for this function:

int bit16_count_ones ( UINT16  i)

Definition at line 173 of file bit.c.

References byte_ones.

Referenced by main().

Here is the caller graph for this function:

int bit16_count_trailing_ones ( UINT16  i)

Definition at line 220 of file bit.c.

References bit16_count_trailing_zeros().

Referenced by main().

Here is the caller graph for this function:

int bit16_count_trailing_zeros ( UINT16  i)

Definition at line 187 of file bit.c.

References i.

Referenced by bit16_count_trailing_ones(), and main().

Here is the caller graph for this function:

int bit16_count_zeros ( UINT16  i)

Definition at line 180 of file bit.c.

References byte_zeros.

Referenced by main().

Here is the caller graph for this function:

bool bit16_is_set ( UINT16  i,
int  off 
)

Definition at line 269 of file bit.c.

References assert.

UINT16 bit16_set ( UINT16  i,
int  off 
)

Definition at line 276 of file bit.c.

References assert, and i.

UINT16 bit16_set_trailing_bits ( UINT16  i,
int  n 
)

Definition at line 292 of file bit.c.

References assert.

UINT32 bit32_clear ( UINT32  i,
int  off 
)

Definition at line 431 of file bit.c.

References assert, and i.

int bit32_count_leading_ones ( UINT32  i)

Definition at line 410 of file bit.c.

References bit32_count_leading_zeros().

int bit32_count_leading_zeros ( UINT32  i)

Definition at line 368 of file bit.c.

Referenced by bit32_count_leading_ones().

Here is the caller graph for this function:

int bit32_count_ones ( UINT32  i)

Definition at line 304 of file bit.c.

Referenced by bit32_count_zeros(), and main().

Here is the caller graph for this function:

int bit32_count_trailing_ones ( UINT32  i)

Definition at line 362 of file bit.c.

References bit32_count_trailing_zeros().

Referenced by main().

Here is the caller graph for this function:

int bit32_count_trailing_zeros ( UINT32  i)

Definition at line 319 of file bit.c.

References i.

Referenced by bit32_count_trailing_ones(), and main().

Here is the caller graph for this function:

int bit32_count_zeros ( UINT32  i)

Definition at line 313 of file bit.c.

References bit32_count_ones().

Referenced by main().

Here is the caller graph for this function:

bool bit32_is_set ( UINT32  i,
int  off 
)

Definition at line 416 of file bit.c.

References assert.

UINT32 bit32_set ( UINT32  i,
int  off 
)

Definition at line 423 of file bit.c.

References assert, and i.

UINT32 bit32_set_trailing_bits ( UINT32  i,
int  n 
)

Definition at line 439 of file bit.c.

References assert.

UINT64 bit64_clear ( UINT64  i,
int  off 
)

Definition at line 587 of file bit.c.

References assert, and i.

Referenced by disk_check(), disk_stab_cursor_clear_bit(), and file_partsect_clear_bit().

Here is the caller graph for this function:

int bit64_count_leading_ones ( UINT64  i)

Definition at line 566 of file bit.c.

References bit64_count_leading_zeros().

int bit64_count_leading_zeros ( UINT64  i)

Definition at line 519 of file bit.c.

Referenced by bit64_count_leading_ones().

Here is the caller graph for this function:

int bit64_count_ones ( UINT64  i)

Definition at line 451 of file bit.c.

Referenced by bit64_count_zeros(), disk_rv_reserve_sectors(), disk_rv_unreserve_sectors(), and main().

Here is the caller graph for this function:

int bit64_count_trailing_ones ( UINT64  i)

Definition at line 513 of file bit.c.

References bit64_count_trailing_zeros().

Referenced by disk_stab_unit_reserve(), file_partsect_alloc(), and main().

Here is the caller graph for this function:

int bit64_count_trailing_zeros ( UINT64  i)

Definition at line 466 of file bit.c.

References i.

Referenced by bit64_count_trailing_ones(), and main().

Here is the caller graph for this function:

int bit64_count_zeros ( UINT64  i)

Definition at line 460 of file bit.c.

References bit64_count_ones().

Referenced by disk_stab_count_free(), and main().

Here is the caller graph for this function:

bool bit64_is_set ( UINT64  i,
int  off 
)

Definition at line 572 of file bit.c.

References assert.

Referenced by disk_check(), disk_stab_cursor_is_bit_set(), and file_partsect_is_bit_set().

Here is the caller graph for this function:

UINT64 bit64_set ( UINT64  i,
int  off 
)

Definition at line 579 of file bit.c.

References assert, and i.

Referenced by disk_stab_cursor_set_bit(), disk_stab_unit_check_reserved(), disk_stab_unit_reserve(), disk_stab_unit_unreserve(), and file_partsect_set_bit().

Here is the caller graph for this function:

UINT64 bit64_set_trailing_bits ( UINT64  i,
int  n 
)

Definition at line 595 of file bit.c.

References assert.

Referenced by disk_check(), disk_rv_redo_init_map(), disk_stab_set_bits_contiguous(), and disk_stab_unit_reserve().

Here is the caller graph for this function:

UINT8 bit8_clear ( UINT8  i,
int  off 
)

Definition at line 153 of file bit.c.

References assert, and i.

int bit8_count_leading_ones ( UINT8  i)

Definition at line 132 of file bit.c.

References bit8_count_leading_zeros().

int bit8_count_leading_zeros ( UINT8  i)

Definition at line 100 of file bit.c.

Referenced by bit8_count_leading_ones().

Here is the caller graph for this function:

int bit8_count_ones ( UINT8  i)

Definition at line 51 of file bit.c.

References byte_ones, and i.

Referenced by main().

Here is the caller graph for this function:

int bit8_count_trailing_ones ( UINT8  i)

Definition at line 94 of file bit.c.

References bit8_count_trailing_zeros().

Referenced by main().

Here is the caller graph for this function:

int bit8_count_trailing_zeros ( UINT8  i)

Definition at line 65 of file bit.c.

References i.

Referenced by bit8_count_trailing_ones(), and main().

Here is the caller graph for this function:

int bit8_count_zeros ( UINT8  i)

Definition at line 58 of file bit.c.

References byte_zeros, and i.

Referenced by main().

Here is the caller graph for this function:

bool bit8_is_set ( UINT8  i,
int  off 
)

Definition at line 138 of file bit.c.

References assert.

UINT8 bit8_set ( UINT8  i,
int  off 
)

Definition at line 145 of file bit.c.

References assert, and i.

UINT8 bit8_set_trailing_bits ( UINT8  i,
int  n 
)

Definition at line 161 of file bit.c.

References assert.