diff --git a/Makefile b/Makefile index aa2d491fe..36c34f18e 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ V ?= 2 GIT_REV=$(shell git rev-parse --short HEAD) # Compiler and linker flags -CC = gcc +CC ?= gcc LDLIBS = -pthread -lrt -lm -lconfig -ls2ss CFLAGS += -std=gnu99 -Iinclude/ -I. -MMD -Wall -D_GIT_REV='"$(GIT_REV)"' -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE=1 -DV=$(V) diff --git a/config.h b/config.h index fa0caa7c5..80caf39d0 100644 --- a/config.h +++ b/config.h @@ -39,7 +39,7 @@ #define SYSFS_PATH "/sys" #define PROCFS_PATH "/proc" -/* Checks */ +/* Required kernel version */ #define KERNEL_VERSION_MAJ 3 #define KERNEL_VERSION_MIN 4 diff --git a/include/path.h b/include/path.h index 0a9b8791d..8592fa7ca 100644 --- a/include/path.h +++ b/include/path.h @@ -32,10 +32,10 @@ struct path { enum { - PATH_INVALID, /**< */ - PATH_CREATED, /**< */ - PATH_RUNNING, /**< */ - PATH_STOPPED /**< */ + PATH_INVALID, /**< Path is invalid. */ + PATH_CREATED, /**< Path has been created. */ + PATH_RUNNING, /**< Path is currently running. */ + PATH_STOPPED /**< Path has been stopped. */ } state; /**< Path state */ struct node *in; /**< Pointer to the incoming node */ @@ -78,6 +78,7 @@ struct path struct timespec last; /**< Previous message received (old value of path::ts__recv) */ } ts; + /* Statistics */ unsigned int sent; /**< Counter for sent messages to all outgoing nodes */ unsigned int received; /**< Counter for received messages from all incoming nodes */ unsigned int invalid; /**< Counter for invalid messages */ diff --git a/lib/path.c b/lib/path.c index 493718b60..f2166eae7 100644 --- a/lib/path.c +++ b/lib/path.c @@ -93,7 +93,7 @@ static void * path_run(void *arg) else if (recv == 0) continue; - /** @todo Replace this timestamp by hardware timestamping */ + /** @todo Replace this timestamp by hardware timestamping for node type which support it. */ p->ts.last = p->ts.recv; p->ts.recv = time_now(); @@ -125,7 +125,7 @@ static void * path_run(void *arg) continue; } - /* At fixed rate mode, messages are send by another thread */ + /* At fixed rate mode, messages are send by another (asynchronous) thread */ if (!p->rate) path_write(p); } diff --git a/lib/socket.c b/lib/socket.c index f3d899c84..c441ca520 100644 --- a/lib/socket.c +++ b/lib/socket.c @@ -230,7 +230,7 @@ int socket_read(struct node *n, struct msg *pool, int poolsize, int first, int c /* Receive message from socket */ bytes = recvmsg(s->sd, &mhdr, 0); if (bytes == 0) - error("Remote node %s closed the cnode_name", node_name(n)); + error("Remote node %s closed the connection", node_name(n)); else if (bytes < 0) serror("Failed recv");