Skip to content

Commit

Permalink
fixing typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorier committed Apr 11, 2024
1 parent 1e8c605 commit bcf8f16
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/margo-timer-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ typedef struct margo_timer {
ABT_mutex_memory mtx_mem;
ABT_cond_memory cv_mem;
size_t num_pending;
_Atomic bool cancelled;
_Atomic bool canceled;
_Atomic bool destroy_requested;

double expiration;
Expand Down
8 changes: 4 additions & 4 deletions src/margo-timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static inline void timer_cleanup(margo_timer_t timer) { free(timer); }
static void timer_ult(void* args)
{
margo_timer_t timer = (margo_timer_t)args;
if (!timer->cancelled) timer->cb_fn(timer->cb_dat);
if (!timer->canceled) timer->cb_fn(timer->cb_dat);
ABT_mutex_lock(ABT_MUTEX_MEMORY_GET_HANDLE(&timer->mtx_mem));
timer->num_pending -= 1;
bool no_more_pending = timer->num_pending == 0;
Expand Down Expand Up @@ -272,9 +272,9 @@ int margo_timer_start(margo_timer_t timer, double timeout_ms)

int margo_timer_cancel(margo_timer_t timer)
{
// Mark the timer as cancelled to prevent existing ULTs from calling the
// Mark the timer as canceled to prevent existing ULTs from calling the
// callback
timer->cancelled = true;
timer->canceled = true;
struct margo_timer_list* timer_lst = __margo_get_timer_list(timer->mid);

// Remove the timer from the list of pending timers
Expand All @@ -293,7 +293,7 @@ int margo_timer_cancel(margo_timer_t timer)
ABT_mutex_unlock(ABT_MUTEX_MEMORY_GET_HANDLE(&timer->mtx_mem));

// Uncancel the timer
timer->cancelled = false;
timer->canceled = false;

return 0;
}
Expand Down

0 comments on commit bcf8f16

Please sign in to comment.