+ /* Uninitializes the platform specific scheduler context. */
+ void (*uninit)(SilcSchedule schedule, void *context);
+
+ /* System specific waiter. This must fill the schedule->fd_dispatch queue
+ with valid tasks that has something to dispatch, when this returns. */
+ int (*schedule)(SilcSchedule schedule, void *context);
+
+ /* Schedule `task' with events `event_mask'. Zero `event_mask'
+ unschedules the task. */
+ SilcBool (*schedule_fd)(SilcSchedule schedule, void *context,
+ SilcTaskFd task, SilcTaskEvent event_mask);
+
+ /* Wakes up the scheduler. This is platform specific routine */
+ void (*wakeup)(SilcSchedule schedule, void *context);
+
+ /* Register signal */
+ void (*signal_register)(SilcSchedule schedule, void *context,
+ SilcUInt32 signal, SilcTaskCallback callback,
+ void *callback_context);
+
+ /* Unregister signal */
+ void (*signal_unregister)(SilcSchedule schedule, void *context,
+ SilcUInt32 signal);
+
+ /* Call all signals */
+ void (*signals_call)(SilcSchedule schedule, void *context);
+
+ /* Block registered signals in scheduler. */
+ void (*signals_block)(SilcSchedule schedule, void *context);
+
+ /* Unblock registered signals in schedule. */
+ void (*signals_unblock)(SilcSchedule schedule, void *context);
+} SilcScheduleOps;
+
+/* 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_DIST_INPLACE */
+
+#endif /* SILCSCHEDULE_I_H */