Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\test_rhashtable.c Create Date:2022-07-28 06:31:45
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:threadfunc

Proto:static int threadfunc(void *data)

Type:int

Parameter:

TypeParameterName
void *data
633  err = 0 , insert_retries = 0
634  tdata = data
636  If atomic_dec_and_test( & startup_count) Then wake_up( & startup_wait)
638  If 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) Then
639  pr_err(" thread[%d]: interrupted\n", id)
640  Go to out
643  When i < entries cycle
644  id = i
645  tid = id
646  err = insert_retry( & ht, & objs[i], test_rht_params)
647  If err > 0 Then
648  insert_retries += err
649  Else if err Then
650  pr_err(" thread[%d]: rhashtable_insert_fast failed\n", id)
652  Go to out
655  If insert_retries Then pr_info(" thread[%d]: %u insertions retried due to memory pressure\n", id, insert_retries)
659  err = thread_lookup_test(tdata)
660  If err Then
661  pr_err(" thread[%d]: rhashtable_lookup_test failed\n", id)
663  Go to out
666  When step > 0 cycle
667  When i < entries cycle
668  If id == TEST_INSERT_FAIL Then Continue
672  If err Then
673  pr_err(" thread[%d]: rhashtable_remove_fast failed\n", id)
675  Go to out
679  cond_resched()
681  err = thread_lookup_test(tdata)
682  If err Then
683  pr_err(" thread[%d]: rhashtable_lookup_test (2) failed\n", id)
685  Go to out
688  out :
689  When Not 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(). cycle
690  set_current_state(TASK_INTERRUPTIBLE)
691  schedule()
693  Return err