aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_scheduler_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_scheduler_lib.h')
-rw-r--r--src/include/gnunet_scheduler_lib.h56
1 files changed, 23 insertions, 33 deletions
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h
index 723f8ca91..c09153e31 100644
--- a/src/include/gnunet_scheduler_lib.h
+++ b/src/include/gnunet_scheduler_lib.h
@@ -206,10 +206,10 @@ typedef void (*GNUNET_SCHEDULER_Task) (void *cls,
206 * @return number of selected sockets, GNUNET_SYSERR on error 206 * @return number of selected sockets, GNUNET_SYSERR on error
207 */ 207 */
208typedef int (*GNUNET_SCHEDULER_select) (void *cls, 208typedef int (*GNUNET_SCHEDULER_select) (void *cls,
209 struct GNUNET_NETWORK_FDSet *rfds, 209 struct GNUNET_NETWORK_FDSet * rfds,
210 struct GNUNET_NETWORK_FDSet *wfds, 210 struct GNUNET_NETWORK_FDSet * wfds,
211 struct GNUNET_NETWORK_FDSet *efds, 211 struct GNUNET_NETWORK_FDSet * efds,
212 struct GNUNET_TIME_Relative timeout); 212 struct GNUNET_TIME_Relative timeout);
213/** 213/**
214 * Initialize and run scheduler. This function will return when all 214 * Initialize and run scheduler. This function will return when all
215 * tasks have completed. On systems with signals, receiving a SIGTERM 215 * tasks have completed. On systems with signals, receiving a SIGTERM
@@ -258,8 +258,7 @@ unsigned int GNUNET_SCHEDULER_get_load (enum GNUNET_SCHEDULER_Priority p);
258 * 258 *
259 * * @return reason(s) why the current task is run 259 * * @return reason(s) why the current task is run
260 */ 260 */
261enum GNUNET_SCHEDULER_Reason 261enum GNUNET_SCHEDULER_Reason GNUNET_SCHEDULER_get_reason ();
262GNUNET_SCHEDULER_get_reason ();
263 262
264 263
265/** 264/**
@@ -305,8 +304,7 @@ GNUNET_SCHEDULER_add_continuation (GNUNET_SCHEDULER_Task task,
305 */ 304 */
306GNUNET_SCHEDULER_TaskIdentifier 305GNUNET_SCHEDULER_TaskIdentifier
307GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_TaskIdentifier prerequisite_task, 306GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_TaskIdentifier prerequisite_task,
308 GNUNET_SCHEDULER_Task task, 307 GNUNET_SCHEDULER_Task task, void *task_cls);
309 void *task_cls);
310 308
311 309
312/** 310/**
@@ -320,8 +318,7 @@ GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_TaskIdentifier prerequisite_task,
320 */ 318 */
321GNUNET_SCHEDULER_TaskIdentifier 319GNUNET_SCHEDULER_TaskIdentifier
322GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio, 320GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio,
323 GNUNET_SCHEDULER_Task task, 321 GNUNET_SCHEDULER_Task task, void *task_cls);
324 void *task_cls);
325 322
326 323
327/** 324/**
@@ -334,8 +331,7 @@ GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio,
334 * only valid until "task" is started! 331 * only valid until "task" is started!
335 */ 332 */
336GNUNET_SCHEDULER_TaskIdentifier 333GNUNET_SCHEDULER_TaskIdentifier
337GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, 334GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, void *task_cls);
338 void *task_cls);
339 335
340 336
341/** 337/**
@@ -354,8 +350,8 @@ GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task,
354 */ 350 */
355GNUNET_SCHEDULER_TaskIdentifier 351GNUNET_SCHEDULER_TaskIdentifier
356GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness, 352GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness,
357 GNUNET_SCHEDULER_Task task, 353 GNUNET_SCHEDULER_Task task,
358 void *task_cls); 354 void *task_cls);
359 355
360 356
361/** 357/**
@@ -372,8 +368,7 @@ GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness,
372 */ 368 */
373GNUNET_SCHEDULER_TaskIdentifier 369GNUNET_SCHEDULER_TaskIdentifier
374GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay, 370GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay,
375 GNUNET_SCHEDULER_Task task, 371 GNUNET_SCHEDULER_Task task, void *task_cls);
376 void *task_cls);
377 372
378 373
379/** 374/**
@@ -394,9 +389,8 @@ GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay,
394 */ 389 */
395GNUNET_SCHEDULER_TaskIdentifier 390GNUNET_SCHEDULER_TaskIdentifier
396GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, 391GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay,
397 struct GNUNET_NETWORK_Handle *rfd, 392 struct GNUNET_NETWORK_Handle *rfd,
398 GNUNET_SCHEDULER_Task task, 393 GNUNET_SCHEDULER_Task task, void *task_cls);
399 void *task_cls);
400 394
401 395
402/** 396/**
@@ -417,9 +411,8 @@ GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay,
417 */ 411 */
418GNUNET_SCHEDULER_TaskIdentifier 412GNUNET_SCHEDULER_TaskIdentifier
419GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay, 413GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay,
420 struct GNUNET_NETWORK_Handle *wfd, 414 struct GNUNET_NETWORK_Handle *wfd,
421 GNUNET_SCHEDULER_Task task, 415 GNUNET_SCHEDULER_Task task, void *task_cls);
422 void *task_cls);
423 416
424 417
425/** 418/**
@@ -440,9 +433,8 @@ GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay,
440 */ 433 */
441GNUNET_SCHEDULER_TaskIdentifier 434GNUNET_SCHEDULER_TaskIdentifier
442GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay, 435GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay,
443 const struct GNUNET_DISK_FileHandle *rfd, 436 const struct GNUNET_DISK_FileHandle *rfd,
444 GNUNET_SCHEDULER_Task task, 437 GNUNET_SCHEDULER_Task task, void *task_cls);
445 void *task_cls);
446 438
447 439
448/** 440/**
@@ -463,9 +455,8 @@ GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay,
463 */ 455 */
464GNUNET_SCHEDULER_TaskIdentifier 456GNUNET_SCHEDULER_TaskIdentifier
465GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay, 457GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay,
466 const struct GNUNET_DISK_FileHandle *wfd, 458 const struct GNUNET_DISK_FileHandle *wfd,
467 GNUNET_SCHEDULER_Task task, 459 GNUNET_SCHEDULER_Task task, void *task_cls);
468 void *task_cls);
469 460
470 461
471/** 462/**
@@ -505,10 +496,9 @@ GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio,
505 GNUNET_SCHEDULER_TaskIdentifier 496 GNUNET_SCHEDULER_TaskIdentifier
506 prerequisite_task, 497 prerequisite_task,
507 struct GNUNET_TIME_Relative delay, 498 struct GNUNET_TIME_Relative delay,
508 const struct GNUNET_NETWORK_FDSet * rs, 499 const struct GNUNET_NETWORK_FDSet *rs,
509 const struct GNUNET_NETWORK_FDSet * ws, 500 const struct GNUNET_NETWORK_FDSet *ws,
510 GNUNET_SCHEDULER_Task task, 501 GNUNET_SCHEDULER_Task task, void *task_cls);
511 void *task_cls);
512 502
513/** 503/**
514 * Sets the select function to use in the scheduler (scheduler_select). 504 * Sets the select function to use in the scheduler (scheduler_select).
@@ -518,7 +508,7 @@ GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio,
518 */ 508 */
519void 509void
520GNUNET_SCHEDULER_set_select (GNUNET_SCHEDULER_select new_select, 510GNUNET_SCHEDULER_set_select (GNUNET_SCHEDULER_select new_select,
521 void *new_select_cls); 511 void *new_select_cls);
522 512
523 513
524#if 0 /* keep Emacsens' auto-indent happy */ 514#if 0 /* keep Emacsens' auto-indent happy */