diff options
author | lurchi <lurchi@strangeplace.net> | 2017-08-09 22:24:25 +0200 |
---|---|---|
committer | lurchi <lurchi@strangeplace.net> | 2017-08-09 22:24:25 +0200 |
commit | 850ba0f677939b740ccff2d4dcaabe028ff5faf2 (patch) | |
tree | 9d872bdf8db47649f25d02884489876b9c86d779 /src/include/gnunet_scheduler_lib.h | |
parent | b44cf84da67b78b4022009321a01376d74530685 (diff) | |
download | gnunet-850ba0f677939b740ccff2d4dcaabe028ff5faf2.tar.gz gnunet-850ba0f677939b740ccff2d4dcaabe028ff5faf2.zip |
test_scheduler passing; new API function GNUNET_SCHEDULER_check_lifeness
Diffstat (limited to 'src/include/gnunet_scheduler_lib.h')
-rw-r--r-- | src/include/gnunet_scheduler_lib.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h index 68a5ac534..dea0a006a 100644 --- a/src/include/gnunet_scheduler_lib.h +++ b/src/include/gnunet_scheduler_lib.h | |||
@@ -383,6 +383,21 @@ typedef int | |||
383 | 383 | ||
384 | 384 | ||
385 | /** | 385 | /** |
386 | * Check if the system has initiated shutdown. This means no tasks | ||
387 | * that prevent shutdown were present and all tasks added with | ||
388 | * #GNUNET_SCHEDULER_add_shutdown were run already. | ||
389 | * | ||
390 | * Can be used by external event loop implementations to decide | ||
391 | * whether to keep running or not. | ||
392 | * | ||
393 | * @return #GNUNET_YES if tasks which prevent shutdown exist | ||
394 | * #GNUNET_NO if the system has initiated shutdown | ||
395 | */ | ||
396 | int | ||
397 | GNUNET_SCHEDULER_check_lifeness (); | ||
398 | |||
399 | |||
400 | /** | ||
386 | * Initialize and run scheduler. This function will return when all | 401 | * Initialize and run scheduler. This function will return when all |
387 | * tasks have completed. On systems with signals, receiving a SIGTERM | 402 | * tasks have completed. On systems with signals, receiving a SIGTERM |
388 | * (and other similar signals) will cause #GNUNET_SCHEDULER_shutdown | 403 | * (and other similar signals) will cause #GNUNET_SCHEDULER_shutdown |