Lines Matching refs:nh

139 int atomic_notifier_chain_register(struct atomic_notifier_head *nh,  in atomic_notifier_chain_register()  argument
145 spin_lock_irqsave(&nh->lock, flags); in atomic_notifier_chain_register()
146 ret = notifier_chain_register(&nh->head, n); in atomic_notifier_chain_register()
147 spin_unlock_irqrestore(&nh->lock, flags); in atomic_notifier_chain_register()
161 int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, in atomic_notifier_chain_unregister() argument
167 spin_lock_irqsave(&nh->lock, flags); in atomic_notifier_chain_unregister()
168 ret = notifier_chain_unregister(&nh->head, n); in atomic_notifier_chain_unregister()
169 spin_unlock_irqrestore(&nh->lock, flags); in atomic_notifier_chain_unregister()
192 int atomic_notifier_call_chain(struct atomic_notifier_head *nh, in atomic_notifier_call_chain() argument
198 ret = notifier_call_chain(&nh->head, val, v, -1, NULL); in atomic_notifier_call_chain()
221 int blocking_notifier_chain_register(struct blocking_notifier_head *nh, in blocking_notifier_chain_register() argument
232 return notifier_chain_register(&nh->head, n); in blocking_notifier_chain_register()
234 down_write(&nh->rwsem); in blocking_notifier_chain_register()
235 ret = notifier_chain_register(&nh->head, n); in blocking_notifier_chain_register()
236 up_write(&nh->rwsem); in blocking_notifier_chain_register()
251 int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh, in blocking_notifier_chain_unregister() argument
262 return notifier_chain_unregister(&nh->head, n); in blocking_notifier_chain_unregister()
264 down_write(&nh->rwsem); in blocking_notifier_chain_unregister()
265 ret = notifier_chain_unregister(&nh->head, n); in blocking_notifier_chain_unregister()
266 up_write(&nh->rwsem); in blocking_notifier_chain_unregister()
271 int blocking_notifier_call_chain_robust(struct blocking_notifier_head *nh, in blocking_notifier_call_chain_robust() argument
281 if (rcu_access_pointer(nh->head)) { in blocking_notifier_call_chain_robust()
282 down_read(&nh->rwsem); in blocking_notifier_call_chain_robust()
283 ret = notifier_call_chain_robust(&nh->head, val_up, val_down, v); in blocking_notifier_call_chain_robust()
284 up_read(&nh->rwsem); in blocking_notifier_call_chain_robust()
306 int blocking_notifier_call_chain(struct blocking_notifier_head *nh, in blocking_notifier_call_chain() argument
316 if (rcu_access_pointer(nh->head)) { in blocking_notifier_call_chain()
317 down_read(&nh->rwsem); in blocking_notifier_call_chain()
318 ret = notifier_call_chain(&nh->head, val, v, -1, NULL); in blocking_notifier_call_chain()
319 up_read(&nh->rwsem); in blocking_notifier_call_chain()
340 int raw_notifier_chain_register(struct raw_notifier_head *nh, in raw_notifier_chain_register() argument
343 return notifier_chain_register(&nh->head, n); in raw_notifier_chain_register()
357 int raw_notifier_chain_unregister(struct raw_notifier_head *nh, in raw_notifier_chain_unregister() argument
360 return notifier_chain_unregister(&nh->head, n); in raw_notifier_chain_unregister()
364 int raw_notifier_call_chain_robust(struct raw_notifier_head *nh, in raw_notifier_call_chain_robust() argument
367 return notifier_call_chain_robust(&nh->head, val_up, val_down, v); in raw_notifier_call_chain_robust()
388 int raw_notifier_call_chain(struct raw_notifier_head *nh, in raw_notifier_call_chain() argument
391 return notifier_call_chain(&nh->head, val, v, -1, NULL); in raw_notifier_call_chain()
411 int srcu_notifier_chain_register(struct srcu_notifier_head *nh, in srcu_notifier_chain_register() argument
422 return notifier_chain_register(&nh->head, n); in srcu_notifier_chain_register()
424 mutex_lock(&nh->mutex); in srcu_notifier_chain_register()
425 ret = notifier_chain_register(&nh->head, n); in srcu_notifier_chain_register()
426 mutex_unlock(&nh->mutex); in srcu_notifier_chain_register()
441 int srcu_notifier_chain_unregister(struct srcu_notifier_head *nh, in srcu_notifier_chain_unregister() argument
452 return notifier_chain_unregister(&nh->head, n); in srcu_notifier_chain_unregister()
454 mutex_lock(&nh->mutex); in srcu_notifier_chain_unregister()
455 ret = notifier_chain_unregister(&nh->head, n); in srcu_notifier_chain_unregister()
456 mutex_unlock(&nh->mutex); in srcu_notifier_chain_unregister()
457 synchronize_srcu(&nh->srcu); in srcu_notifier_chain_unregister()
478 int srcu_notifier_call_chain(struct srcu_notifier_head *nh, in srcu_notifier_call_chain() argument
484 idx = srcu_read_lock(&nh->srcu); in srcu_notifier_call_chain()
485 ret = notifier_call_chain(&nh->head, val, v, -1, NULL); in srcu_notifier_call_chain()
486 srcu_read_unlock(&nh->srcu, idx); in srcu_notifier_call_chain()
503 void srcu_init_notifier_head(struct srcu_notifier_head *nh) in srcu_init_notifier_head() argument
505 mutex_init(&nh->mutex); in srcu_init_notifier_head()
506 if (init_srcu_struct(&nh->srcu) < 0) in srcu_init_notifier_head()
508 nh->head = NULL; in srcu_init_notifier_head()