X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=lib%2Fsilcutil%2Fos2%2Fsilcos2schedule.c;h=4cec5864644a3271c6da4261a25cb5097cf1e91b;hb=e7b6c157b80152bf9fb9266e6bdd93f9fb0db776;hp=f5db19d7cf10e7ae93804589590f08e210e9db90;hpb=09bae6acdf9a519c6d9b4e7535e7f7e56b6c24c1;p=silc.git diff --git a/lib/silcutil/os2/silcos2schedule.c b/lib/silcutil/os2/silcos2schedule.c index f5db19d7..4cec5864 100644 --- a/lib/silcutil/os2/silcos2schedule.c +++ b/lib/silcutil/os2/silcos2schedule.c @@ -20,12 +20,12 @@ /* XXX TODO */ -#include "silcincludes.h" +#include "silc.h" #include "silcschedule_i.h" /* Calls normal select() system call. */ -int silc_select(SilcScheduleFd fds, uint32 fds_count, struct timeval *timeout) +int silc_select(SilcScheduleFd fds, SilcUInt32 fds_count, struct timeval *timeout) { fd_set in, out; int ret, i, max_fd = 0; @@ -81,14 +81,12 @@ SILC_TASK_CALLBACK(silc_schedule_wakeup_cb) #endif /* SILC_THREADS */ -/* Initializes the wakeup of the scheduler. In multi-threaded environment +/* Initializes the platform specific scheduler. This for example initializes + the wakeup mechanism of the scheduler. In multi-threaded environment the scheduler needs to be wakenup when tasks are added or removed from - the task queues. This will initialize the wakeup for the scheduler. - Any tasks that needs to be registered must be registered to the `queue'. - It is quaranteed that the scheduler will automatically free any - registered tasks in this queue. This is system specific routine. */ + the task queues. Returns context to the platform specific scheduler. */ -void *silc_schedule_wakeup_init(SilcSchedule schedule) +void *silc_schedule_internal_init(SilcSchedule schedule, void *context) { #ifdef SILC_THREADS return NULL; @@ -97,9 +95,9 @@ void *silc_schedule_wakeup_init(SilcSchedule schedule) return NULL; } -/* Uninitializes the system specific wakeup. */ +/* Uninitializes the platform specific scheduler context. */ -void silc_schedule_wakeup_uninit(void *context) +void silc_schedule_internal_uninit(void *context) { #ifdef SILC_THREADS @@ -108,9 +106,58 @@ void silc_schedule_wakeup_uninit(void *context) /* Wakes up the scheduler */ -void silc_schedule_wakeup_internal(void *context) +void silc_schedule_internal_wakeup(void *context) { #ifdef SILC_THREADS #endif } + +/* Register signal */ + +void silc_schedule_internal_signal_register(void *context, + SilcUInt32 signal, + SilcTaskCallback callback, + void *callback_context) +{ + +} + +/* Unregister signal */ + +void silc_schedule_internal_signal_unregister(void *context, + SilcUInt32 signal, + SilcTaskCallback callback, + void *callback_context) +{ + +} + +/* Mark signal to be called later. */ + +void silc_schedule_internal_signal_call(void *context, SilcUInt32 signal) +{ + +} + +/* Call all signals */ + +void silc_schedule_internal_signals_call(void *context, + SilcSchedule schedule) +{ + +} + +/* Block registered signals in scheduler. */ + +void silc_schedule_internal_signals_block(void *context) +{ + +} + +/* Unblock registered signals in schedule. */ + +void silc_schedule_internal_signals_unblock(void *context) +{ + +}