函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:threadfunc

函数原型:static int threadfunc(void *data)

返回类型:int

参数:

类型参数名称
void *data
633  err等于0, insert_retries等于0
634  tdata等于data
636  如果atomic_dec_and_test( & startup_count)则wake_up( & startup_wait)
638  如果wait_event_interruptible - sleep until a condition gets true*@wq_head: the waitqueue to wait on*@condition: a C expression for the event to wait for* The process is put to sleep (TASK_INTERRUPTIBLE) until the(startup_wait, atomic_read( & startup_count) == - 1)则
639  打印错误信息(" thread[%d]: interrupted\n", id)
640  转到:out
643 i小于entries循环
644  id等于i
645  tid等于id
646  err等于insert_retry( & ht, & objs[i], test_rht_params)
647  如果err大于0则
648  insert_retries加等于err
649  否则如果err
650  打印错误信息(" thread[%d]: rhashtable_insert_fast failed\n", id)
652  转到:out
655  如果insert_retries打印信息(" thread[%d]: %u insertions retried due to memory pressure\n", id, insert_retries)
659  err等于thread_lookup_test(tdata)
660  如果err
661  打印错误信息(" thread[%d]: rhashtable_lookup_test failed\n", id)
663  转到:out
666 step大于0循环
667 i小于entries循环
668  如果id恒等于TEST_INSERT_FAIL则继续下一循环
672  如果err
673  打印错误信息(" thread[%d]: rhashtable_remove_fast failed\n", id)
675  转到:out
677  id等于TEST_INSERT_FAIL
679  cond_resched()
681  err等于thread_lookup_test(tdata)
682  如果err
683  打印错误信息(" thread[%d]: rhashtable_lookup_test (2) failed\n", id)
685  转到:out
688  out :
689  当非kthread_should_stop - should this kthread return now?* When someone calls kthread_stop() on your kthread, it will be woken* and this will return true. You should then return, and your return* value will be passed through to kthread_stop().循环
690  set_current_state(睡眠态)
691  进程调度
693  返回:err