Walk pending lists, stopping timers and calling user-specified function */
| 971 | |
| 972 | /* Walk pending lists, stopping timers and calling user-specified function */ |
| 973 | int |
| 974 | rte_timer_stop_all(uint32_t timer_data_id, unsigned int *walk_lcores, |
| 975 | int nb_walk_lcores, |
| 976 | rte_timer_stop_all_cb_t f, void *f_arg) |
| 977 | { |
| 978 | int i; |
| 979 | struct priv_timer *priv_timer; |
| 980 | uint32_t walk_lcore; |
| 981 | struct rte_timer *tim, *next_tim; |
| 982 | struct rte_timer_data *timer_data; |
| 983 | |
| 984 | TIMER_DATA_VALID_GET_OR_ERR_RET(timer_data_id, timer_data, -EINVAL); |
| 985 | |
| 986 | for (i = 0; i < nb_walk_lcores; i++) { |
| 987 | walk_lcore = walk_lcores[i]; |
| 988 | priv_timer = &timer_data->priv_timer[walk_lcore]; |
| 989 | |
| 990 | for (tim = priv_timer->pending_head.sl_next[0]; |
| 991 | tim != NULL; |
| 992 | tim = next_tim) { |
| 993 | next_tim = tim->sl_next[0]; |
| 994 | |
| 995 | __rte_timer_stop(tim, timer_data); |
| 996 | |
| 997 | if (f) |
| 998 | f(tim, f_arg); |
| 999 | } |
| 1000 | } |
| 1001 | |
| 1002 | return 0; |
| 1003 | } |
| 1004 | |
| 1005 | int64_t |
| 1006 | rte_timer_next_ticks(void) |
no test coverage detected