Motr
M0
|
Data Structures | |
struct | m0_fid |
struct | m0_fid_arr |
struct | m0_fid_type |
struct | m0_fid_item |
Macros | |
#define | FID_F "<%" PRIx64 ":%" PRIx64 ">" |
#define | FID_SF " < %" SCNx64 " : %" SCNx64 " > " |
#define | FID_P(f) (f)->f_container, (f)->f_key |
#define | FID_S(f) &(f)->f_container, &(f)->f_key |
#define | M0_FID_TCONTAINER(type, container) |
#define | M0_FID_INIT(container, key) |
#define | M0_FID_TINIT(type, container, key) M0_FID_INIT(M0_FID_TCONTAINER((type), (container)), (key)) |
#define | M0_FID0 M0_FID_INIT(0ULL, 0ULL) |
#define | M0_FID_BUF(fid) |
Enumerations | |
enum | { M0_FID_TYPE_MASK = 0x00ffffffffffffffULL, M0_FID_STR_LEN = 64 } |
Functions | |
M0_INTERNAL void | m0_fid_type_register (const struct m0_fid_type *fidt) |
M0_INTERNAL void | m0_fid_type_unregister (const struct m0_fid_type *fidt) |
M0_INTERNAL const struct m0_fid_type * | m0_fid_type_get (uint8_t id) |
M0_INTERNAL const struct m0_fid_type * | m0_fid_type_gethi (uint64_t id) |
M0_INTERNAL const struct m0_fid_type * | m0_fid_type_getfid (const struct m0_fid *fid) |
M0_INTERNAL const struct m0_fid_type * | m0_fid_type_getname (const char *name) |
M0_INTERNAL bool | m0_fid_is_valid (const struct m0_fid *fid) |
M0_INTERNAL bool | m0_fid_is_set (const struct m0_fid *fid) |
M0_INTERNAL void | m0_fid_set (struct m0_fid *fid, uint64_t container, uint64_t key) |
M0_INTERNAL void | m0_fid_tset (struct m0_fid *fid, uint8_t tid, uint64_t container, uint64_t key) |
M0_INTERNAL uint8_t | m0_fid_tget (const struct m0_fid *fid) |
M0_INTERNAL void | m0_fid_tchange (struct m0_fid *fid, uint8_t tid) |
M0_INTERNAL void | m0_fid_tassume (struct m0_fid *fid, const struct m0_fid_type *ft) |
M0_INTERNAL void | m0_fid_tgenerate (struct m0_fid *fid, const uint8_t tid) |
M0_INTERNAL bool | m0_fid_eq (const struct m0_fid *fid0, const struct m0_fid *fid1) |
M0_INTERNAL int | m0_fid_cmp (const struct m0_fid *fid0, const struct m0_fid *fid1) |
static int | fid_sscanf (const char *s, struct m0_fid *fid, int *nob) |
M0_INTERNAL int | m0_fid_sscanf (const char *s, struct m0_fid *fid) |
M0_INTERNAL int | m0_fid_print (char *s, size_t s_len, const struct m0_fid *fid) |
static int | xt_read (const struct m0_xcode_cursor *it, struct m0_xcode_obj *obj, const char *str) |
M0_INTERNAL int | m0_fid_init (void) |
M0_INTERNAL void | m0_fid_fini (void) |
M0_INTERNAL uint64_t | m0_fid_hash (const struct m0_fid *fid) |
M0_INTERNAL int | m0_fid_arr_copy (struct m0_fid_arr *to, const struct m0_fid_arr *from) |
M0_INTERNAL bool | m0_fid_arr_eq (const struct m0_fid_arr *a, const struct m0_fid_arr *b) |
M0_INTERNAL bool | m0_fid_arr_all_unique (const struct m0_fid_arr *a) |
struct m0_fid | M0_XCA_DOMAIN (conf|rpc) |
M0_TL_DESCR_DEFINE (m0_fids, "m0_fid list", M0_INTERNAL, struct m0_fid_item, i_link, i_magic, M0_FID_MAGIC, M0_FID_HEAD_MAGIC) | |
M0_TL_DEFINE (m0_fids, M0_INTERNAL, struct m0_fid_item) | |
M0_TL_DESCR_DECLARE (m0_fids, M0_EXTERN) | |
M0_TL_DECLARE (m0_fids, M0_INTERNAL, struct m0_fid_item) | |
Variables | |
static const struct m0_fid_type * | fid_types [256] |
static const struct m0_fid_type | misc |
static const struct m0_xcode_type_ops | xt_ops |
enum { ... } | M0_XCA_DOMAIN |
#define M0_FID0 M0_FID_INIT(0ULL, 0ULL) |
#define M0_FID_BUF | ( | fid | ) |
#define M0_FID_TINIT | ( | type, | |
container, | |||
key | |||
) | M0_FID_INIT(M0_FID_TCONTAINER((type), (container)), (key)) |
anonymous enum |
|
static |
Parses fid string representation.
Three formats are supported:
* CONT:KEY, where CONT and KEY are in sexadecimal. * <CONT:KEY>, where CONT and KEY are in sexadecimal. * TYPE|CONT:KEY, where TYPE is a 1-character fid type (m0_fid_type::ft_id), CONT is the container sans type and KEY is the key (key and container are in %*i format: decimal by default, sexadecimal when start with 0x, octal when start with 0).
Definition at line 199 of file fid.c.
M0_INTERNAL bool m0_fid_arr_all_unique | ( | const struct m0_fid_arr * | a | ) |
M0_INTERNAL int m0_fid_arr_copy | ( | struct m0_fid_arr * | to, |
const struct m0_fid_arr * | from | ||
) |
M0_INTERNAL bool m0_fid_arr_eq | ( | const struct m0_fid_arr * | a, |
const struct m0_fid_arr * | b | ||
) |
M0_INTERNAL void m0_fid_fini | ( | void | ) |
M0_INTERNAL uint64_t m0_fid_hash | ( | const struct m0_fid * | fid | ) |
M0_INTERNAL int m0_fid_init | ( | void | ) |
M0_INTERNAL bool m0_fid_is_set | ( | const struct m0_fid * | fid | ) |
M0_INTERNAL bool m0_fid_is_valid | ( | const struct m0_fid * | fid | ) |
M0_INTERNAL int m0_fid_print | ( | char * | s, |
size_t | s_len, | ||
const struct m0_fid * | fid | ||
) |
M0_INTERNAL void m0_fid_set | ( | struct m0_fid * | fid, |
uint64_t | container, | ||
uint64_t | key | ||
) |
M0_INTERNAL int m0_fid_sscanf | ( | const char * | s, |
struct m0_fid * | fid | ||
) |
M0_INTERNAL void m0_fid_tassume | ( | struct m0_fid * | fid, |
const struct m0_fid_type * | ft | ||
) |
M0_INTERNAL void m0_fid_tchange | ( | struct m0_fid * | fid, |
uint8_t | tid | ||
) |
M0_INTERNAL void m0_fid_tgenerate | ( | struct m0_fid * | fid, |
const uint8_t | tid | ||
) |
M0_INTERNAL uint8_t m0_fid_tget | ( | const struct m0_fid * | fid | ) |
M0_INTERNAL void m0_fid_tset | ( | struct m0_fid * | fid, |
uint8_t | tid, | ||
uint64_t | container, | ||
uint64_t | key | ||
) |
M0_INTERNAL const struct m0_fid_type * m0_fid_type_get | ( | uint8_t | id | ) |
M0_INTERNAL const struct m0_fid_type * m0_fid_type_getfid | ( | const struct m0_fid * | fid | ) |
M0_INTERNAL const struct m0_fid_type * m0_fid_type_gethi | ( | uint64_t | id | ) |
M0_INTERNAL const struct m0_fid_type * m0_fid_type_getname | ( | const char * | name | ) |
M0_INTERNAL void m0_fid_type_register | ( | const struct m0_fid_type * | fidt | ) |
M0_INTERNAL void m0_fid_type_unregister | ( | const struct m0_fid_type * | fidt | ) |
M0_TL_DECLARE | ( | m0_fids | , |
M0_INTERNAL | , | ||
struct m0_fid_item | |||
) |
M0_TL_DEFINE | ( | m0_fids | , |
M0_INTERNAL | , | ||
struct m0_fid_item | |||
) |
M0_TL_DESCR_DECLARE | ( | m0_fids | , |
M0_EXTERN | |||
) |
M0_TL_DESCR_DEFINE | ( | m0_fids | , |
"m0_fid list" | , | ||
M0_INTERNAL | , | ||
struct m0_fid_item | , | ||
i_link | , | ||
i_magic | , | ||
M0_FID_MAGIC | , | ||
M0_FID_HEAD_MAGIC | |||
) |
|
static |
m0_xcode_type_ops::xto_read() implementation for fids.
Parses fids in xcode-readable strings.
Definition at line 263 of file fid.c.
|
static |
enum { ... } M0_XCA_DOMAIN |
|
static |