From 6a92a419ff947fbf6f7c6e3ce8a4e7d92ebcdf44 Mon Sep 17 00:00:00 2001 From: counterpoint Date: Mon, 27 Jul 2015 09:01:12 +0100 Subject: [PATCH] Remove function declaration - moved to header. Implement spin_reporter in server.c, required for correct compilation when SPINLOCK_PROFILE is defined true. --- server/core/dcb.c | 1 - server/core/server.c | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/server/core/dcb.c b/server/core/dcb.c index efaad24ae..889178fd5 100644 --- a/server/core/dcb.c +++ b/server/core/dcb.c @@ -109,7 +109,6 @@ static inline void dcb_write_when_already_queued(DCB *dcb, GWBUF *queue); static int dcb_log_write_failure(DCB *dcb, GWBUF *queue, int eno); static inline void dcb_write_tidy_up(DCB *dcb, bool below_water); static int dcb_write_SSL_error_report (DCB *dcb, int ret); -int session_unlink_dcb(SESSION*, DCB*); size_t dcb_get_session_id( DCB *dcb) diff --git a/server/core/server.c b/server/core/server.c index 143c1d9cc..2625cf1ce 100644 --- a/server/core/server.c +++ b/server/core/server.c @@ -55,6 +55,8 @@ extern __thread log_info_t tls_log_info; static SPINLOCK server_spin = SPINLOCK_INIT; static SERVER *allServers = NULL; +static void spin_reporter(void *, char *, int); + /** * Allocate a new server withn the gateway * @@ -543,6 +545,19 @@ SERVER_PARAM *param; } } +/** + * Display an entry from the spinlock statistics data + * + * @param dcb The DCB to print to + * @param desc Description of the statistic + * @param value The statistic value + */ +static void +spin_reporter(void *dcb, char *desc, int value) +{ + dcb_printf((DCB *)dcb, "\t\t%-40s %d\n", desc, value); +} + /** * Diagnostic to print all DCBs in persistent pool for a server *