diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-06-03 10:59:31 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-07-21 08:30:49 -0400 |
| commit | c3aaa89a442a43fbaf2ef9dce6422f57a58e52b0 (patch) | |
| tree | 752d2f7d9e95c1dbbc13993b681cd5a40b44bd27 /bgpd/rfapi/rfapi_monitor.c | |
| parent | fa5806c3183ae685d96255bca3474026390335a2 (diff) | |
bgpd: Convert thread_cancel to THREAD_OFF and use THREAD_ARG
Just convert all uses of thread_cancel to THREAD_OFF. Additionally
use THREAD_ARG instead of t->arg to get the arguement. Individual
files should never be accessing thread private data like this.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'bgpd/rfapi/rfapi_monitor.c')
| -rw-r--r-- | bgpd/rfapi/rfapi_monitor.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bgpd/rfapi/rfapi_monitor.c b/bgpd/rfapi/rfapi_monitor.c index 8529676118..0e71d5d7e1 100644 --- a/bgpd/rfapi/rfapi_monitor.c +++ b/bgpd/rfapi/rfapi_monitor.c @@ -620,7 +620,7 @@ void rfapiMonitorDel(struct bgp *bgp, struct rfapi_descriptor *rfd, rfapiMonitorDetachImport(m); } - thread_cancel(&m->timer); + THREAD_OFF(m->timer); /* * remove from rfd list @@ -657,7 +657,7 @@ int rfapiMonitorDelHd(struct rfapi_descriptor *rfd) rfapiMonitorDetachImport(m); } - thread_cancel(&m->timer); + THREAD_OFF(m->timer); XFREE(MTYPE_RFAPI_MONITOR, m); rn->info = NULL; @@ -691,7 +691,7 @@ int rfapiMonitorDelHd(struct rfapi_descriptor *rfd) #endif } - thread_cancel(&mon_eth->timer); + THREAD_OFF(mon_eth->timer); /* * remove from rfd list @@ -733,7 +733,7 @@ void rfapiMonitorResponseRemovalOn(struct bgp *bgp) static void rfapiMonitorTimerExpire(struct thread *t) { - struct rfapi_monitor_vpn *m = t->arg; + struct rfapi_monitor_vpn *m = THREAD_ARG(t); /* forget reference to thread, it's gone */ m->timer = NULL; @@ -1039,7 +1039,7 @@ void rfapiMonitorMovedUp(struct rfapi_import_table *import_table, static void rfapiMonitorEthTimerExpire(struct thread *t) { - struct rfapi_monitor_eth *m = t->arg; + struct rfapi_monitor_eth *m = THREAD_ARG(t); /* forget reference to thread, it's gone */ m->timer = NULL; @@ -1400,7 +1400,7 @@ void rfapiMonitorEthDel(struct bgp *bgp, struct rfapi_descriptor *rfd, rfapiMonitorEthDetachImport(bgp, val); } - thread_cancel(&val->timer); + THREAD_OFF(val->timer); /* * remove from rfd list |
