Lines Matching refs:key
120 static inline int static_key_count(struct static_key *key) in static_key_count() argument
122 return atomic_read(&key->enabled); in static_key_count()
131 static __always_inline bool static_key_false(struct static_key *key) in static_key_false() argument
133 return arch_static_branch(key, false); in static_key_false()
136 static __always_inline bool static_key_true(struct static_key *key) in static_key_true() argument
138 return !arch_static_branch(key, true); in static_key_true()
152 extern void static_key_slow_inc(struct static_key *key);
153 extern void static_key_slow_dec(struct static_key *key);
170 static __always_inline bool static_key_false(struct static_key *key) in static_key_false() argument
172 if (unlikely(static_key_count(key) > 0)) in static_key_false()
177 static __always_inline bool static_key_true(struct static_key *key) in static_key_true() argument
179 if (likely(static_key_count(key) > 0)) in static_key_true()
184 static inline void static_key_slow_inc(struct static_key *key) in static_key_slow_inc() argument
187 atomic_inc(&key->enabled); in static_key_slow_inc()
190 static inline void static_key_slow_dec(struct static_key *key) in static_key_slow_dec() argument
193 atomic_dec(&key->enabled); in static_key_slow_dec()
217 static inline void static_key_enable(struct static_key *key) in static_key_enable() argument
219 int count = static_key_count(key); in static_key_enable()
224 static_key_slow_inc(key); in static_key_enable()
227 static inline void static_key_disable(struct static_key *key) in static_key_disable() argument
229 int count = static_key_count(key); in static_key_disable()
234 static_key_slow_dec(key); in static_key_disable()
247 struct static_key key; member
251 struct static_key key; member
254 #define STATIC_KEY_TRUE_INIT (struct static_key_true) { .key = STATIC_KEY_INIT_TRUE, }
255 #define STATIC_KEY_FALSE_INIT (struct static_key_false){ .key = STATIC_KEY_INIT_FALSE, }
336 branch = !arch_static_branch(&(x)->key, true); \
338 branch = !arch_static_branch_jump(&(x)->key, true); \
348 branch = arch_static_branch_jump(&(x)->key, false); \
350 branch = arch_static_branch(&(x)->key, false); \
358 #define static_branch_likely(x) likely(static_key_enabled(&(x)->key))
359 #define static_branch_unlikely(x) unlikely(static_key_enabled(&(x)->key))
367 #define static_branch_inc(x) static_key_slow_inc(&(x)->key)
368 #define static_branch_dec(x) static_key_slow_dec(&(x)->key)
374 #define static_branch_enable(x) static_key_enable(&(x)->key)
375 #define static_branch_disable(x) static_key_disable(&(x)->key)