mirror of
https://github.com/troglobit/finit.git
synced 2026-11-03 13:28:27 +00:00
Minor update and refactor, use kernel doc style comments
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
b8bf26b107
commit
b182e6bcc5
1 file changed
+12
-11
+12
-11
@@ -76,8 +76,7 @@ int service_enabled(svc_t *svc)
|
|||||||
* @arg: Callback argument, from init
|
* @arg: Callback argument, from init
|
||||||
* @events: Error, or ready to read/write (N/A for relative timers)
|
* @events: Error, or ready to read/write (N/A for relative timers)
|
||||||
*
|
*
|
||||||
* Calls the callback registered with the call to
|
* Run callback registered when calling service_timeout_after().
|
||||||
* service_timeout_after().
|
|
||||||
*/
|
*/
|
||||||
static void service_timeout_cb(uev_t *w, void *arg, int events)
|
static void service_timeout_cb(uev_t *w, void *arg, int events)
|
||||||
{
|
{
|
||||||
@@ -89,14 +88,15 @@ static void service_timeout_cb(uev_t *w, void *arg, int events)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* service_timeout_after - Call a function after some time has elapsed
|
* service_timeout_after - Call a function after some time has elapsed
|
||||||
* @param svc Service to use as argument to the callback
|
* @svc: Service to use as argument to the callback
|
||||||
* @param timeout Timeout, in milliseconds
|
* @timeout: Timeout, in milliseconds
|
||||||
* @param cb Callback function
|
* @cb: Callback function
|
||||||
*
|
*
|
||||||
* After @param timeout milliseconds has elapsed, calls @param cb with
|
* After @timeout milliseconds has elapsed, call @cb() with @svc as the
|
||||||
* @param svc as the argument.
|
* argument.
|
||||||
*
|
*
|
||||||
* @return 0 on success, non-zero on error.
|
* Returns:
|
||||||
|
* POSIX OK(0) on success, non-zero on error.
|
||||||
*/
|
*/
|
||||||
static int service_timeout_after(svc_t *svc, int timeout, void (*cb)(svc_t *svc))
|
static int service_timeout_after(svc_t *svc, int timeout, void (*cb)(svc_t *svc))
|
||||||
{
|
{
|
||||||
@@ -109,11 +109,12 @@ static int service_timeout_after(svc_t *svc, int timeout, void (*cb)(svc_t *svc)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* service_timeout_cancel - Cancel timeout associated with service
|
* service_timeout_cancel - Cancel timeout associated with service
|
||||||
* @param svc Service whose timeout to cancel
|
* @svc: Service whose timeout to cancel
|
||||||
*
|
*
|
||||||
* If a timeout is associated with @param svc, cancel it.
|
* If a timeout is associated with @svc, cancel it.
|
||||||
*
|
*
|
||||||
* @return 0 on success, non-zero on error.
|
* Returns:
|
||||||
|
* POSIX OK(0) on success, non-zero on error.
|
||||||
*/
|
*/
|
||||||
static int service_timeout_cancel(svc_t *svc)
|
static int service_timeout_cancel(svc_t *svc)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user