| 960 | } |
| 961 | |
| 962 | static int |
| 963 | test_rcu_qsbr_reader(void *arg) |
| 964 | { |
| 965 | struct rte_rcu_qsbr *temp; |
| 966 | struct rte_hash *hash = NULL; |
| 967 | int i; |
| 968 | uint32_t lcore_id = rte_lcore_id(); |
| 969 | struct test_rcu_thread_info *ti; |
| 970 | uint32_t *pdata; |
| 971 | |
| 972 | ti = (struct test_rcu_thread_info *)arg; |
| 973 | temp = t[ti->ir]; |
| 974 | hash = h[ti->ih]; |
| 975 | |
| 976 | do { |
| 977 | rte_rcu_qsbr_thread_register(temp, lcore_id); |
| 978 | rte_rcu_qsbr_thread_online(temp, lcore_id); |
| 979 | for (i = 0; i < TOTAL_ENTRY; i++) { |
| 980 | rte_rcu_qsbr_lock(temp, lcore_id); |
| 981 | if (rte_hash_lookup_data(hash, keys+i, |
| 982 | (void **)&pdata) != -ENOENT) { |
| 983 | pdata[lcore_id] = 0; |
| 984 | while (pdata[lcore_id] < COUNTER_VALUE) |
| 985 | pdata[lcore_id]++; |
| 986 | } |
| 987 | rte_rcu_qsbr_unlock(temp, lcore_id); |
| 988 | } |
| 989 | /* Update quiescent state counter */ |
| 990 | rte_rcu_qsbr_quiescent(temp, lcore_id); |
| 991 | rte_rcu_qsbr_thread_offline(temp, lcore_id); |
| 992 | rte_rcu_qsbr_thread_unregister(temp, lcore_id); |
| 993 | } while (!writer_done); |
| 994 | |
| 995 | return 0; |
| 996 | } |
| 997 | |
| 998 | static int |
| 999 | test_rcu_qsbr_writer(void *arg) |
nothing calls this directly
no test coverage detected