* Calls @wa_f with @arg for each entry in the table specified by * @af and @fibnum. * * @ss_t callback is called before and after the tree traversal * while holding table lock. * * Table is traversed under read lock unless @wlock is set. */
| 88 | * Table is traversed under read lock unless @wlock is set. |
| 89 | */ |
| 90 | void |
| 91 | rib_walk_ext_internal(struct rib_head *rnh, bool wlock, rib_walktree_f_t *wa_f, |
| 92 | rib_walk_hook_f_t *hook_f, void *arg) |
| 93 | { |
| 94 | RIB_RLOCK_TRACKER; |
| 95 | |
| 96 | if (wlock) |
| 97 | RIB_WLOCK(rnh); |
| 98 | else |
| 99 | RIB_RLOCK(rnh); |
| 100 | rib_walk_ext_locked(rnh, wa_f, hook_f, arg); |
| 101 | if (wlock) |
| 102 | RIB_WUNLOCK(rnh); |
| 103 | else |
| 104 | RIB_RUNLOCK(rnh); |
| 105 | } |
| 106 | |
| 107 | void |
| 108 | rib_walk_ext(uint32_t fibnum, int family, bool wlock, rib_walktree_f_t *wa_f, |
no test coverage detected