aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_scheduler_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-08-15 21:51:21 +0000
committerChristian Grothoff <christian@grothoff.org>2011-08-15 21:51:21 +0000
commit6fd3e715cae09fa6e657c96f1c6f9711ee51f42f (patch)
treeedbc42f37889069033e57da201fef242939a6e0f /src/include/gnunet_scheduler_lib.h
parent502af2167f7c218366666ca4944bd7cc54b5b19a (diff)
downloadgnunet-6fd3e715cae09fa6e657c96f1c6f9711ee51f42f.tar.gz
gnunet-6fd3e715cae09fa6e657c96f1c6f9711ee51f42f.zip
indentation
Diffstat (limited to 'src/include/gnunet_scheduler_lib.h')
-rw-r--r--src/include/gnunet_scheduler_lib.h127
1 files changed, 82 insertions, 45 deletions
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h
index c09153e31..9ab3a3a84 100644
--- a/src/include/gnunet_scheduler_lib.h
+++ b/src/include/gnunet_scheduler_lib.h
@@ -190,8 +190,8 @@ struct GNUNET_SCHEDULER_TaskContext
190 * @param tc context information (why was this task triggered now) 190 * @param tc context information (why was this task triggered now)
191 */ 191 */
192typedef void (*GNUNET_SCHEDULER_Task) (void *cls, 192typedef void (*GNUNET_SCHEDULER_Task) (void *cls,
193 const struct 193 const struct GNUNET_SCHEDULER_TaskContext
194 GNUNET_SCHEDULER_TaskContext * tc); 194 * tc);
195 195
196 196
197/** 197/**
@@ -280,10 +280,9 @@ void *GNUNET_SCHEDULER_cancel (GNUNET_SCHEDULER_TaskIdentifier task);
280 * @param task_cls closure of task 280 * @param task_cls closure of task
281 * @param reason reason for task invocation 281 * @param reason reason for task invocation
282 */ 282 */
283void 283void GNUNET_SCHEDULER_add_continuation (GNUNET_SCHEDULER_Task task,
284GNUNET_SCHEDULER_add_continuation (GNUNET_SCHEDULER_Task task, 284 void *task_cls,
285 void *task_cls, 285 enum GNUNET_SCHEDULER_Reason reason);
286 enum GNUNET_SCHEDULER_Reason reason);
287 286
288 287
289/** 288/**
@@ -316,9 +315,13 @@ GNUNET_SCHEDULER_add_after (GNUNET_SCHEDULER_TaskIdentifier prerequisite_task,
316 * @return unique task identifier for the job 315 * @return unique task identifier for the job
317 * only valid until "task" is started! 316 * only valid until "task" is started!
318 */ 317 */
319GNUNET_SCHEDULER_TaskIdentifier 318GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_with_priority (enum
320GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio, 319 GNUNET_SCHEDULER_Priority
321 GNUNET_SCHEDULER_Task task, void *task_cls); 320 prio,
321 GNUNET_SCHEDULER_Task
322 task,
323 void
324 *task_cls);
322 325
323 326
324/** 327/**
@@ -330,8 +333,8 @@ GNUNET_SCHEDULER_add_with_priority (enum GNUNET_SCHEDULER_Priority prio,
330 * @return unique task identifier for the job 333 * @return unique task identifier for the job
331 * only valid until "task" is started! 334 * only valid until "task" is started!
332 */ 335 */
333GNUNET_SCHEDULER_TaskIdentifier 336GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task
334GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, void *task_cls); 337 task, void *task_cls);
335 338
336 339
337/** 340/**
@@ -348,10 +351,12 @@ GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, void *task_cls);
348 * @return unique task identifier for the job 351 * @return unique task identifier for the job
349 * only valid until "task" is started! 352 * only valid until "task" is started!
350 */ 353 */
351GNUNET_SCHEDULER_TaskIdentifier 354GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_now_with_lifeness (int
352GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness, 355 lifeness,
353 GNUNET_SCHEDULER_Task task, 356 GNUNET_SCHEDULER_Task
354 void *task_cls); 357 task,
358 void
359 *task_cls);
355 360
356 361
357/** 362/**
@@ -366,9 +371,12 @@ GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness,
366 * @return unique task identifier for the job 371 * @return unique task identifier for the job
367 * only valid until "task" is started! 372 * only valid until "task" is started!
368 */ 373 */
369GNUNET_SCHEDULER_TaskIdentifier 374GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_delayed (struct
370GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay, 375 GNUNET_TIME_Relative
371 GNUNET_SCHEDULER_Task task, void *task_cls); 376 delay,
377 GNUNET_SCHEDULER_Task
378 task,
379 void *task_cls);
372 380
373 381
374/** 382/**
@@ -387,10 +395,15 @@ GNUNET_SCHEDULER_add_delayed (struct GNUNET_TIME_Relative delay,
387 * @return unique task identifier for the job 395 * @return unique task identifier for the job
388 * only valid until "task" is started! 396 * only valid until "task" is started!
389 */ 397 */
390GNUNET_SCHEDULER_TaskIdentifier 398GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_read_net (struct
391GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay, 399 GNUNET_TIME_Relative
392 struct GNUNET_NETWORK_Handle *rfd, 400 delay,
393 GNUNET_SCHEDULER_Task task, void *task_cls); 401 struct
402 GNUNET_NETWORK_Handle
403 *rfd,
404 GNUNET_SCHEDULER_Task
405 task,
406 void *task_cls);
394 407
395 408
396/** 409/**
@@ -409,10 +422,15 @@ GNUNET_SCHEDULER_add_read_net (struct GNUNET_TIME_Relative delay,
409 * @return unique task identifier for the job 422 * @return unique task identifier for the job
410 * only valid until "task" is started! 423 * only valid until "task" is started!
411 */ 424 */
412GNUNET_SCHEDULER_TaskIdentifier 425GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_write_net (struct
413GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay, 426 GNUNET_TIME_Relative
414 struct GNUNET_NETWORK_Handle *wfd, 427 delay,
415 GNUNET_SCHEDULER_Task task, void *task_cls); 428 struct
429 GNUNET_NETWORK_Handle
430 *wfd,
431 GNUNET_SCHEDULER_Task
432 task,
433 void *task_cls);
416 434
417 435
418/** 436/**
@@ -431,10 +449,15 @@ GNUNET_SCHEDULER_add_write_net (struct GNUNET_TIME_Relative delay,
431 * @return unique task identifier for the job 449 * @return unique task identifier for the job
432 * only valid until "task" is started! 450 * only valid until "task" is started!
433 */ 451 */
434GNUNET_SCHEDULER_TaskIdentifier 452GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_read_file (struct
435GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay, 453 GNUNET_TIME_Relative
436 const struct GNUNET_DISK_FileHandle *rfd, 454 delay,
437 GNUNET_SCHEDULER_Task task, void *task_cls); 455 const struct
456 GNUNET_DISK_FileHandle
457 *rfd,
458 GNUNET_SCHEDULER_Task
459 task,
460 void *task_cls);
438 461
439 462
440/** 463/**
@@ -453,10 +476,16 @@ GNUNET_SCHEDULER_add_read_file (struct GNUNET_TIME_Relative delay,
453 * @return unique task identifier for the job 476 * @return unique task identifier for the job
454 * only valid until "task" is started! 477 * only valid until "task" is started!
455 */ 478 */
456GNUNET_SCHEDULER_TaskIdentifier 479GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_write_file (struct
457GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay, 480 GNUNET_TIME_Relative
458 const struct GNUNET_DISK_FileHandle *wfd, 481 delay,
459 GNUNET_SCHEDULER_Task task, void *task_cls); 482 const struct
483 GNUNET_DISK_FileHandle
484 *wfd,
485 GNUNET_SCHEDULER_Task
486 task,
487 void
488 *task_cls);
460 489
461 490
462/** 491/**
@@ -491,14 +520,23 @@ GNUNET_SCHEDULER_add_write_file (struct GNUNET_TIME_Relative delay,
491 * @return unique task identifier for the job 520 * @return unique task identifier for the job
492 * only valid until "task" is started! 521 * only valid until "task" is started!
493 */ 522 */
494GNUNET_SCHEDULER_TaskIdentifier 523GNUNET_SCHEDULER_TaskIdentifier GNUNET_SCHEDULER_add_select (enum
495GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio, 524 GNUNET_SCHEDULER_Priority
496 GNUNET_SCHEDULER_TaskIdentifier 525 prio,
497 prerequisite_task, 526 GNUNET_SCHEDULER_TaskIdentifier
498 struct GNUNET_TIME_Relative delay, 527 prerequisite_task,
499 const struct GNUNET_NETWORK_FDSet *rs, 528 struct
500 const struct GNUNET_NETWORK_FDSet *ws, 529 GNUNET_TIME_Relative
501 GNUNET_SCHEDULER_Task task, void *task_cls); 530 delay,
531 const struct
532 GNUNET_NETWORK_FDSet
533 *rs,
534 const struct
535 GNUNET_NETWORK_FDSet
536 *ws,
537 GNUNET_SCHEDULER_Task
538 task,
539 void *task_cls);
502 540
503/** 541/**
504 * Sets the select function to use in the scheduler (scheduler_select). 542 * Sets the select function to use in the scheduler (scheduler_select).
@@ -506,9 +544,8 @@ GNUNET_SCHEDULER_add_select (enum GNUNET_SCHEDULER_Priority prio,
506 * @param new_select new select function to use (NULL to reset to default) 544 * @param new_select new select function to use (NULL to reset to default)
507 * @param new_select_cls closure for 'new_select' 545 * @param new_select_cls closure for 'new_select'
508 */ 546 */
509void 547void GNUNET_SCHEDULER_set_select (GNUNET_SCHEDULER_select new_select,
510GNUNET_SCHEDULER_set_select (GNUNET_SCHEDULER_select new_select, 548 void *new_select_cls);
511 void *new_select_cls);
512 549
513 550
514#if 0 /* keep Emacsens' auto-indent happy */ 551#if 0 /* keep Emacsens' auto-indent happy */