Line data Source code
1 : #ifndef HEADER_fd_src_util_tmpl_fd_map_h 2 : #define HEADER_fd_src_util_tmpl_fd_map_h 3 : 4 : #include "../fd_util_base.h" 5 : 6 : /* Common map error codes (FIXME: probably should get around to making 7 : unified error codes, error strings and/or flags across util at least 8 : so we don't have to do this in the generator itself) */ 9 : 10 119307183 : #define FD_MAP_SUCCESS (0) 11 12406773 : #define FD_MAP_ERR_INVAL (-1) 12 19523346 : #define FD_MAP_ERR_AGAIN (-2) 13 28503075 : #define FD_MAP_ERR_CORRUPT (-3) 14 3747417 : #define FD_MAP_ERR_EMPTY (-4) 15 12 : #define FD_MAP_ERR_FULL (-5) 16 25540398 : #define FD_MAP_ERR_KEY (-6) 17 : 18 : /* Common map flags (note that different maps support different subsets 19 : of these flags) */ 20 : 21 153446706 : #define FD_MAP_FLAG_BLOCKING (1<<0) 22 6770184 : #define FD_MAP_FLAG_ADAPTIVE (1<<1) 23 235982877 : #define FD_MAP_FLAG_USE_HINT (1<<2) 24 : #define FD_MAP_FLAG_PREFETCH_NONE (0<<3) 25 : #define FD_MAP_FLAG_PREFETCH_META (1<<3) 26 : #define FD_MAP_FLAG_PREFETCH_DATA (2<<3) 27 : #define FD_MAP_FLAG_PREFETCH (3<<3) 28 101232333 : #define FD_MAP_FLAG_RDONLY (1<<5) 29 : 30 : struct fd_map_chain_iter { /* FIXME: why is this here? */ 31 : ulong chain_rem; 32 : ulong ele_idx; 33 : }; 34 : 35 : FD_PROTOTYPES_BEGIN 36 : 37 : FD_FN_CONST char const * 38 : fd_map_strerror( int err ); 39 : 40 : FD_PROTOTYPES_END 41 : 42 : #endif /* HEADER_fd_src_util_tmpl_fd_map_h */