Lines Matching defs:tp_funcs
101 /* Called in removal of a func but failed to allocate a new tp_funcs */
295 * Count the number of functions (enum tp_func_state) in a tp_funcs array.
297 static enum tp_func_state nr_func_state(const struct tracepoint_func *tp_funcs)
299 if (!tp_funcs)
301 if (!tp_funcs[1].func)
303 if (!tp_funcs[2].func)
308 static void tracepoint_update_call(struct tracepoint *tp, struct tracepoint_func *tp_funcs)
315 if (nr_func_state(tp_funcs) == TP_FUNC_1)
316 func = tp_funcs[0].func;
327 struct tracepoint_func *old, *tp_funcs;
336 tp_funcs = rcu_dereference_protected(tp->funcs,
338 old = func_add(&tp_funcs, func, prio);
350 switch (nr_func_state(tp_funcs)) {
358 tracepoint_update_call(tp, tp_funcs);
360 rcu_assign_pointer(tp->funcs, tp_funcs);
365 tracepoint_update_call(tp, tp_funcs);
373 rcu_assign_pointer(tp->funcs, tp_funcs);
378 if (tp_funcs[0].data != old[0].data)
399 struct tracepoint_func *old, *tp_funcs;
401 tp_funcs = rcu_dereference_protected(tp->funcs,
403 old = func_remove(&tp_funcs, func);
407 if (tp_funcs == old)
408 /* Failed allocating new tp_funcs, replaced func with stub */
411 switch (nr_func_state(tp_funcs)) {
419 tracepoint_update_call(tp, tp_funcs);
429 rcu_assign_pointer(tp->funcs, tp_funcs);
437 if (tp_funcs[0].data != old[0].data)
441 tracepoint_update_call(tp, tp_funcs);
446 rcu_assign_pointer(tp->funcs, tp_funcs);
451 if (tp_funcs[0].data != old[0].data)