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

Method addref

src/server.h:990–990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

988 void setrefcount(unsigned ref);
989 unsigned getrefcount(std::memory_order order = std::memory_order_relaxed) const { return (refcount.load(order) & ~(1U << 31)); }
990 void addref() const { refcount.fetch_add(1, std::memory_order_relaxed); }
991 unsigned release() const { return refcount.fetch_sub(1, std::memory_order_seq_cst) & ~(1U << 31); }
992} robj;
993static_assert(sizeof(redisObject) <= 24, "object size is critical, don't increase");

Callers 2

incrRefCountFunction · 0.80
setWithKeyFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected