summaryrefslogtreecommitdiff
path: root/AudioManagerDaemon/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'AudioManagerDaemon/src/main.cpp')
-rwxr-xr-xAudioManagerDaemon/src/main.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/AudioManagerDaemon/src/main.cpp b/AudioManagerDaemon/src/main.cpp
index 8838ceb..879687d 100755
--- a/AudioManagerDaemon/src/main.cpp
+++ b/AudioManagerDaemon/src/main.cpp
@@ -387,14 +387,11 @@ iControlSender.setControllerReady();
*/
int main(int argc, char *argv[], char** envp)
{
- struct sched_param param;
- param.sched_priority = 50;//mid rt proprity
- if (sched_setscheduler(0, SCHED_FIFO, & param) != 0)
- {
- std::cerr <<"sched_setscheduler:"<<strerror(errno)<<std::endl;
- std::cerr << "Try running as root"<<std::endl;
- }
-
+ //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));