Lines Matching full:count
36 * lockref_get - Increments reference count unconditionally
40 * to the object, so you know the count cannot be zero.
45 new.count++; in lockref_get()
51 lockref->count++; in lockref_get()
57 * lockref_get_not_zero - Increments count unless the count is 0 or dead
59 * Return: 1 if count updated successfully or 0 if count was zero
66 new.count++; in lockref_get_not_zero()
67 if (old.count <= 0) in lockref_get_not_zero()
75 if (lockref->count > 0) { in lockref_get_not_zero()
76 lockref->count++; in lockref_get_not_zero()
85 * lockref_put_not_zero - Decrements count unless count <= 1 before decrement
87 * Return: 1 if count updated successfully or 0 if count would become zero
94 new.count--; in lockref_put_not_zero()
95 if (old.count <= 1) in lockref_put_not_zero()
103 if (lockref->count > 1) { in lockref_put_not_zero()
104 lockref->count--; in lockref_put_not_zero()
113 * lockref_put_return - Decrement reference count if possible
116 * Decrement the reference count and return the new value.
122 new.count--; in lockref_put_return()
123 if (old.count <= 0) in lockref_put_return()
126 return new.count; in lockref_put_return()
133 * lockref_put_or_lock - decrements count unless count <= 1 before decrement
135 * Return: 1 if count updated successfully or 0 if count <= 1 and lock taken
140 new.count--; in lockref_put_or_lock()
141 if (old.count <= 1) in lockref_put_or_lock()
148 if (lockref->count <= 1) in lockref_put_or_lock()
150 lockref->count--; in lockref_put_or_lock()
163 lockref->count = -128; in lockref_mark_dead()
168 * lockref_get_not_dead - Increments count unless the ref is dead
170 * Return: 1 if count updated successfully or 0 if lockref was dead
177 new.count++; in lockref_get_not_dead()
178 if (old.count < 0) in lockref_get_not_dead()
186 if (lockref->count >= 0) { in lockref_get_not_dead()
187 lockref->count++; in lockref_get_not_dead()