/* Internal context. */
typedef struct {
+ void *app_context;
int wakeup_pipe[2];
SilcTask wakeup_task;
sigset_t signals;
the scheduler needs to be wakenup when tasks are added or removed from
the task queues. Returns context to the platform specific scheduler. */
-void *silc_schedule_internal_init(SilcSchedule schedule)
+void *silc_schedule_internal_init(SilcSchedule schedule,
+ void *app_context)
{
SilcUnixScheduler internal;
}
#endif
+ internal->app_context = app_context;
+
return (void *)internal;
}
for (i = 0; i < SIGNAL_COUNT; i++) {
if (internal->signal_call[i].call &&
internal->signal_call[i].callback) {
- internal->signal_call[i].callback(schedule, SILC_TASK_INTERRUPT,
+ internal->signal_call[i].callback(schedule, internal->app_context,
+ SILC_TASK_INTERRUPT,
internal->signal_call[i].signal,
internal->signal_call[i].context);
internal->signal_call[i].call = FALSE;