diff --git a/include/if.h b/include/if.h index 66bbb722a..22d4ada2c 100644 --- a/include/if.h +++ b/include/if.h @@ -18,7 +18,7 @@ #include "list.h" -#define IF_IRQ_MAX 3 /**< Maxmimal number of IRQs of an interface */ +#define IF_IRQ_MAX 3 /**< Maxmimal number of IRQs of an interface */ #ifndef SO_MARK #define SO_MARK 36 /**< Workaround: add missing constant for OPAL-RT Redhawk target */ diff --git a/include/linux.h b/include/linux.h index 1a73c3416..ec51aef65 100644 --- a/include/linux.h +++ b/include/linux.h @@ -1,5 +1,6 @@ -/** Linux kernel related procedures +/** Linux kernel related functions. * + * @file * @author Steffen Vogel * @copyright 2014-2016, Institute for Automation of Complex Power Systems, EONERC * This file is part of S2SS. All Rights Reserved. Proprietary and confidential. diff --git a/include/log.h b/include/log.h index a8c498d79..d09757a2e 100644 --- a/include/log.h +++ b/include/log.h @@ -14,9 +14,9 @@ #include #ifdef __GNUC__ - #define INDENT int __attribute__ ((__cleanup__(log_outdent), unused)) _old_indent = log_indent(1); + #define INDENT int __attribute__ ((__cleanup__(log_outdent), unused)) _old_indent = log_indent(1); #else - #define INDENT ; + #define INDENT ; #endif /* The log level which is passed as first argument to print() */ diff --git a/lib/file.c b/lib/file.c index 25e77613c..cd6e603a5 100644 --- a/lib/file.c +++ b/lib/file.c @@ -1,6 +1,4 @@ /** Node type: File - * - * This file implements the file type for nodes. * * @author Steffen Vogel * @copyright 2014-2016, Institute for Automation of Complex Power Systems, EONERC diff --git a/lib/gtfpga.c b/lib/gtfpga.c index fc94e3f54..c9dc4d647 100644 --- a/lib/gtfpga.c +++ b/lib/gtfpga.c @@ -1,6 +1,4 @@ /** Node type: GTFPGA (Xilinx ML507) - * - * This file implements the gtfpga subtype for nodes. * * @author Steffen Vogel * @copyright 2015-2016, Steffen Vogel diff --git a/lib/linux.c b/lib/linux.c index c95081a8d..0dd13377f 100644 --- a/lib/linux.c +++ b/lib/linux.c @@ -1,4 +1,4 @@ -/** kernel related procedures. +/** Linux kernel related functions. * * @author Steffen Vogel * @copyright 2014-2016, Institute for Automation of Complex Power Systems, EONERC @@ -124,6 +124,7 @@ int kernel_has_cmdline(const char *substr) return strstr(cmd, substr) ? 0 : -1; } + int kernel_get_cacheline_size() { return sysconf(_SC_LEVEL1_ICACHE_LINESIZE); diff --git a/lib/ngsi.c b/lib/ngsi.c index f87f1774b..de83d9830 100644 --- a/lib/ngsi.c +++ b/lib/ngsi.c @@ -1,12 +1,5 @@ - /** Node type: OMA Next Generation Services Interface 10 (NGSI) (FIWARE context broker) * - * This file implements the NGSI context interface. NGSI is RESTful HTTP is specified by - * the Open Mobile Alliance (OMA). - * It uses the standard operations of the NGSI 10 context information standard. - * - * @see https://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FI-WARE_NGSI-10_Open_RESTful_API_Specification - * @see http://technical.openmobilealliance.org/Technical/Release_Program/docs/NGSI/V1_0-20120529-A/OMA-TS-NGSI_Context_Management-V1_0-20120529-A.pdf * @author Steffen Vogel * @copyright 2014-2016, Institute for Automation of Complex Power Systems, EONERC * This file is part of S2SS. All Rights Reserved. Proprietary and confidential. diff --git a/lib/node.c b/lib/node.c index 119ac2ad6..34cc46f70 100644 --- a/lib/node.c +++ b/lib/node.c @@ -113,7 +113,6 @@ int node_stop(struct node *n) n->state = NODE_STOPPING; info("Stopping node %s", node_name(n)); - { INDENT ret = n->_vt->close ? n->_vt->close(n) : -1; } diff --git a/src/server.c b/src/server.c index afb8d26c4..b9e13b92f 100644 --- a/src/server.c +++ b/src/server.c @@ -60,9 +60,14 @@ static void quit() static void realtime_init() { INDENT - if (kernel_has_cmdline("isolcpus")) + int ret; + + ret = kernel_has_cmdline("isolcpus"); + if (ret) warn("You should reserve some cores for the server (see 'isolcpus')"); - if (kernel_is_rt()) + + ret = kernel_is_rt(); + if (ret) warn("We recommend to use an PREEMPT_RT patched kernel!"); /* Use FIFO scheduler with real time priority */ diff --git a/src/signal.c b/src/signal.c index d5d336021..0c3e28841 100644 --- a/src/signal.c +++ b/src/signal.c @@ -54,8 +54,7 @@ int main(int argc, char *argv[]) int type = TYPE_MIXED; int values = 1; int limit = -1; - - int counter = 0; + int counter; if (argc < 2) { usage(argv[0]); @@ -124,6 +123,7 @@ check: if (optarg == endptr) struct timespec start = time_now(); + counter = 0; while (limit < 0 || counter < limit) { struct timespec now = time_now(); double running = time_delta(&start, &now);