MCPcopy Create free account
hub / github.com/HelenOS/helenos / decrement

Method decrement

uspace/lib/cpp/src/refcount_obj.cpp:43–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41 }
42
43 bool refcount_obj::decrement()
44 {
45 if (__atomic_sub_fetch(&refcount_, 1, __ATOMIC_ACQ_REL) == 0)
46 {
47 /**
48 * First call to destroy() will delete the held object,
49 * so it doesn't matter what the weak_refcount_ is,
50 * but we added one and we need to remove it now.
51 */
52 decrement_weak();
53
54 return true;
55 }
56 else
57 return false;
58 }
59
60 bool refcount_obj::decrement_weak()
61 {

Callers 5

remove_payload_Method · 0.80
~packaged_taskMethod · 0.80
release_state_Method · 0.80
abandon_state_Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected