Function report | 
Source Code:lib\test_rhashtable.c | 
Create Date:2022-07-28 06:31:47 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:test_rht_init
Proto:static int __init test_rht_init(void)
Type:int
Parameter:Nothing
| 699 | started_threads = 0 , failed_threads = 0 | 
| 700 | total_time = 0 | 
| 704 | If parm_entries < 0 Then parm_entries = 1 | 
| 707 | entries = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(parm_entries, MAX_ENTRIES) | 
| 709 | automatic_shrinking = shrinking | 
| 711 | nelem_hint = size | 
| 718 | pr_info("Running rhashtable test nelem=%d, max_size=%d, shrinking=%d\n", size, max_size, shrinking) | 
| 728 | If err < 0 Then | 
| 734 | time = test_rhashtable( & ht, objs, entries) | 
| 735 | rhashtable_destroy( & ht) | 
| 736 | If time < 0 Then | 
| 742 | total_time += time | 
| 745 | pr_info("test if its possible to exceed max_size %d: %s\n", max_size, test_rhashtable_max(objs, entries) == 0 ? "no, ok" : "YES, failed") | 
| 751 | pr_info("Average test time: %llu\n", total_time) | 
| 755 | If Not tcount Then Return 0 | 
| 760 | atomic_set( & startup_count, tcount) | 
| 765 | If Not objs Then | 
| 773 | If err < 0 Then | 
| 778 | Return -EINVAL | 
| 788 | atomic_dec( & startup_count) | 
| 789 | Else | 
| 790 | started_threads++ | 
| 793 | 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) == 0) Then pr_err(" wait_event interruptible failed\n") | 
| 796 | atomic_dec( & startup_count) | 
| 797 | wake_up_all( & startup_wait) | 
| 801 | If err = stop a thread Then | 
| 804 | failed_threads++ | 
| 807 | rhashtable_destroy( & ht) | 
| 815 | err = test_rhltable(entries / 16) | 
| 816 | pr_info("Started %d threads, %d failed, rhltable test returns %d\n", started_threads, failed_threads, err) | 
| 818 | Return 0 | 
| 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  |