MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / bitmapTestBit

Function bitmapTestBit

src/cluster.cpp:3866–3870  ·  view source on GitHub ↗

Test bit 'pos' in a generic bitmap. Return 1 if the bit is set, * otherwise 0. */

Source from the content-addressed store, hash-verified

3864/* Test bit 'pos' in a generic bitmap. Return 1 if the bit is set,
3865 * otherwise 0. */
3866int bitmapTestBit(unsigned char *bitmap, int pos) {
3867 off_t byte = pos/8;
3868 int bit = pos&7;
3869 return (bitmap[byte] & (1<<bit)) != 0;
3870}
3871
3872/* Set the bit at position 'pos' in a bitmap. */
3873void bitmapSetBit(unsigned char *bitmap, int pos) {

Callers 6

clusterProcessPacketFunction · 0.85
clusterNodeSetSlotBitFunction · 0.85
clusterNodeClearSlotBitFunction · 0.85
clusterNodeGetSlotBitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected