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. */
| 1718 | * key (pass in a zero key to get the first unconsumed item). the caller is |
| 1719 | * responsible for freeing *fnddta. */ |
| 1720 | int 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 | |
| 1740 | static int bdb_queue_consume_int(bdb_state_type *bdb_state, tran_type *intran, |
| 1741 | int consumer, const void *prevfnd, int *bdberr) |
no test coverage detected