diff mbox

[2/2] timer: add missing atomic decrement

Message ID 1468862206-25102-2-git-send-email-brian.brooks@linaro.org
State Accepted
Commit aaca222d10a3829e4c982a1b4842b0be11860b7d
Headers show

Commit Message

Brian Brooks July 18, 2016, 5:16 p.m. UTC
Signed-off-by: Brian Brooks <brian.brooks@linaro.org>

---
 platform/linux-generic/odp_timer.c | 2 ++
 1 file changed, 2 insertions(+)

-- 
2.9.0
diff mbox

Patch

diff --git a/platform/linux-generic/odp_timer.c b/platform/linux-generic/odp_timer.c
index becea9d..f47c291 100644
--- a/platform/linux-generic/odp_timer.c
+++ b/platform/linux-generic/odp_timer.c
@@ -316,6 +316,8 @@  static void odp_timer_pool_del(odp_timer_pool *tp)
 	int rc = odp_shm_free(tp->shm);
 	if (rc != 0)
 		ODP_ABORT("Failed to free shared memory (%d)\n", rc);
+
+	odp_atomic_sub_u32(&num_timer_pools, 1);
 }
 
 static inline odp_timer_t timer_alloc(odp_timer_pool *tp,