mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
path: run in single mode if possible to reduce syscall overhead
This commit is contained in:
parent
0cbbd0a53c
commit
2cc6423c61
1 changed files with 2 additions and 8 deletions
10
lib/path.c
10
lib/path.c
|
@ -662,14 +662,8 @@ int path_parse(struct path *p, json_t *cfg, struct vlist *nodes)
|
|||
p->poll = 1;
|
||||
else if (vlist_length(&p->sources) > 1)
|
||||
p->poll = 1;
|
||||
else {
|
||||
struct path_source *ps = (struct path_source *) vlist_at(&p->sources, 0);
|
||||
|
||||
int fds[16];
|
||||
int num_fds = node_poll_fds(ps->node, fds);
|
||||
|
||||
p->poll = num_fds > 0;
|
||||
}
|
||||
else
|
||||
p->poll = 0;
|
||||
}
|
||||
|
||||
ret = vlist_destroy(&sources, NULL, false);
|
||||
|
|
Loading…
Add table
Reference in a new issue