Lines Matching defs:tp_funcs
98 /* Called in removal of a func but failed to allocate a new tp_funcs */
259 * Count the number of functions (enum tp_func_state) in a tp_funcs array.
261 static enum tp_func_state nr_func_state(const struct tracepoint_func *tp_funcs)
263 if (!tp_funcs)
265 if (!tp_funcs[1].func)
267 if (!tp_funcs[2].func)
272 static void tracepoint_update_call(struct tracepoint *tp, struct tracepoint_func *tp_funcs)
279 if (nr_func_state(tp_funcs) == TP_FUNC_1)
280 func = tp_funcs[0].func;
291 struct tracepoint_func *old, *tp_funcs;
300 tp_funcs = rcu_dereference_protected(tp->funcs,
302 old = func_add(&tp_funcs, func, prio);
314 switch (nr_func_state(tp_funcs)) {
322 tracepoint_update_call(tp, tp_funcs);
324 rcu_assign_pointer(tp->funcs, tp_funcs);
329 tracepoint_update_call(tp, tp_funcs);
337 rcu_assign_pointer(tp->funcs, tp_funcs);
342 if (tp_funcs[0].data != old[0].data)
363 struct tracepoint_func *old, *tp_funcs;
365 tp_funcs = rcu_dereference_protected(tp->funcs,
367 old = func_remove(&tp_funcs, func);
371 if (tp_funcs == old)
372 /* Failed allocating new tp_funcs, replaced func with stub */
375 switch (nr_func_state(tp_funcs)) {
382 tracepoint_update_call(tp, tp_funcs);
392 rcu_assign_pointer(tp->funcs, tp_funcs);
400 if (tp_funcs[0].data != old[0].data)
404 tracepoint_update_call(tp, tp_funcs);
409 rcu_assign_pointer(tp->funcs, tp_funcs);
414 if (tp_funcs[0].data != old[0].data)