diff --git a/include/villas/api/session.h b/include/villas/api/session.h index 872c9eba4..55835a8b4 100644 --- a/include/villas/api/session.h +++ b/include/villas/api/session.h @@ -26,9 +26,9 @@ #include #include -#include "common.h" -#include "queue.h" -#include "buffer.h" +#include +#include +#include enum api_version { API_VERSION_UNKOWN = 0, @@ -59,7 +59,7 @@ struct api_session { struct lws *wsi; struct api *api; - + char *_name; }; diff --git a/include/villas/io/json.h b/include/villas/io/json.h index 8274732bc..d16df8f5b 100644 --- a/include/villas/io/json.h +++ b/include/villas/io/json.h @@ -24,7 +24,8 @@ #include -#include "sample.h" +/* Forward declarations */ +struct sample; int json_pack_sample(json_t **j, struct sample *s, int flags); diff --git a/include/villas/io/villas_human.h b/include/villas/io/villas_human.h index 8619c9c0e..a189514bc 100644 --- a/include/villas/io/villas_human.h +++ b/include/villas/io/villas_human.h @@ -25,7 +25,9 @@ #include -#include "io.h" +/* Forward declarations */ +struct io; +struct sample; int villas_human_print(struct io *io, struct sample *smps[], unsigned cnt); diff --git a/include/villas/nodes/amqp.h b/include/villas/nodes/amqp.h index 5e36a5d77..3b0d9eb18 100644 --- a/include/villas/nodes/amqp.h +++ b/include/villas/nodes/amqp.h @@ -33,8 +33,8 @@ #include -#include "node.h" -#include "list.h" +#include +#include /* Forward declarations */ struct io_format; diff --git a/include/villas/nodes/cbuilder.h b/include/villas/nodes/cbuilder.h index 169500230..9afe45e9d 100644 --- a/include/villas/nodes/cbuilder.h +++ b/include/villas/nodes/cbuilder.h @@ -15,7 +15,7 @@ #include -#include "list.h" +#include /* Forward declaration */ struct cbuilder; @@ -45,7 +45,7 @@ struct cbuilder { * The simulation step is triggerd by a call to cbuilder_write(). */ pthread_mutex_t mtx; - + int eventfd; /**< Eventfd for synchronizing cbuilder_read() / cbuilder_write() access. */ }; diff --git a/include/villas/nodes/file.h b/include/villas/nodes/file.h index 624a73ee5..75a40b790 100644 --- a/include/villas/nodes/file.h +++ b/include/villas/nodes/file.h @@ -31,9 +31,9 @@ #pragma once -#include "io.h" -#include "node.h" -#include "task.h" +#include +#include +#include #define FILE_MAX_PATHLEN 512 @@ -56,7 +56,7 @@ struct file { FILE_EPOCH_ABSOLUTE, FILE_EPOCH_ORIGINAL } epoch_mode; /**< Specifies how file::offset is calculated. */ - + enum { FILE_EOF_EXIT, /**< Terminate when EOF is reached. */ FILE_EOF_REWIND, /**< Rewind the file when EOF is reached. */ diff --git a/include/villas/nodes/influxdb.h b/include/villas/nodes/influxdb.h index c05fe98f0..919725b55 100644 --- a/include/villas/nodes/influxdb.h +++ b/include/villas/nodes/influxdb.h @@ -29,7 +29,7 @@ #pragma once -#include "list.h" +#include /* Forward declarations */ struct node; diff --git a/include/villas/nodes/nanomsg.h b/include/villas/nodes/nanomsg.h index d4ba6070c..04d5c009b 100644 --- a/include/villas/nodes/nanomsg.h +++ b/include/villas/nodes/nanomsg.h @@ -31,8 +31,8 @@ #pragma once -#include "node.h" -#include "list.h" +#include +#include /** The maximum length of a packet which contains stuct msg. */ #define NANOMSG_MAX_PACKET_LEN 1500 diff --git a/include/villas/nodes/ngsi.h b/include/villas/nodes/ngsi.h index a64ac459a..67c9bc766 100644 --- a/include/villas/nodes/ngsi.h +++ b/include/villas/nodes/ngsi.h @@ -38,10 +38,10 @@ #include #include -#include "list.h" -#include "super_node.h" -#include "node.h" -#include "task.h" +#include +#include +#include +#include struct node; diff --git a/include/villas/nodes/shmem.h b/include/villas/nodes/shmem.h index 5af608e86..a9c299209 100644 --- a/include/villas/nodes/shmem.h +++ b/include/villas/nodes/shmem.h @@ -29,12 +29,12 @@ #pragma once -#include "node.h" -#include "memory.h" -#include "pool.h" -#include "queue.h" -#include "config.h" -#include "shmem.h" +#include +#include +#include +#include +#include +#include /** Node-type for shared memory communication. * @see node_type diff --git a/include/villas/nodes/signal.h b/include/villas/nodes/signal.h index 7e9ebed64..3d07bae38 100644 --- a/include/villas/nodes/signal.h +++ b/include/villas/nodes/signal.h @@ -29,8 +29,8 @@ #pragma once -#include "timing.h" -#include "task.h" +#include +#include /* Forward declarations */ struct node; @@ -61,7 +61,7 @@ struct signal { double amplitude; /**< Amplitude of the generated signals. */ double stddev; /**< Standard deviation of random signals (normal distributed). */ double offset; /**< A constant bias. */ - + double *last; /**< The values from the previous period which are required for random walk. */ int values; /**< The number of values which will be emitted by this node. */ diff --git a/include/villas/nodes/socket.h b/include/villas/nodes/socket.h index b06c02fb4..6ac518b88 100644 --- a/include/villas/nodes/socket.h +++ b/include/villas/nodes/socket.h @@ -40,14 +40,14 @@ #endif #ifdef WITH_LIBNL_ROUTE_30 - #include "kernel/if.h" - #include "kernel/nl.h" - #include "kernel/tc.h" + #include + #include + #include #define WITH_NETEM #endif /* WITH_LIBNL_ROUTE_30 */ -#include "node.h" +#include /* Forward declarations */ struct io_format; diff --git a/include/villas/nodes/stats.h b/include/villas/nodes/stats.h index 8bb5235a7..27caf6621 100644 --- a/include/villas/nodes/stats.h +++ b/include/villas/nodes/stats.h @@ -31,7 +31,7 @@ #include -#include "task.h" +#include /* Forward declarations */ struct node; diff --git a/include/villas/nodes/test_rtt.h b/include/villas/nodes/test_rtt.h index 92d2e9ebe..0b5b04037 100644 --- a/include/villas/nodes/test_rtt.h +++ b/include/villas/nodes/test_rtt.h @@ -29,9 +29,9 @@ #pragma once -#include "list.h" -#include "io.h" -#include "task.h" +#include +#include +#include /* Forward declarations */ struct test_rtt; diff --git a/include/villas/nodes/websocket.h b/include/villas/nodes/websocket.h index 02e80a75d..ced6e522c 100644 --- a/include/villas/nodes/websocket.h +++ b/include/villas/nodes/websocket.h @@ -34,11 +34,11 @@ #include -#include "node.h" -#include "pool.h" -#include "queue_signalled.h" -#include "common.h" -#include "config.h" +#include +#include +#include +#include +#include #define DEFAULT_WEBSOCKET_QUEUELEN (DEFAULT_QUEUELEN * 64) #define DEFAULT_WEBSOCKET_SAMPLELEN DEFAULT_SAMPLELEN @@ -64,7 +64,7 @@ struct websocket_connection { STATE_SHUTDOWN, STATE_ERROR } state; /**< The current status of this connection. */ - + enum { WEBSOCKET_MODE_CLIENT, WEBSOCKET_MODE_SERVER, @@ -76,11 +76,11 @@ struct websocket_connection { struct queue queue; /**< For samples which are sent to the WebSocket */ struct websocket_destination *destination; - + struct { struct buffer recv; /**< A buffer for reconstructing fragmented messags. */ struct buffer send; /**< A buffer for contsructing messages before calling lws_write() */ - } buffers; + } buffers; char *_name; }; diff --git a/include/villas/nodes/zeromq.h b/include/villas/nodes/zeromq.h index 118346a0f..adf0836de 100644 --- a/include/villas/nodes/zeromq.h +++ b/include/villas/nodes/zeromq.h @@ -32,7 +32,7 @@ #include #include -#include "list.h" +#include #if ZMQ_BUILD_DRAFT_API && (ZMQ_VERSION_MAJOR > 4 || (ZMQ_VERSION_MAJOR == 4 && ZMQ_VERSION_MINOR >= 2)) #define ZMQ_BUILD_DISH 1 diff --git a/lib/advio.c b/lib/advio.c index dff6ea9bf..9a9d2f738 100644 --- a/lib/advio.c +++ b/lib/advio.c @@ -32,10 +32,10 @@ #include -#include "utils.h" -#include "config.h" -#include "advio.h" -#include "crypt.h" +#include +#include +#include +#include #define BAR_WIDTH 60 /**< How wide you want the progress meter to be. */ diff --git a/lib/api.c b/lib/api.c index 1761b829d..8ea079949 100644 --- a/lib/api.c +++ b/lib/api.c @@ -22,14 +22,14 @@ #include #include +#include -#include "api.h" -#include "log.h" -#include "web.h" -#include "config.h" -#include "assert.h" -#include "memory.h" -#include "compat.h" +#include +#include +#include +#include +#include +#include /* Forward declarations */ static void * api_worker(void *ctx); diff --git a/lib/api/actions/capabiltities.c b/lib/api/actions/capabiltities.c index 5da974c21..ea2a0d57b 100644 --- a/lib/api/actions/capabiltities.c +++ b/lib/api/actions/capabiltities.c @@ -20,7 +20,8 @@ * along with this program. If not, see . *********************************************************************************/ -#include "plugin.h" +#include +#include static int api_capabilities(struct api_action *h, json_t *args, json_t **resp, struct api_session *s) { diff --git a/lib/api/actions/config.c b/lib/api/actions/config.c index c3f86021d..aa749f14b 100644 --- a/lib/api/actions/config.c +++ b/lib/api/actions/config.c @@ -20,10 +20,10 @@ * along with this program. If not, see . *********************************************************************************/ -#include "api.h" -#include "utils.h" -#include "plugin.h" -#include "super_node.h" +#include +#include +#include +#include static int api_config(struct api_action *h, json_t *args, json_t **resp, struct api_session *s) { diff --git a/lib/api/actions/nodes.c b/lib/api/actions/nodes.c index 4a1a940ac..d78caa86f 100644 --- a/lib/api/actions/nodes.c +++ b/lib/api/actions/nodes.c @@ -22,13 +22,13 @@ #include -#include "plugin.h" -#include "node.h" -#include "super_node.h" -#include "utils.h" -#include "stats.h" +#include +#include +#include +#include +#include -#include "api.h" +#include static int api_nodes(struct api_action *r, json_t *args, json_t **resp, struct api_session *s) { diff --git a/lib/api/actions/paths.c b/lib/api/actions/paths.c index 0ad270a1f..e46dd7533 100644 --- a/lib/api/actions/paths.c +++ b/lib/api/actions/paths.c @@ -22,12 +22,11 @@ #include -#include "plugin.h" -#include "path.h" -#include "utils.h" -#include "super_node.h" - -#include "api.h" +#include +#include +#include +#include +#include static int api_paths(struct api_action *r, json_t *args, json_t **resp, struct api_session *s) { diff --git a/lib/api/actions/restart.c b/lib/api/actions/restart.c index 2db2bf9b2..32e88e00b 100644 --- a/lib/api/actions/restart.c +++ b/lib/api/actions/restart.c @@ -22,11 +22,11 @@ #include -#include "plugin.h" -#include "api.h" -#include "super_node.h" +#include +#include +#include -#include "log.h" +#include static char *config; diff --git a/lib/api/actions/shutdown.c b/lib/api/actions/shutdown.c index c99760de6..7905273ec 100644 --- a/lib/api/actions/shutdown.c +++ b/lib/api/actions/shutdown.c @@ -20,8 +20,8 @@ * along with this program. If not, see . *********************************************************************************/ -#include "plugin.h" -#include "api.h" +#include +#include static int api_shutdown(struct api_action *h, json_t *args, json_t **resp, struct api_session *s) { diff --git a/lib/api/session.c b/lib/api/session.c index 7b084ac8c..8ad155efe 100644 --- a/lib/api/session.c +++ b/lib/api/session.c @@ -20,11 +20,10 @@ * along with this program. If not, see . *********************************************************************************/ -#include "api/session.h" - -#include "web.h" -#include "plugin.h" -#include "memory.h" +#include +#include +#include +#include int api_session_init(struct api_session *s, enum api_mode m) { diff --git a/lib/bitset.c b/lib/bitset.c index f136ca013..9aecb66bf 100644 --- a/lib/bitset.c +++ b/lib/bitset.c @@ -23,8 +23,8 @@ #include #include -#include "bitset.h" -#include "utils.h" +#include +#include #define bitset_mask(b) (1 << ((b) % CHAR_BIT)) #define bitset_slot(b) ((b) / CHAR_BIT) diff --git a/lib/buffer.c b/lib/buffer.c index 85a961b38..8e1a72314 100644 --- a/lib/buffer.c +++ b/lib/buffer.c @@ -23,9 +23,9 @@ #include -#include "compat.h" -#include "buffer.h" -#include "common.h" +#include +#include +#include int buffer_init(struct buffer *b, size_t size) { diff --git a/lib/compat.c b/lib/compat.c index af04ff335..14b105e7b 100644 --- a/lib/compat.c +++ b/lib/compat.c @@ -23,7 +23,7 @@ #include #include -#include "compat.h" +#include #if JANSSON_VERSION_HEX < 0x020A00 size_t json_dumpb(const json_t *json, char *buffer, size_t size, size_t flags) diff --git a/lib/config_helper.c b/lib/config_helper.c index 4ceda364a..62f64f549 100644 --- a/lib/config_helper.c +++ b/lib/config_helper.c @@ -22,8 +22,9 @@ #include -#include "config_helper.h" -#include "utils.h" +#include +#include +#include #ifdef WITH_LIBCONFIG diff --git a/lib/crypt.c b/lib/crypt.c index 1e84bffa1..63b8a7329 100644 --- a/lib/crypt.c +++ b/lib/crypt.c @@ -20,7 +20,7 @@ * along with this program. If not, see . *********************************************************************************/ -#include "crypt.h" +#include int sha1sum(FILE *f, unsigned char *sha1) { diff --git a/lib/hist.c b/lib/hist.c index 7d4484270..b926abf9a 100644 --- a/lib/hist.c +++ b/lib/hist.c @@ -27,10 +27,10 @@ #include #include -#include "utils.h" -#include "hist.h" -#include "config.h" -#include "table.h" +#include +#include +#include +#include #define VAL(h, i) ((h)->low + (i) * (h)->resolution) #define INDEX(h, v) round((v - (h)->low) / (h)->resolution) diff --git a/lib/hook.c b/lib/hook.c index fc49bced6..3c1b0c6a9 100644 --- a/lib/hook.c +++ b/lib/hook.c @@ -22,14 +22,14 @@ #include #include -#include "timing.h" -#include "config.h" -#include "hook.h" -#include "path.h" -#include "utils.h" -#include "node.h" -#include "plugin.h" -#include "config_helper.h" +#include +#include +#include +#include +#include +#include +#include +#include int hook_init(struct hook *h, struct hook_type *vt, struct path *p, struct node *n) { diff --git a/lib/hooks/convert.c b/lib/hooks/convert.c index f9753c094..411c80cf1 100644 --- a/lib/hooks/convert.c +++ b/lib/hooks/convert.c @@ -26,9 +26,9 @@ #include -#include "hook.h" -#include "plugin.h" -#include "sample.h" +#include +#include +#include struct convert { enum { diff --git a/lib/hooks/decimate.c b/lib/hooks/decimate.c index f20622bd9..7f36c1659 100644 --- a/lib/hooks/decimate.c +++ b/lib/hooks/decimate.c @@ -24,8 +24,8 @@ * @{ */ -#include "hook.h" -#include "plugin.h" +#include +#include struct decimate { int ratio; diff --git a/lib/hooks/drop.c b/lib/hooks/drop.c index 0ac6d39fb..5111d1fa4 100644 --- a/lib/hooks/drop.c +++ b/lib/hooks/drop.c @@ -24,11 +24,11 @@ * @{ */ -#include "hook.h" -#include "plugin.h" -#include "stats.h" -#include "node.h" -#include "sample.h" +#include +#include +#include +#include +#include struct drop { struct sample *prev; diff --git a/lib/hooks/jitter_calc.c b/lib/hooks/jitter_calc.c index 418ad854c..36ceaf2dd 100644 --- a/lib/hooks/jitter_calc.c +++ b/lib/hooks/jitter_calc.c @@ -27,10 +27,10 @@ #include #include -#include "hook.h" -#include "plugin.h" -#include "timing.h" -#include "sample.h" +#include +#include +#include +#include #define GPS_NTP_DELAY_WIN_SIZE 16 diff --git a/lib/hooks/map.c b/lib/hooks/map.c index 4d997b7f8..a178a237c 100644 --- a/lib/hooks/map.c +++ b/lib/hooks/map.c @@ -24,13 +24,13 @@ * @{ */ -#include "plugin.h" -#include "mapping.h" -#include "list.h" -#include "utils.h" -#include "path.h" -#include "sample.h" -#include "node.h" +#include +#include +#include +#include +#include +#include +#include struct map { struct list mapping; diff --git a/lib/hooks/print.c b/lib/hooks/print.c index e12650589..4a0cafa1b 100644 --- a/lib/hooks/print.c +++ b/lib/hooks/print.c @@ -24,10 +24,10 @@ * @{ */ -#include "hook.h" -#include "plugin.h" -#include "sample.h" -#include "io.h" +#include +#include +#include +#include struct print { struct io io; diff --git a/lib/hooks/restart.c b/lib/hooks/restart.c index 0ff87433f..01de543c7 100644 --- a/lib/hooks/restart.c +++ b/lib/hooks/restart.c @@ -24,10 +24,10 @@ * @{ */ -#include "hook.h" -#include "plugin.h" -#include "node.h" -#include "sample.h" +#include +#include +#include +#include struct restart { struct sample *prev; diff --git a/lib/hooks/shift_seq.c b/lib/hooks/shift_seq.c index 6833d2052..3414634b8 100644 --- a/lib/hooks/shift_seq.c +++ b/lib/hooks/shift_seq.c @@ -24,9 +24,9 @@ * @{ */ -#include "hook.h" -#include "plugin.h" -#include "sample.h" +#include +#include +#include struct shift { int offset; diff --git a/lib/hooks/shift_ts.c b/lib/hooks/shift_ts.c index 589c4ec58..a57d961d8 100644 --- a/lib/hooks/shift_ts.c +++ b/lib/hooks/shift_ts.c @@ -26,10 +26,10 @@ #include -#include "hook.h" -#include "plugin.h" -#include "timing.h" -#include "sample.h" +#include +#include +#include +#include struct shift_ts { struct timespec offset; diff --git a/lib/hooks/skip_first.c b/lib/hooks/skip_first.c index c9c39bf56..2ce0c462f 100644 --- a/lib/hooks/skip_first.c +++ b/lib/hooks/skip_first.c @@ -24,10 +24,10 @@ * @{ */ -#include "hook.h" -#include "plugin.h" -#include "timing.h" -#include "sample.h" +#include +#include +#include +#include struct skip_first { enum { diff --git a/lib/hooks/stats.c b/lib/hooks/stats.c index 1998d51be..685277b2b 100644 --- a/lib/hooks/stats.c +++ b/lib/hooks/stats.c @@ -26,13 +26,13 @@ #include -#include "common.h" -#include "advio.h" -#include "hook.h" -#include "plugin.h" -#include "stats.h" -#include "node.h" -#include "timing.h" +#include +#include +#include +#include +#include +#include +#include struct stats_collect { struct stats stats; diff --git a/lib/hooks/ts.c b/lib/hooks/ts.c index 0fb7d86e6..83d75c97f 100644 --- a/lib/hooks/ts.c +++ b/lib/hooks/ts.c @@ -24,10 +24,10 @@ * @{ */ -#include "hook.h" -#include "plugin.h" -#include "timing.h" -#include "sample.h" +#include +#include +#include +#include static int ts_read(struct hook *h, struct sample *smps[], unsigned *cnt) { diff --git a/lib/io.c b/lib/io.c index 3535ac798..0ee4463a6 100644 --- a/lib/io.c +++ b/lib/io.c @@ -25,10 +25,10 @@ #include #include -#include "io.h" -#include "io_format.h" -#include "utils.h" -#include "sample.h" +#include +#include +#include +#include int io_init(struct io *io, struct io_format *fmt, int flags) { diff --git a/lib/io/csv.c b/lib/io/csv.c index da819ee3c..51e633550 100644 --- a/lib/io/csv.c +++ b/lib/io/csv.c @@ -24,10 +24,10 @@ #include #include -#include "io/csv.h" -#include "plugin.h" -#include "sample.h" -#include "timing.h" +#include +#include +#include +#include size_t csv_sprint_single(char *buf, size_t len, struct sample *s, int flags) { diff --git a/lib/io/json.c b/lib/io/json.c index 042e5aaff..96aa241bf 100644 --- a/lib/io/json.c +++ b/lib/io/json.c @@ -20,9 +20,10 @@ * along with this program. If not, see . *********************************************************************************/ -#include "plugin.h" -#include "compat.h" -#include "io/json.h" +#include +#include +#include +#include int json_pack_sample(json_t **j, struct sample *smp, int flags) { diff --git a/lib/io/msg.c b/lib/io/msg.c index ee20593b6..c1db43957 100644 --- a/lib/io/msg.c +++ b/lib/io/msg.c @@ -22,10 +22,10 @@ #include -#include "io/msg.h" -#include "io/msg_format.h" -#include "sample.h" -#include "utils.h" +#include +#include +#include +#include void msg_ntoh(struct msg *m) { diff --git a/lib/io/raw.c b/lib/io/raw.c index ce688216f..02fac8238 100644 --- a/lib/io/raw.c +++ b/lib/io/raw.c @@ -20,11 +20,11 @@ * along with this program. If not, see . *********************************************************************************/ -#include "sample.h" -#include "plugin.h" -#include "utils.h" -#include "io/raw.h" -#include "compat.h" +#include +#include +#include +#include +#include /** Convert float to host byte order */ #define SWAP_FLT_TOH(o, n) ({ \ diff --git a/lib/io/villas_binary.c b/lib/io/villas_binary.c index 55fa54432..87c63880b 100644 --- a/lib/io/villas_binary.c +++ b/lib/io/villas_binary.c @@ -22,13 +22,12 @@ #include -#include "io/villas_binary.h" - -#include "io/msg.h" -#include "io/msg_format.h" -#include "sample.h" -#include "utils.h" -#include "plugin.h" +#include +#include +#include +#include +#include +#include int villas_binary_sprint(char *buf, size_t len, size_t *wbytes, struct sample *smps[], unsigned cnt, int flags) { diff --git a/lib/io/villas_human.c b/lib/io/villas_human.c index d0f822cba..3f4e47aa3 100644 --- a/lib/io/villas_human.c +++ b/lib/io/villas_human.c @@ -25,12 +25,12 @@ #include #include -#include "io.h" -#include "plugin.h" -#include "utils.h" -#include "timing.h" -#include "sample.h" -#include "io/villas_human.h" +#include +#include +#include +#include +#include +#include struct villas_human { bool header_written; diff --git a/lib/io_format.c b/lib/io_format.c index 3ddaf2b4e..605941875 100644 --- a/lib/io_format.c +++ b/lib/io_format.c @@ -23,8 +23,8 @@ #include #include -#include "plugin.h" -#include "io_format.h" +#include +#include int io_format_sscan(struct io_format *fmt, char *buf, size_t len, size_t *rbytes, struct sample *smps[], unsigned cnt, int flags) { diff --git a/lib/kernel/kernel.c b/lib/kernel/kernel.c index d181d462d..e1421c95c 100644 --- a/lib/kernel/kernel.c +++ b/lib/kernel/kernel.c @@ -31,9 +31,9 @@ #include #include -#include "utils.h" -#include "config.h" -#include "kernel/kernel.h" +#include +#include +#include int kernel_get_cacheline_size() { diff --git a/lib/kernel/rt.c b/lib/kernel/rt.c index 8675c90df..76b9ca98b 100644 --- a/lib/kernel/rt.c +++ b/lib/kernel/rt.c @@ -24,12 +24,12 @@ #include #include -#include "config.h" -#include "utils.h" -#include "super_node.h" +#include +#include +#include -#include "kernel/kernel.h" -#include "kernel/rt.h" +#include +#include int rt_init(int priority, int affinity) { @@ -53,7 +53,7 @@ int rt_init(int priority, int affinity) rt_set_affinity(affinity); else warn("You might want to use the 'affinity' setting to pin VILLASnode to dedicate CPU cores"); - + rt_lock_memory(); #else warn("This platform is not optimized for real-time execution"); @@ -74,7 +74,7 @@ int rt_lock_memory() if (ret) error("Failed to lock memory"); #endif - + return 0; } diff --git a/lib/list.c b/lib/list.c index 82c6a17db..44e86af10 100644 --- a/lib/list.c +++ b/lib/list.c @@ -25,8 +25,8 @@ #include #include -#include "list.h" -#include "utils.h" +#include +#include /* Compare functions */ static int cmp_lookup(const void *a, const void *b) { diff --git a/lib/log.c b/lib/log.c index 3d700b3c8..bebf5aa7b 100644 --- a/lib/log.c +++ b/lib/log.c @@ -28,10 +28,11 @@ #include #include -#include "config.h" -#include "log.h" -#include "utils.h" -#include "timing.h" +#include +#include +#include +#include +#include #ifdef ENABLE_OPAL_ASYNC /* Define RTLAB before including OpalPrint.h for messages to be sent diff --git a/lib/log_config.c b/lib/log_config.c index ce587830e..4d8e162c7 100644 --- a/lib/log_config.c +++ b/lib/log_config.c @@ -24,12 +24,12 @@ #include #include #include +#include -#include "config.h" -#include "log.h" -#include "log_config.h" -#include "utils.h" -#include "string.h" +#include +#include +#include +#include int log_parse(struct log *l, json_t *cfg) { diff --git a/lib/log_helper.c b/lib/log_helper.c index df0f1c2d3..aca907f69 100644 --- a/lib/log_helper.c +++ b/lib/log_helper.c @@ -24,8 +24,8 @@ #include #include -#include "utils.h" -#include "log.h" +#include +#include void debug(long class, const char *fmt, ...) { diff --git a/lib/mapping.c b/lib/mapping.c index d744e7dd0..a470ef93c 100644 --- a/lib/mapping.c +++ b/lib/mapping.c @@ -22,12 +22,12 @@ #include -#include "mapping.h" -#include "stats.h" -#include "sample.h" -#include "list.h" -#include "utils.h" -#include "node.h" +#include +#include +#include +#include +#include +#include int mapping_parse_str(struct mapping_entry *me, const char *str, struct list *nodes) { diff --git a/lib/memory.c b/lib/memory.c index 1cfa0743a..4877ee01a 100644 --- a/lib/memory.c +++ b/lib/memory.c @@ -34,12 +34,12 @@ #ifdef __MACH__ #include #elif defined(__linux__) - #include "kernel/kernel.h" + #include #endif -#include "log.h" -#include "memory.h" -#include "utils.h" +#include +#include +#include int memory_init(int hugepages) { diff --git a/lib/node.c b/lib/node.c index 2d68c1837..f10d9ba48 100644 --- a/lib/node.c +++ b/lib/node.c @@ -22,14 +22,14 @@ #include -#include "sample.h" -#include "node.h" -#include "utils.h" -#include "config.h" -#include "plugin.h" -#include "config_helper.h" -#include "mapping.h" -#include "timing.h" +#include +#include +#include +#include +#include +#include +#include +#include int node_init(struct node *n, struct node_type *vt) { diff --git a/lib/node_type.c b/lib/node_type.c index 2459bba2c..b6d7df22f 100644 --- a/lib/node_type.c +++ b/lib/node_type.c @@ -22,12 +22,12 @@ #include -#include "sample.h" -#include "node.h" -#include "super_node.h" -#include "utils.h" -#include "config.h" -#include "plugin.h" +#include +#include +#include +#include +#include +#include int node_type_start(struct node_type *vt, struct super_node *sn) { diff --git a/lib/nodes/amqp.c b/lib/nodes/amqp.c index 8bf5a3d4b..c89e921bb 100644 --- a/lib/nodes/amqp.c +++ b/lib/nodes/amqp.c @@ -25,10 +25,10 @@ #include #include -#include "plugin.h" -#include "nodes/amqp.h" -#include "utils.h" -#include "io_format.h" +#include +#include +#include +#include static void amqp_default_ssl_info(struct amqp_ssl_info *s) { diff --git a/lib/nodes/file.c b/lib/nodes/file.c index 86a205058..fab8162c9 100644 --- a/lib/nodes/file.c +++ b/lib/nodes/file.c @@ -24,12 +24,12 @@ #include #include -#include "nodes/file.h" -#include "utils.h" -#include "timing.h" -#include "queue.h" -#include "plugin.h" -#include "io.h" +#include +#include +#include +#include +#include +#include static char * file_format_name(const char *format, struct timespec *ts) { diff --git a/lib/nodes/influxdb.c b/lib/nodes/influxdb.c index da1461655..3702cf789 100644 --- a/lib/nodes/influxdb.c +++ b/lib/nodes/influxdb.c @@ -23,11 +23,11 @@ #include #include -#include "node.h" -#include "plugin.h" -#include "config.h" -#include "nodes/influxdb.h" -#include "memory.h" +#include +#include +#include +#include +#include int influxdb_parse(struct node *n, json_t *json) { diff --git a/lib/nodes/nanomsg.c b/lib/nodes/nanomsg.c index 8061183e7..67f8dd7f1 100644 --- a/lib/nodes/nanomsg.c +++ b/lib/nodes/nanomsg.c @@ -24,10 +24,10 @@ #include #include -#include "plugin.h" -#include "nodes/nanomsg.h" -#include "utils.h" -#include "io_format.h" +#include +#include +#include +#include int nanomsg_reverse(struct node *n) { diff --git a/lib/nodes/ngsi.c b/lib/nodes/ngsi.c index b670cdc48..8e5618e43 100644 --- a/lib/nodes/ngsi.c +++ b/lib/nodes/ngsi.c @@ -28,12 +28,11 @@ #include #include -#include "nodes/ngsi.h" - -#include "utils.h" -#include "timing.h" -#include "plugin.h" -#include "config.h" +#include +#include +#include +#include +#include /* Some global settings */ static char *name = NULL; diff --git a/lib/nodes/shmem.c b/lib/nodes/shmem.c index 94f52d566..cc158d768 100644 --- a/lib/nodes/shmem.c +++ b/lib/nodes/shmem.c @@ -28,13 +28,13 @@ #include #include -#include "kernel/kernel.h" -#include "log.h" -#include "shmem.h" -#include "nodes/shmem.h" -#include "plugin.h" -#include "timing.h" -#include "utils.h" +#include +#include +#include +#include +#include +#include +#include int shmem_parse(struct node *n, json_t *cfg) { diff --git a/lib/nodes/signal.c b/lib/nodes/signal.c index 265bd3b20..c9ee22d94 100644 --- a/lib/nodes/signal.c +++ b/lib/nodes/signal.c @@ -24,9 +24,9 @@ #include #include -#include "node.h" -#include "plugin.h" -#include "nodes/signal.h" +#include +#include +#include enum signal_type signal_lookup_type(const char *type) { diff --git a/lib/nodes/socket.c b/lib/nodes/socket.c index d148d5b84..584762860 100644 --- a/lib/nodes/socket.c +++ b/lib/nodes/socket.c @@ -30,22 +30,21 @@ #include #endif -#include "nodes/socket.h" -#include "config.h" -#include "utils.h" +#include +#include +#include +#include +#include +#include +#include +#include #ifdef WITH_NETEM - #include "kernel/if.h" - #include "kernel/nl.h" - #include "kernel/tc_netem.h" + #include + #include + #include #endif /* WITH_NETEM */ -#include "io_format.h" -#include "sample.h" -#include "queue.h" -#include "plugin.h" -#include "compat.h" - /* Forward declartions */ static struct plugin p; diff --git a/lib/nodes/stats.c b/lib/nodes/stats.c index 40d130f75..4a5e0abd9 100644 --- a/lib/nodes/stats.c +++ b/lib/nodes/stats.c @@ -26,13 +26,13 @@ #include -#include "nodes/stats.h" -#include "hook.h" -#include "plugin.h" -#include "stats.h" -#include "super_node.h" -#include "sample.h" -#include "node.h" +#include +#include +#include +#include +#include +#include +#include #define STATS_METRICS 6 diff --git a/lib/nodes/test_rtt.c b/lib/nodes/test_rtt.c index c55b4afeb..5294c9a49 100644 --- a/lib/nodes/test_rtt.c +++ b/lib/nodes/test_rtt.c @@ -24,11 +24,11 @@ #include #include -#include "node.h" -#include "sample.h" -#include "timing.h" -#include "plugin.h" -#include "nodes/test_rtt.h" +#include +#include +#include +#include +#include static int test_rtt_case_start(struct test_rtt *t, int id) { diff --git a/lib/nodes/websocket.c b/lib/nodes/websocket.c index 980bd5df4..cb8f93894 100644 --- a/lib/nodes/websocket.c +++ b/lib/nodes/websocket.c @@ -26,13 +26,13 @@ #include #include -#include "super_node.h" -#include "timing.h" -#include "utils.h" -#include "buffer.h" -#include "plugin.h" -#include "io_format.h" -#include "nodes/websocket.h" +#include +#include +#include +#include +#include +#include +#include /* Private static storage */ static struct list connections = { .state = STATE_DESTROYED }; /**< List of active libwebsocket connections which receive samples from all nodes (catch all) */ diff --git a/lib/nodes/zeromq.c b/lib/nodes/zeromq.c index 6852c7b86..c0a6e63dd 100644 --- a/lib/nodes/zeromq.c +++ b/lib/nodes/zeromq.c @@ -27,12 +27,12 @@ #include #endif -#include "nodes/zeromq.h" -#include "node.h" -#include "utils.h" -#include "queue.h" -#include "plugin.h" -#include "io_format.h" +#include +#include +#include +#include +#include +#include static void *context; diff --git a/lib/path.c b/lib/path.c index f1b85c67d..5adffafa4 100644 --- a/lib/path.c +++ b/lib/path.c @@ -27,17 +27,17 @@ #include #include -#include "config.h" -#include "utils.h" -#include "path.h" -#include "timing.h" -#include "pool.h" -#include "queue.h" -#include "hook.h" -#include "plugin.h" -#include "memory.h" -#include "stats.h" -#include "node.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include static int path_source_init(struct path_source *ps) { diff --git a/lib/plugin.c b/lib/plugin.c index 480a06bc4..5422eac5c 100644 --- a/lib/plugin.c +++ b/lib/plugin.c @@ -23,7 +23,7 @@ #include #include -#include "plugin.h" +#include /** Global list of all known plugins */ struct list plugins = { .state = STATE_DESTROYED }; diff --git a/lib/pool.c b/lib/pool.c index df710a1ed..0f77df83a 100644 --- a/lib/pool.c +++ b/lib/pool.c @@ -20,11 +20,10 @@ * along with this program. If not, see . *********************************************************************************/ -#include "utils.h" - -#include "pool.h" -#include "memory.h" -#include "kernel/kernel.h" +#include +#include +#include +#include int pool_init(struct pool *p, size_t cnt, size_t blocksz, struct memtype *m) { diff --git a/lib/queue.c b/lib/queue.c index 7d62cad00..af65d0bde 100644 --- a/lib/queue.c +++ b/lib/queue.c @@ -31,9 +31,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *********************************************************************************/ -#include "queue.h" -#include "utils.h" -#include "memory.h" +#include +#include +#include /** Initialize MPMC queue */ int queue_init(struct queue *q, size_t size, struct memtype *mem) diff --git a/lib/queue_signalled.c b/lib/queue_signalled.c index 957c47ed1..48357ff37 100644 --- a/lib/queue_signalled.c +++ b/lib/queue_signalled.c @@ -21,8 +21,8 @@ * along with this program. If not, see . *********************************************************************************/ -#include "queue_signalled.h" -#include "log.h" +#include +#include #ifdef __linux__ #include diff --git a/lib/sample.c b/lib/sample.c index c0cda934b..21e2c2f5a 100644 --- a/lib/sample.c +++ b/lib/sample.c @@ -24,10 +24,10 @@ #include #include -#include "pool.h" -#include "sample.h" -#include "utils.h" -#include "timing.h" +#include +#include +#include +#include int sample_init(struct sample *s) { diff --git a/lib/shmem.c b/lib/shmem.c index d0dffe4ad..c19b65c78 100644 --- a/lib/shmem.c +++ b/lib/shmem.c @@ -27,11 +27,11 @@ #include #include -#include "kernel/kernel.h" -#include "memory.h" -#include "utils.h" -#include "sample.h" -#include "shmem.h" +#include +#include +#include +#include +#include size_t shmem_total_size(int queuelen, int samplelen) { diff --git a/lib/stats.c b/lib/stats.c index 84b5af177..dd10054ad 100644 --- a/lib/stats.c +++ b/lib/stats.c @@ -22,15 +22,15 @@ #include -#include "stats.h" -#include "hist.h" -#include "timing.h" -#include "node.h" -#include "sample.h" -#include "utils.h" -#include "log.h" -#include "node.h" -#include "table.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include static struct stats_desc { const char *name; diff --git a/lib/super_node.c b/lib/super_node.c index b366b22c2..9f79344da 100644 --- a/lib/super_node.c +++ b/lib/super_node.c @@ -25,22 +25,22 @@ #include #include -#include "super_node.h" -#include "node.h" -#include "path.h" -#include "utils.h" -#include "list.h" -#include "hook.h" -#include "advio.h" -#include "web.h" -#include "log.h" -#include "api.h" -#include "plugin.h" -#include "memory.h" -#include "config.h" -#include "config_helper.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include "kernel/rt.h" +#include int super_node_init(struct super_node *sn) { diff --git a/lib/table.c b/lib/table.c index 054cb6db4..5aecce461 100644 --- a/lib/table.c +++ b/lib/table.c @@ -23,9 +23,9 @@ #include #include -#include "utils.h" -#include "table.h" -#include "log.h" +#include +#include +#include static int table_resize(struct table *t, int width) { diff --git a/lib/task.c b/lib/task.c index 0013bed10..4bc325da6 100644 --- a/lib/task.c +++ b/lib/task.c @@ -24,10 +24,9 @@ #include #include -#include "utils.h" - -#include "task.h" -#include "timing.h" +#include +#include +#include #if PERIODIC_TASK_IMPL == TIMERFD #include diff --git a/lib/timing.c b/lib/timing.c index f637e3d91..dda4e6ad4 100644 --- a/lib/timing.c +++ b/lib/timing.c @@ -22,7 +22,7 @@ #include -#include "timing.h" +#include struct timespec time_now() { diff --git a/lib/utils.c b/lib/utils.c index e7feacd24..b30ad0027 100644 --- a/lib/utils.c +++ b/lib/utils.c @@ -31,8 +31,8 @@ #include #include -#include "config.h" -#include "utils.h" +#include +#include pthread_t main_thread; diff --git a/lib/web.c b/lib/web.c index 834d93224..6306a0059 100644 --- a/lib/web.c +++ b/lib/web.c @@ -23,12 +23,12 @@ #include #include -#include "utils.h" -#include "log.h" -#include "web.h" -#include "api/session.h" +#include +#include +#include +#include -#include "nodes/websocket.h" +#include /* Forward declarations */ lws_callback_function api_ws_protocol_cb; diff --git a/src/hook.c b/src/hook.c index 16edede5e..c1194e441 100644 --- a/src/hook.c +++ b/src/hook.c @@ -37,8 +37,7 @@ #include #include #include -#include - +#include #include #include "config.h" diff --git a/src/test-shmem.c b/src/test-shmem.c index 14e195ce1..009d90d85 100644 --- a/src/test-shmem.c +++ b/src/test-shmem.c @@ -23,6 +23,8 @@ * along with this program. If not, see . *********************************************************************************/ +#include + #include #include #include @@ -30,8 +32,6 @@ #include #include -#include - void *base; struct shmem_int shm;