函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\debugobjects.c Create Date:2022-07-27 07:52:03
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:free_obj_work

函数原型:static void free_obj_work(struct work_struct *work)

返回类型:void

参数:

类型参数名称
struct work_struct *work
298  WRITE_ONCE(obj_freeing, false)
299  如果非raw_spin_trylock_irqsave( & pool_lock, flags)则返回
302  如果obj_pool_free大于等于debug_objects_pool_size则转到:free_objs
312 The number of objs on the global free list obj_pool_free小于debug_objects_pool_size循环
313  obj等于hlist_entry(first, typeof( * obj), node)
314  hlist_del( & node)
315  hlist_add_head( & node, & obj_pool)
316  WRITE_ONCE(obj_pool_free, obj_pool_free + 1)
317  WRITE_ONCE(The number of objs on the global free list , The number of objs on the global free list - 1)
319  raw_spin_unlock_irqrestore( & pool_lock, flags)
320  返回
322  free_objs :
328  如果The number of objs on the global free list
329  移出列表
330  debug_objects_freed加等于The number of objs on the global free list
331  WRITE_ONCE(The number of objs on the global free list , 0)
333  raw_spin_unlock_irqrestore( & pool_lock, flags)
336  hlist_del( & node)
337  kmem_cache_free(obj_cache, obj)