Remove threads
This converts phosphor-pid-control into an async
single threaded application. The reason for doing this
is on our systems phosphor-pid-control had the largest
VSZ when viewed under top. Before this patch the VSZ
was at 50720, after it is at 7760.
Tested-by: Could still interact with all interfaces
under rest-dbus and sensor override worked to ramp fans
when changing cpu temps.
Change-Id: Ie0a837bdf0d1b1df61dc7aff87e5d503b9e0e875
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/configure.ac b/configure.ac
index df031b0..b216837 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,7 +56,22 @@
[],
[AC_MSG_ERROR([Could not find CLI11 CLI/CLI.hpp])]
)
-AX_PTHREAD([], [AC_MSG_ERROR(["pthread required and not found"])])
+
+# check for boost headers
+AC_CHECK_HEADER(
+ boost/asio/io_context.hpp,
+ [],
+ [AC_MSG_ERROR([Could not find boost/asio/io_context.hpp])]
+)
+AC_CHECK_HEADER(
+ boost/asio/steady_timer.hpp,
+ [],
+ [AC_MSG_ERROR([Could not find boost/asio/steady_timer.hpp])]
+)
+AX_APPEND_COMPILE_FLAGS(["-DBOOST_ASIO_DISABLE_THREADS"], [CPPFLAGS])
+AX_APPEND_COMPILE_FLAGS(["-DBOOST_ERROR_CODE_HEADER_ONLY"], [CPPFLAGS])
+AX_APPEND_COMPILE_FLAGS(["-DBOOST_SYSTEM_NO_DEPRECATED"], [CPPFLAGS])
+AX_APPEND_COMPILE_FLAGS(["-DBOOST_ASIO_NO_DEPRECATED"], [CPPFLAGS])
# Checks for library functions.
LT_INIT # Required for systemd linking