Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\tracepoint.c Create Date:2022-07-28 11:50:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:func_remove

Proto:static void *func_remove(struct tracepoint_func **funcs, struct tracepoint_func *tp_func)

Type:void

Parameter:

TypeParameterName
struct tracepoint_func **funcs
struct tracepoint_func *tp_func
179  nr_probes = 0 , nr_del = 0
182  old = funcs
184  If Not old Then Return ERR_PTR( - ENOENT)
187  debug_print_probes( * funcs)
189  If func Then
190  When func cycle
191  If func == func && data == data Then nr_del++
201  If nr_probes - nr_del == 0 Then
203  * funcs = NULL
204  debug_print_probes( * funcs)
205  Return old
206  Else
207  j = 0
210  new = allocate_probes(nr_probes - nr_del + 1)
211  If (new == NULL) Then Return ERR_PTR( - ENOMEM)
213  When func cycle If func != func || data != data Then
216  new[j++] = old[i]
217  func = NULL
218  funcs = new
220  debug_print_probes( * funcs)
221  Return old
Caller
NameDescribe
tracepoint_remove_funcRemove a probe function from a tracepoint.* Note: only waiting an RCU period after setting elem->call to the empty* function insures that the original callback is not used anymore. This insured* by preempt_disable around the call site.