From 8b1ea3124c95c26fb1a7c8a106c7aaf7b817ccc0 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 2 Aug 2011 14:35:29 +0000 Subject: fixing parent_control_handler hack, adding lifeness attribute to tasks --- src/include/gnunet_scheduler_lib.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/include/gnunet_scheduler_lib.h') diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h index 774f2f4bc..ce3261f0a 100644 --- a/src/include/gnunet_scheduler_lib.h +++ b/src/include/gnunet_scheduler_lib.h @@ -1,6 +1,6 @@ /* This file is part of GNUnet - (C) 2009 Christian Grothoff (and other contributing authors) + (C) 2009, 2011 Christian Grothoff (and other contributing authors) GNUnet is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -322,6 +322,26 @@ GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, void *task_cls); +/** + * Schedule a new task to be run as soon as possible with the + * (transitive) ignore-shutdown flag either explicitly set or + * explicitly enabled. This task (and all tasks created from it, + * other than by another call to this function) will either count or + * not count for the 'lifeness' of the process. This API is only + * useful in a few special cases. + * + * @param lifeness GNUNET_YES if the task counts for lifeness, GNUNET_NO if not. + * @param task main function of the task + * @param task_cls closure of task + * @return unique task identifier for the job + * only valid until "task" is started! + */ +GNUNET_SCHEDULER_TaskIdentifier +GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness, + GNUNET_SCHEDULER_Task task, + void *task_cls); + + /** * Schedule a new task to be run with a specified delay. The task * will be scheduled for execution once the delay has expired. It -- cgit v1.2.3