diff options
Diffstat (limited to 'nuttx/sched/timer_release.c')
-rw-r--r-- | nuttx/sched/timer_release.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/nuttx/sched/timer_release.c b/nuttx/sched/timer_release.c index 93ea686c5..83f86954b 100644 --- a/nuttx/sched/timer_release.c +++ b/nuttx/sched/timer_release.c @@ -134,6 +134,10 @@ int timer_release(FAR struct posix_timer_s *timer) return -EINVAL; } + /* Release one reference to timer. Don't delete the timer until the count + * would decrement to zero. + */ + if (timer->pt_crefs > 1) { timer->pt_crefs--; |