コード例 #1
0
ファイル: callout.c プロジェクト: 1514louluo/lagopus
static void
s_task_freeup(void **valptr) {
  if (likely(valptr != NULL && *valptr != NULL)) {

    s_lock_global();
    {
      s_set_cancel_and_destroy_task_no_lock((lagopus_callout_task_t)*valptr);
    }
    s_unlock_global();

  }
}
コード例 #2
0
ファイル: callout_queue.c プロジェクト: tidatida/lagopus
static inline void
s_destroy_all_queued_timed_tasks(void) {
  lagopus_callout_task_t t;

  s_lock_global();
  {

    while ((t = s_get_timed_task_no_lock()) != NULL) {
      s_set_cancel_and_destroy_task_no_lock(t);
    }

  }
  s_unlock_global();
}