Lines Matching defs:rh

37 	struct rethook *rh = container_of(head, struct rethook, rcu);
38 objpool_fini(&rh->pool);
43 * @rh: the struct rethook to stop.
49 void rethook_stop(struct rethook *rh)
51 rcu_assign_pointer(rh->handler, NULL);
56 * @rh: the struct rethook to be freed.
59 * @rh::data is cleaned if needed (or, the handler can access it after
60 * calling this function.) This function will set the @rh to be freed
62 * not touch @rh after calling this.
64 void rethook_free(struct rethook *rh)
66 rethook_stop(rh);
68 call_rcu(&rh->rcu, rethook_free_rcu);
85 static inline rethook_handler_t rethook_get_handler(struct rethook *rh)
87 return (rethook_handler_t)rcu_dereference_check(rh->handler,
106 struct rethook *rh;
111 rh = kzalloc(sizeof(struct rethook), GFP_KERNEL);
112 if (!rh)
115 rh->data = data;
116 rcu_assign_pointer(rh->handler, handler);
119 if (objpool_init(&rh->pool, num, size, GFP_KERNEL, rh,
121 kfree(rh);
124 return rh;
130 struct rethook *rh = node->rethook;
132 objpool_drop(node, &rh->pool);
156 * @rh: The struct rethook which pools the nodes.
158 * Get an unused rethook node from @rh. If the node pool is empty, this
161 struct rethook_node *rethook_try_get(struct rethook *rh)
163 rethook_handler_t handler = rethook_get_handler(rh);
165 /* Check whether @rh is going to be freed. */
178 return (struct rethook_node *)objpool_pop(&rh->pool);
206 struct rethook_node *rh = NULL;
215 rh = container_of(node, struct rethook_node, llist);
216 if (rh->ret_addr != (unsigned long)arch_rethook_trampoline) {
218 return rh->ret_addr;