summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xAudioManagerDaemon/src/main.cpp5
-rw-r--r--AudioManagerUtilities/include/CAmSocketHandler.h22
-rw-r--r--AudioManagerUtilities/src/CAmDltWrapper.cpp5
-rw-r--r--AudioManagerUtilities/src/CAmSocketHandler.cpp13
-rw-r--r--AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp5
-rwxr-xr-xCMakeLists.txt12
-rw-r--r--cmake/config.cmake.in3
7 files changed, 3 insertions, 62 deletions
diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp
index 879687d..8271db4 100755
--- a/AudioManagerDaemon/src/main.cpp
+++ b/AudioManagerDaemon/src/main.cpp
@@ -387,11 +387,6 @@ iControlSender.setControllerReady();
*/
int main(int argc, char *argv[], char** envp)
{
- //Set runtime-scheduler with priority and policy for all threads. You can define the priority and policy via cmake.
- //If the cmake option WITH_REALTIME_SCHEDULER is OFF the following macro is empty.
- //If a thread needs other settings you can use CAmSocketHandler::setRuntimeScheduler(...)
- SET_REALTIME_SCHEDULER()
-
(void) envp;
listCommandPluginDirs.push_back(std::string(DEFAULT_PLUGIN_COMMAND_DIR));
listRoutingPluginDirs.push_back(std::string(DEFAULT_PLUGIN_ROUTING_DIR));
diff --git a/AudioManagerUtilities/include/CAmSocketHandler.h b/AudioManagerUtilities/include/CAmSocketHandler.h
index 2fd5c42..53010ba 100644
--- a/AudioManagerUtilities/include/CAmSocketHandler.h
+++ b/AudioManagerUtilities/include/CAmSocketHandler.h
@@ -492,29 +492,7 @@ public:
void exit_mainloop();
bool fatalErrorOccurred();
-#ifdef WITH_REALTIME_SCHEDULER
- /**
- * Set scheduling algorithm and/or parameters for a thread whose ID is specified in pid.
- * If pid equals zero, the scheduling policy and parameters of the calling thread will be set.
- * @param pid_t pid thread id
- * @param int policy equals specified policies in sched_setscheduler documentation
- * @param int priority between 1 and 99
- * @return on success 0 and on error -1
- */
- static int setRuntimeScheduler(const pid_t pid, const int policy, const int priority);
-#endif
};
-#ifdef WITH_REALTIME_SCHEDULER
-#define SET_REALTIME_SCHEDULER()\
- if ( CAmSocketHandler::setRuntimeScheduler(0, AM_REALTIME_POLICY, AM_PROCESS_PRIORITY) != 0 )\
- {\
- std::cerr <<"sched_setscheduler:"<<strerror(errno)<<std::endl;\
- std::cerr << "Try running as root"<<std::endl;\
- }
-#else
-#define SET_REALTIME_SCHEDULER()
-#endif
-
} /* namespace am */
#endif /* SOCKETHANDLER_H_ */
diff --git a/AudioManagerUtilities/src/CAmDltWrapper.cpp b/AudioManagerUtilities/src/CAmDltWrapper.cpp
index 742b396..44ec614 100644
--- a/AudioManagerUtilities/src/CAmDltWrapper.cpp
+++ b/AudioManagerUtilities/src/CAmDltWrapper.cpp
@@ -23,13 +23,14 @@
*/
-#include "CAmDltWrapper.h"
#include <string>
#include <iostream>
#include <string.h>
#include <chrono>
#include <ctime>
+#include <sys/types.h>
#include <unistd.h>
+#include "CAmDltWrapper.h"
namespace am
{
@@ -625,7 +626,7 @@ bool CAmDltWrapper::initNoDlt(DltLogLevelType loglevel, DltContext* context)
bool CAmDltWrapper::init(DltLogLevelType loglevel, DltContext* context)
{
pthread_mutex_lock(&mMutex);
- initNoDlt(loglevel,context);
+ return initNoDlt(loglevel,context);
}
void CAmDltWrapper::send()
diff --git a/AudioManagerUtilities/src/CAmSocketHandler.cpp b/AudioManagerUtilities/src/CAmSocketHandler.cpp
index ef5d09a..4c46dd1 100644
--- a/AudioManagerUtilities/src/CAmSocketHandler.cpp
+++ b/AudioManagerUtilities/src/CAmSocketHandler.cpp
@@ -249,19 +249,6 @@ bool CAmSocketHandler::fatalErrorOccurred()
return ((mInternalCodes&internal_codes_e::PIPE_ERROR)>0)||((mInternalCodes&internal_codes_e::FD_ERROR)>0);
}
-#ifdef WITH_REALTIME_SCHEDULER
-int CAmSocketHandler::setRuntimeScheduler(const pid_t pid, const int policy, const int priority)
-{
- //The following structure is used to set a processes priority
- struct sched_param param;
- //Set the priority of the process
- param.sched_priority = priority;
-
- int ret = sched_setscheduler(pid, policy, & param);
- return ret;
-}
-#endif
-
am_Error_e CAmSocketHandler::getFDPollData(const sh_pollHandle_t handle, sh_poll_s & outPollData)
{
VectorListPoll_t::iterator iterator = mListPoll.begin();
diff --git a/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp b/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp
index c4af4c1..3908c2e 100644
--- a/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp
+++ b/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp
@@ -761,11 +761,6 @@ TEST(CAmSocketHandlerTest,playWithSockets)
int main(int argc, char **argv)
{
- //Set runtime-scheduler with priority and policy for all threads. You can define the priority and policy via cmake.
- //If the cmake option WITH_REALTIME_SCHEDULER is OFF the following macro is empty.
- //If a thread needs other settings you can use CAmSocketHandler::setRuntimeScheduler(...)
- SET_REALTIME_SCHEDULER()
-
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a14717..7376f88 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,9 +62,6 @@ option ( WITH_SHARED_CORE
option ( WITH_TIMERFD
"Build with timer fd support" ON )
-
-option ( WITH_REALTIME_SCHEDULER
- "Use real time scheduler" OFF )
option( WITH_TESTS
"Build together with all available unitTest" ON )
@@ -99,12 +96,6 @@ set(AM_MAX_CONNECTIONS 0x1000
set(AM_MAX_MAIN_CONNECTIONS 0x1000
CACHE INTEGER "Number of max Mainconnections before rollover")
-set(AM_PROCESS_PRIORITY 50
- CACHE INTEGER "Set the priority of the process. The priority is between 1 and 99.")
-
-set(AM_REALTIME_POLICY SCHED_FIFO
- CACHE PROPERTY "The real-time policies that may be specified. See the sched_setscheduler documentation for more details.")
-
set(AUDIOMANGER_APP_ID "AUDI"
CACHE PROPERTY "The application ID that is used by the audiomanager")
@@ -234,7 +225,6 @@ message(STATUS "WITH_DBUS_WRAPPER = ${WITH_DBUS_WRAPPER}")
message(STATUS "WITH_SHARED_UTILITIES = ${WITH_SHARED_UTILITIES}")
message(STATUS "WITH_SHARED_CORE = ${WITH_SHARED_CORE}")
message(STATUS "WITH_TIMERFD = ${WITH_TIMERFD}")
-message(STATUS "WITH_REALTIME_SCHEDULER = ${WITH_REALTIME_SCHEDULER}")
message(STATUS "DYNAMIC_ID_BOUNDARY = ${DYNAMIC_ID_BOUNDARY}")
message(STATUS "LIB_INSTALL_SUFFIX = ${LIB_INSTALL_SUFFIX}")
message(STATUS "TEST_EXECUTABLE_INSTALL_PATH = ${TEST_EXECUTABLE_INSTALL_PATH}")
@@ -246,8 +236,6 @@ message(STATUS "AM_SHARE_FOLDER = ${AM_SHARE_FOLDER}")
message(STATUS "AM_MAP_CAPACITY = ${AM_MAP_CAPACITY}")
message(STATUS "AM_MAX_CONNECTIONS = ${AM_MAX_CONNECTIONS}")
message(STATUS "AM_MAX_MAIN_CONNECTIONS = ${AM_MAX_MAIN_CONNECTIONS}")
-message(STATUS "AM_PROCESS_PRIORITY = ${AM_PROCESS_PRIORITY}")
-message(STATUS "AM_REALTIME_POLICY = ${AM_REALTIME_POLICY}")
message(STATUS "BUILD_TESTING = ${BUILD_TESTING}")
message(STATUS "CMAKE_INSTALL_DOCDIR = ${CMAKE_INSTALL_DOCDIR}")
message(STATUS "AUDIOMANGER_APP_ID = ${AUDIOMANGER_APP_ID}")
diff --git a/cmake/config.cmake.in b/cmake/config.cmake.in
index 268fbf2..1501393 100644
--- a/cmake/config.cmake.in
+++ b/cmake/config.cmake.in
@@ -10,7 +10,6 @@
#cmakedefine GLIB_DBUS_TYPES_TOLERANT
#cmakedefine WITH_SYSTEMD_WATCHDOG
#cmakedefine WITH_TIMERFD
-#cmakedefine WITH_REALTIME_SCHEDULER
#cmakedefine DEFAULT_PLUGIN_DIR "@DEFAULT_PLUGIN_DIR@"
#cmakedefine DEFAULT_PLUGIN_COMMAND_DIR "@DEFAULT_PLUGIN_COMMAND_DIR@"
@@ -30,8 +29,6 @@
#cmakedefine AM_MAP_CAPACITY @AM_MAP_CAPACITY@
#cmakedefine AM_MAX_CONNECTIONS @AM_MAX_CONNECTIONS@
#cmakedefine AM_MAX_MAIN_CONNECTIONS @AM_MAX_MAIN_CONNECTIONS@
-#cmakedefine AM_PROCESS_PRIORITY @AM_PROCESS_PRIORITY@
-#cmakedefine AM_REALTIME_POLICY @AM_REALTIME_POLICY@
#cmakedefine LIB_COMMAND_INTERFACE_VERSION @LIB_COMMAND_INTERFACE_VERSION@
#cmakedefine LIB_CONTROL_INTERFACE_VERSION @LIB_CONTROL_INTERFACE_VERSION@
#cmakedefine LIB_ROUTING_INTERFACE_VERSION @LIB_ROUTING_INTERFACE_VERSION@