mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
refactoring UNITITIALIZED -> DEINITIALIZED
This commit is contained in:
parent
d9bd8cf64f
commit
88805ce491
4 changed files with 13 additions and 5 deletions
|
@ -28,7 +28,7 @@ struct node_type {
|
|||
size_t size; /**< Size of private data bock. @see node::_vd */
|
||||
|
||||
enum node_type_state {
|
||||
NODE_TYPE_UNINITIALIZED = 0,
|
||||
NODE_TYPE_DEINITIALIZED = 0,
|
||||
NODE_TYPE_INITIALIZED
|
||||
} state;
|
||||
|
||||
|
|
|
@ -15,7 +15,11 @@
|
|||
#include "kernel/rt.h"
|
||||
|
||||
int rt_init(int priority, int affinity)
|
||||
{ INDENT
|
||||
{
|
||||
info("Initialize real-time sub-system");
|
||||
|
||||
{ INDENT
|
||||
|
||||
int is_rt;
|
||||
|
||||
/* Use FIFO scheduler with real time priority */
|
||||
|
@ -32,6 +36,8 @@ int rt_init(int priority, int affinity)
|
|||
rt_set_affinity(affinity);
|
||||
else
|
||||
warn("You should use the 'affinity' setting to pin VILLASnode to dedicate CPU cores");
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ int node_type_init(struct node_type *vt, int argc, char *argv[], config_setting_
|
|||
{
|
||||
int ret;
|
||||
|
||||
if (vt->state != NODE_TYPE_UNINITIALIZED)
|
||||
if (vt->state != NODE_TYPE_DEINITIALIZED)
|
||||
return -1;
|
||||
|
||||
info("Initializing " YEL("%s") " node type", vt->name);
|
||||
|
@ -45,7 +45,7 @@ int node_type_deinit(struct node_type *vt)
|
|||
}
|
||||
|
||||
if (ret == 0)
|
||||
vt->state = NODE_TYPE_UNINITIALIZED;
|
||||
vt->state = NODE_TYPE_DEINITIALIZED;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -104,8 +104,10 @@ static void * send_loop(void *ctx)
|
|||
|
||||
retry: reason = sample_fscan(stdin, s, NULL);
|
||||
if (reason < 0) {
|
||||
if (feof(stdin))
|
||||
if (feof(stdin)) {
|
||||
info("Reached end-of-file. Terminating...");
|
||||
goto killme;
|
||||
}
|
||||
else {
|
||||
warn("Skipped invalid message message: reason=%d", reason);
|
||||
goto retry;
|
||||
|
|
Loading…
Add table
Reference in a new issue