diff options
| author | Mark Stapp <mjs@voltanet.io> | 2020-07-06 12:55:03 -0400 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2020-10-23 08:59:34 -0400 |
| commit | b3d6bc6ef0140a194b4bc2993a6aba72ab5d54c9 (patch) | |
| tree | b5ef6dcab41d9da516a6ff044056e0faca7b35da /tests/lib/test_timer_performance.c | |
| parent | 90a65457d12d8d90bf47eab1a4bb5446b3810d96 (diff) | |
* : update signature of thread_cancel api
Change thread_cancel to take a ** to an event, NULL-check
before dereferencing, and NULL the caller's pointer. Update
many callers to use the new signature.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'tests/lib/test_timer_performance.c')
| -rw-r--r-- | tests/lib/test_timer_performance.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/lib/test_timer_performance.c b/tests/lib/test_timer_performance.c index 2960e0d81e..45b29b92b1 100644 --- a/tests/lib/test_timer_performance.c +++ b/tests/lib/test_timer_performance.c @@ -59,7 +59,7 @@ int main(int argc, char **argv) thread_add_timer_msec(master, dummy_func, NULL, 0, &timers[i]); } for (i = 0; i < SCHEDULE_TIMERS; i++) - thread_cancel(timers[i]); + thread_cancel(&timers[i]); monotime(&tv_start); @@ -78,8 +78,7 @@ int main(int argc, char **argv) int index; index = prng_rand(prng) % SCHEDULE_TIMERS; - if (timers[index]) - thread_cancel(timers[index]); + thread_cancel(&timers[index]); timers[index] = NULL; } |
