From b182e6bcc5de27e57f1b5219f7db86f2bfd2e89d Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 13 Dec 2017 11:34:22 +0100 Subject: [PATCH] Minor update and refactor, use kernel doc style comments Signed-off-by: Joachim Nilsson --- src/service.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/service.c b/src/service.c index 70814209..e5e6afe9 100644 --- a/src/service.c +++ b/src/service.c @@ -76,8 +76,7 @@ int service_enabled(svc_t *svc) * @arg: Callback argument, from init * @events: Error, or ready to read/write (N/A for relative timers) * - * Calls the callback registered with the call to - * service_timeout_after(). + * Run callback registered when calling service_timeout_after(). */ 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 - * @param svc Service to use as argument to the callback - * @param timeout Timeout, in milliseconds - * @param cb Callback function + * @svc: Service to use as argument to the callback + * @timeout: Timeout, in milliseconds + * @cb: Callback function * - * After @param timeout milliseconds has elapsed, calls @param cb with - * @param svc as the argument. + * After @timeout milliseconds has elapsed, call @cb() with @svc as the + * 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)) { @@ -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 - * @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) {