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

Function bdb_queue_get

bdb/queue.c:1720–1738  ·  view source on GitHub ↗

get the first item uncomsumed by this consumer number, AFTER the passed in * key (pass in a zero key to get the first unconsumed item). the caller is * responsible for freeing *fnddta. */

Source from the content-addressed store, hash-verified

1718 * key (pass in a zero key to get the first unconsumed item). the caller is
1719 * responsible for freeing *fnddta. */
1720int bdb_queue_get(bdb_state_type *bdb_state, tran_type *tran, int consumer,
1721 const struct bdb_queue_cursor *prevcursor,
1722 struct bdb_queue_found **fnd, size_t *fnddtalen,
1723 size_t *fnddtaoff, struct bdb_queue_cursor *fndcursor,
1724 long long *seq, int *bdberr)
1725{
1726 int rc;
1727
1728 BDB_READLOCK("bdb_queue_get");
1729 if (bdb_state->bdbtype == BDBTYPE_QUEUEDB)
1730 rc = bdb_queuedb_get(bdb_state, tran, consumer, prevcursor, fnd,
1731 fnddtalen, fnddtaoff, fndcursor, seq, bdberr);
1732 else
1733 rc = bdb_queue_get_int(bdb_state, consumer, prevcursor, (void **)fnd, fnddtalen,
1734 fnddtaoff, fndcursor, bdberr);
1735 BDB_RELLOCK();
1736
1737 return rc;
1738}
1739
1740static int bdb_queue_consume_int(bdb_state_type *bdb_state, tran_type *intran,
1741 int consumer, const void *prevfnd, int *bdberr)

Callers 1

dbq_getFunction · 0.85

Calls 2

bdb_queuedb_getFunction · 0.85
bdb_queue_get_intFunction · 0.85

Tested by

no test coverage detected