diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-09-25 22:10:51 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-09-25 22:10:51 +0000 |
commit | f1b9c5c115139b02cac1cae4f053792e1e5b1ccb (patch) | |
tree | cd9047d73ba498d05f67c7e06ae4bd5ed89511e7 /src/include/gnunet_signal_lib.h | |
parent | c2d3d24cd9b4f552d7ca8ad6283f9819c1cfefc7 (diff) | |
download | gnunet-f1b9c5c115139b02cac1cae4f053792e1e5b1ccb.tar.gz gnunet-f1b9c5c115139b02cac1cae4f053792e1e5b1ccb.zip |
improving style and docs
Diffstat (limited to 'src/include/gnunet_signal_lib.h')
-rw-r--r-- | src/include/gnunet_signal_lib.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/include/gnunet_signal_lib.h b/src/include/gnunet_signal_lib.h index af1ec0de4..e386ccc0e 100644 --- a/src/include/gnunet_signal_lib.h +++ b/src/include/gnunet_signal_lib.h | |||
@@ -35,6 +35,10 @@ extern "C" | |||
35 | #endif | 35 | #endif |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | /** | ||
39 | * Context created when a signal handler is installed; | ||
40 | * can be used to restore it to the previous state later. | ||
41 | */ | ||
38 | struct GNUNET_SIGNAL_Context; | 42 | struct GNUNET_SIGNAL_Context; |
39 | 43 | ||
40 | /** | 44 | /** |
@@ -50,6 +54,10 @@ typedef void (*GNUNET_SIGNAL_Handler) (void); | |||
50 | /** | 54 | /** |
51 | * Install a signal handler that will be run if the | 55 | * Install a signal handler that will be run if the |
52 | * given signal is received. | 56 | * given signal is received. |
57 | * | ||
58 | * @param signal the number of the signal | ||
59 | * @param handler the function to call | ||
60 | * @return context that can be used to restore, NULL on error | ||
53 | */ | 61 | */ |
54 | struct GNUNET_SIGNAL_Context *GNUNET_SIGNAL_handler_install (int signal, | 62 | struct GNUNET_SIGNAL_Context *GNUNET_SIGNAL_handler_install (int signal, |
55 | GNUNET_SIGNAL_Handler | 63 | GNUNET_SIGNAL_Handler |
@@ -57,6 +65,9 @@ struct GNUNET_SIGNAL_Context *GNUNET_SIGNAL_handler_install (int signal, | |||
57 | 65 | ||
58 | /** | 66 | /** |
59 | * Uninstall a previously installed signal hander. | 67 | * Uninstall a previously installed signal hander. |
68 | * | ||
69 | * @param ctx context that was returned when the | ||
70 | * signal handler was installed | ||
60 | */ | 71 | */ |
61 | void GNUNET_SIGNAL_handler_uninstall (struct GNUNET_SIGNAL_Context *ctx); | 72 | void GNUNET_SIGNAL_handler_uninstall (struct GNUNET_SIGNAL_Context *ctx); |
62 | 73 | ||