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

Function queue_found_put

bdb/queue.c:171–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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)
173{
174 if (p_buf_end < p_buf || QUEUE_FOUND_LEN > (p_buf_end - p_buf))
175 return NULL;
176
177 p_buf = buf_put(&(p_queue_found->genid), sizeof(p_queue_found->genid),
178 p_buf, p_buf_end);
179 p_buf = buf_put(&(p_queue_found->data_len), sizeof(p_queue_found->data_len),
180 p_buf, p_buf_end);
181 p_buf = buf_put(&(p_queue_found->data_offset),
182 sizeof(p_queue_found->data_offset), p_buf, p_buf_end);
183 p_buf =
184 buf_put(&(p_queue_found->trans.num_fragments),
185 sizeof(p_queue_found->trans.num_fragments), p_buf, p_buf_end);
186 p_buf = buf_put(&(p_queue_found->epoch), sizeof(p_queue_found->epoch),
187 p_buf, p_buf_end);
188
189 return p_buf;
190}
191
192enum { QUEUE_FOUND_SEQ_LEN = 8 + 4 + 4 + 4 + 4 + 4 + 4 };
193

Callers 2

bdb_queue_get_intFunction · 0.85
bdb_queuedb_addFunction · 0.85

Calls 1

buf_putFunction · 0.85

Tested by

no test coverage detected