Function report |
Source Code:lib\debugobjects.c |
Create Date:2022-07-28 06:55:06 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__free_object
Proto:static void __free_object(struct debug_obj *obj)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct debug_obj * | obj |
| 345 | lookahead_count = 0 |
| 349 | local_irq_save(flags) |
| 350 | If Not obj_cache Then Go to free_to_obj_pool |
| 356 | percpu_pool = this_cpu_ptr( & percpu_obj_pool) |
| 357 | If obj_free < ODEBUG_POOL_PERCPU_SIZE Then |
| 368 | When lookahead_count < ODEBUG_BATCH_SIZE cycle |
| 370 | If Not objs[lookahead_count] Then Break |
| 372 | obj_free-- |
| 375 | free_to_obj_pool : |
| 376 | raw_spin_lock( & pool_lock) |
| 379 | obj_pool_used-- |
| 381 | If work Then |
| 382 | WRITE_ONCE(The number of objs on the global free list , The number of objs on the global free list + 1) |
| 383 | hlist_add_head( & node, & obj_to_free) |
| 384 | If lookahead_count Then |
| 385 | WRITE_ONCE(The number of objs on the global free list , The number of objs on the global free list + lookahead_count) |
| 386 | obj_pool_used -= lookahead_count |
| 387 | When lookahead_count cycle |
| 388 | hlist_add_head( & node, & obj_to_free) |
| 400 | When i < ODEBUG_BATCH_SIZE cycle |
| 407 | Else |
| 408 | WRITE_ONCE(obj_pool_free, obj_pool_free + 1) |
| 409 | hlist_add_head( & node, & obj_pool) |
| 410 | If lookahead_count Then |
| 412 | obj_pool_used -= lookahead_count |
| 413 | When lookahead_count cycle |
| 414 | hlist_add_head( & node, & obj_pool) |
| 419 | raw_spin_unlock( & pool_lock) |
| 420 | local_irq_restore(flags) |
| Name | Describe |
|---|---|
| free_object | Put the object back into the pool and schedule work to free objects* if necessary. |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |