Motr  M0
Basic abstract data types

Data Structures

struct  m0_bitstring
 

Functions

struct m0_bitstring M0_XCA_DOMAIN (be)
 
M0_INTERNAL void * m0_bitstring_buf_get (struct m0_bitstring *c)
 
M0_INTERNAL uint32_t m0_bitstring_len_get (const struct m0_bitstring *c)
 
M0_INTERNAL void m0_bitstring_len_set (struct m0_bitstring *c, uint32_t len)
 
M0_INTERNAL int m0_bitstring_cmp (const struct m0_bitstring *c1, const struct m0_bitstring *m0)
 
M0_INTERNAL void m0_bitstring_copy (struct m0_bitstring *dst, const char *src, size_t count)
 
M0_INTERNAL struct m0_bitstringm0_bitstring_alloc (const char *name, size_t len)
 
M0_INTERNAL void m0_bitstring_free (struct m0_bitstring *c)
 

Detailed Description

Function Documentation

◆ m0_bitstring_alloc()

M0_INTERNAL struct m0_bitstring* m0_bitstring_alloc ( const char *  name,
size_t  len 
)

Alloc memory for a string of passed len and copy name to it.

Definition at line 48 of file bitstring.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_bitstring_buf_get()

M0_INTERNAL void* m0_bitstring_buf_get ( struct m0_bitstring c)

Get a pointer to the data in the bitstring. Data may be read or written here.

User is responsible for allocating large enough contiguous memory.

Definition at line 33 of file bitstring.c.

Here is the caller graph for this function:

◆ m0_bitstring_cmp()

M0_INTERNAL int m0_bitstring_cmp ( const struct m0_bitstring s1,
const struct m0_bitstring s2 
)

String-like compare: alphanumeric for the length of the shortest string. Shorter strings are "less" than matching longer strings. Bitstrings may contain embedded NULLs.

String-like compare: alphanumeric for the length of the shortest string. Shorter strings precede longer strings. Strings may contain embedded NULLs.

Definition at line 75 of file bitstring.c.

Here is the caller graph for this function:

◆ m0_bitstring_copy()

M0_INTERNAL void m0_bitstring_copy ( struct m0_bitstring dst,
const char *  src,
size_t  count 
)

Copy to .

Definition at line 63 of file bitstring.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_bitstring_free()

M0_INTERNAL void m0_bitstring_free ( struct m0_bitstring c)

Free memory of passed .

Definition at line 58 of file bitstring.c.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ m0_bitstring_len_get()

M0_INTERNAL uint32_t m0_bitstring_len_get ( const struct m0_bitstring c)

Report the bitstring length

Definition at line 38 of file bitstring.c.

Here is the caller graph for this function:

◆ m0_bitstring_len_set()

M0_INTERNAL void m0_bitstring_len_set ( struct m0_bitstring c,
uint32_t  len 
)

Set the bitstring valid length

Definition at line 43 of file bitstring.c.

Here is the caller graph for this function:

◆ M0_XCA_DOMAIN()

struct m0_bitstring M0_XCA_DOMAIN ( be  )