diff options
Diffstat (limited to 'src/include/gnunet_scheduler_lib.h')
-rw-r--r-- | src/include/gnunet_scheduler_lib.h | 56 |
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 | */ |
208 | typedef int (*GNUNET_SCHEDULER_select) (void *cls, | 208 | typedef 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 | */ |
261 | enum GNUNET_SCHEDULER_Reason | 261 | enum GNUNET_SCHEDULER_Reason GNUNET_SCHEDULER_get_reason (); |
262 | GNUNET_SCHEDULER_get_reason (); | ||
263 | 262 | ||
264 | 263 | ||
265 | /** | 264 | /** |
@@ -305,8 +304,7 @@ GNUNET_SCHEDULER_add_continuation (GNUNET_SCHEDULER_Task task, | |||
305 | */ | 304 | */ |
306 | GNUNET_SCHEDULER_TaskIdentifier | 305 | GNUNET_SCHEDULER_TaskIdentifier |
307 | GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_TaskIdentifier prerequisite_task, | 306 | GNUNET_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 | */ |
321 | GNUNET_SCHEDULER_TaskIdentifier | 319 | GNUNET_SCHEDULER_TaskIdentifier |
322 | GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio, | 320 | GNUNET_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 | */ |
336 | GNUNET_SCHEDULER_TaskIdentifier | 333 | GNUNET_SCHEDULER_TaskIdentifier |
337 | GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, | 334 | GNUNET_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 | */ |
355 | GNUNET_SCHEDULER_TaskIdentifier | 351 | GNUNET_SCHEDULER_TaskIdentifier |
356 | GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness, | 352 | GNUNET_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 | */ |
373 | GNUNET_SCHEDULER_TaskIdentifier | 369 | GNUNET_SCHEDULER_TaskIdentifier |
374 | GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay, | 370 | GNUNET_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 | */ |
395 | GNUNET_SCHEDULER_TaskIdentifier | 390 | GNUNET_SCHEDULER_TaskIdentifier |
396 | GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, | 391 | GNUNET_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 | */ |
418 | GNUNET_SCHEDULER_TaskIdentifier | 412 | GNUNET_SCHEDULER_TaskIdentifier |
419 | GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay, | 413 | GNUNET_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 | */ |
441 | GNUNET_SCHEDULER_TaskIdentifier | 434 | GNUNET_SCHEDULER_TaskIdentifier |
442 | GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay, | 435 | GNUNET_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 | */ |
464 | GNUNET_SCHEDULER_TaskIdentifier | 456 | GNUNET_SCHEDULER_TaskIdentifier |
465 | GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay, | 457 | GNUNET_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 | */ |
519 | void | 509 | void |
520 | GNUNET_SCHEDULER_set_select (GNUNET_SCHEDULER_select new_select, | 510 | GNUNET_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 */ |