MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bitmapTestBit

Function bitmapTestBit

app/redis-6.2.6/src/cluster.c:3807–3811  ·  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

3805/* Test bit 'pos' in a generic bitmap. Return 1 if the bit is set,
3806 * otherwise 0. */
3807int bitmapTestBit(unsigned char *bitmap, int pos) {
3808 off_t byte = pos/8;
3809 int bit = pos&7;
3810 return (bitmap[byte] & (1<<bit)) != 0;
3811}
3812
3813/* Set the bit at position 'pos' in a bitmap. */
3814void 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