projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
worker: New library for breaking a daemon into multiple processes.
[openvswitch]
/
vswitchd
/
ovs-vswitchd.c
diff --git
a/vswitchd/ovs-vswitchd.c
b/vswitchd/ovs-vswitchd.c
index 6062a40a63261c44b977ceeca355e1e6920c2b05..84e5ad113302ea3e2573d1a06dcd43f4174521ab 100644
(file)
--- a/
vswitchd/ovs-vswitchd.c
+++ b/
vswitchd/ovs-vswitchd.c
@@
-52,6
+52,7
@@
#include "vconn.h"
#include "vlog.h"
#include "lib/vswitch-idl.h"
#include "vconn.h"
#include "vlog.h"
#include "lib/vswitch-idl.h"
+#include "worker.h"
VLOG_DEFINE_THIS_MODULE(vswitchd);
VLOG_DEFINE_THIS_MODULE(vswitchd);
@@
-95,6
+96,8
@@
main(int argc, char *argv[])
#endif
}
#endif
}
+ worker_start();
+
retval = unixctl_server_create(unixctl_path, &unixctl);
if (retval) {
exit(EXIT_FAILURE);
retval = unixctl_server_create(unixctl_path, &unixctl);
if (retval) {
exit(EXIT_FAILURE);
@@
-106,6
+109,7
@@
main(int argc, char *argv[])
exiting = false;
while (!exiting) {
exiting = false;
while (!exiting) {
+ worker_run();
if (signal_poll(sighup)) {
vlog_reopen_log_file();
}
if (signal_poll(sighup)) {
vlog_reopen_log_file();
}
@@
-124,6
+128,7
@@
main(int argc, char *argv[])
unixctl_server_run(unixctl);
netdev_run();
unixctl_server_run(unixctl);
netdev_run();
+ worker_wait();
signal_wait(sighup);
memory_wait();
bridge_wait();
signal_wait(sighup);
memory_wait();
bridge_wait();