MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / queue_found_get

Function queue_found_get

bdb/queue.c:150–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148 sizeof(struct bdb_queue_found) == QUEUE_FOUND_LEN);
149
150const uint8_t *queue_found_get(struct bdb_queue_found *p_queue_found,
151 const uint8_t *p_buf, const uint8_t *p_buf_end)
152{
153 if (p_buf_end < p_buf || QUEUE_FOUND_LEN > (p_buf_end - p_buf))
154 return NULL;
155
156 p_buf = buf_get(&(p_queue_found->genid), sizeof(p_queue_found->genid),
157 p_buf, p_buf_end);
158 p_buf = buf_get(&(p_queue_found->data_len), sizeof(p_queue_found->data_len),
159 p_buf, p_buf_end);
160 p_buf = buf_get(&(p_queue_found->data_offset),
161 sizeof(p_queue_found->data_offset), p_buf, p_buf_end);
162 p_buf =
163 buf_get(&(p_queue_found->trans.num_fragments),
164 sizeof(p_queue_found->trans.num_fragments), p_buf, p_buf_end);
165 p_buf = buf_get(&(p_queue_found->epoch), sizeof(p_queue_found->epoch),
166 p_buf, p_buf_end);
167
168 return p_buf;
169}
170
171uint8_t *queue_found_put(const struct bdb_queue_found *p_queue_found,
172 uint8_t *p_buf, const uint8_t *p_buf_end)

Callers 5

bdb_queue_item_genidFunction · 0.85
bdb_queue_consume_intFunction · 0.85
bdb_queue_get_found_infoFunction · 0.85
bdb_queuedb_walkFunction · 0.85
bdb_queuedb_get_intFunction · 0.85

Calls 1

buf_getFunction · 0.85

Tested by

no test coverage detected