unsigned int max_tasks : 28; /* Max FD tasks */
unsigned int has_timeout : 1; /* Set if timeout is set */
unsigned int valid : 1; /* Set if scheduler is valid */
- unsigned int is_locked : 1; /* Set if scheduler is locked */
unsigned int signal_tasks : 1; /* Set if to dispatch signals */
};
/* Unregister signal */
void (*signal_unregister)(SilcSchedule schedule, void *context,
- SilcUInt32 signal, SilcTaskCallback callback,
- void *callback_context);
-
- /* Mark signal to be called later. */
- void (*signal_call)(SilcSchedule schedule, void *context, SilcUInt32 signal);
+ SilcUInt32 signal);
/* Call all signals */
void (*signals_call)(SilcSchedule schedule, void *context);
void (*signals_unblock)(SilcSchedule schedule, void *context);
} SilcScheduleOps;
-#if defined(SILC_DEBUG)
+/* The generic function to add any type of task to the scheduler. This
+ used to be exported as is to application, but now they should use the
+ macro wrappers defined in silcschedule.h. For Fd task the timeout must
+ be zero, for timeout task the timeout must not be zero, for signal task
+ the fd argument is the signal. */
+SilcTask silc_schedule_task_add(SilcSchedule schedule, SilcUInt32 fd,
+ SilcTaskCallback callback, void *context,
+ long seconds, long useconds,
+ SilcTaskType type);
+
+#ifdef SILC_DIST_INPLACE
/* Print scheduler statistics to stdout. */
void silc_schedule_stats(SilcSchedule schedule);
-#endif /* SILC_DEBUG */
+#endif /* SILC_DIST_INPLACE */
#endif /* SILCSCHEDULE_I_H */