src/c/scheduler.c
bool iot_schedule_remove (iot_scheduler_t * scheduler, iot_schedule_t * schedule)
{
  assert (scheduler && schedule);
  bool ret;
  iot_log_trace (scheduler->logger, "iot_schedule_remove()");
  iot_component_lock (&scheduler->component);
  if ((ret = schedule->scheduled))
  {
    iot_schedule_requeue (&scheduler->queue, &scheduler->idle_queue, schedule);
    schedule->scheduled = false;
  }
  iot_component_unlock (&scheduler->component);
  return ret;
}
/* Remove a schedule from the queue */
Remove a schedule from the queue
Remove a schedule from the queue
bool iot_schedule_remove (iot_scheduler_t * scheduler, iot_schedule_t * schedule)
{
  assert (scheduler && schedule);
  bool ret;
  iot_log_trace (scheduler->logger, "iot_schedule_remove()");
  iot_component_lock (&scheduler->component);
  if ((ret = schedule->scheduled))
  {
    iot_schedule_requeue (&scheduler->queue, &scheduler->idle_queue, schedule);
    schedule->scheduled = false;
  }
  iot_component_unlock (&scheduler->component);
  return ret;
}
bool iot_schedule_remove ( iot_scheduler_t * scheduler , iot_schedule_t * schedule ) { assert ( scheduler && schedule ) ; bool ret ; iot_log_trace ( scheduler -> logger , " " ) ; iot_component_lock ( & scheduler -> component ) ; if ( ( ret = schedule -> scheduled ) ) { iot_schedule_requeue ( & scheduler -> queue , & scheduler -> idle_queue , schedule ) ; schedule -> scheduled = false ; } iot_component_unlock ( & scheduler -> component ) ; return ret ; }
Remove a schedule from the queue
Remove a schedule from the queue