~aleteoryx/muditaos

4de9970108f7b1b454edec463c352b9a956cedec — Piotr Tański 4 years ago da27b16
[EGD-5952] Changed service stack depths acc. to real usage

Stack depth changed for:
- Application Manager
- Service Bluetooth
- Bluetooth Worker
- Service Eink
- Service GUI
- Application Special Input
M module-apps/application-special-input/ApplicationSpecialInput.cpp => module-apps/application-special-input/ApplicationSpecialInput.cpp +6 -1
@@ 7,10 7,15 @@

using namespace app;

namespace
{
    constexpr auto SpecialInputAppStackDepth = 2048U;
} // namespace

ApplicationSpecialInput::ApplicationSpecialInput(std::string name,
                                                 std::string parent,
                                                 StartInBackground startInBackground)
    : Application(name, parent, startInBackground)
    : Application(name, parent, startInBackground, SpecialInputAppStackDepth)
{
    addActionReceiver(manager::actions::ShowSpecialInput, [this](auto &&data) {
        switchWindow(app::char_select, std::move(data));

M module-bluetooth/Bluetooth/BluetoothWorker.cpp => module-bluetooth/Bluetooth/BluetoothWorker.cpp +4 -1
@@ 37,6 37,8 @@ namespace queues

namespace
{
    constexpr auto BluetoothWorkerStackDepth = 3072U;

    class DeviceRegistration
    {
      public:


@@ 85,7 87,8 @@ namespace
} // namespace

BluetoothWorker::BluetoothWorker(sys::Service *service)
    : Worker(service), service(service), profileManager(std::make_shared<bluetooth::ProfileManager>(service)),
    : Worker(service, BluetoothWorkerStackDepth), service(service),
      profileManager(std::make_shared<bluetooth::ProfileManager>(service)),
      settings(static_cast<ServiceBluetooth *>(service)->settingsHolder),
      runLoop(std::make_unique<bluetooth::RunLoop>()),
      controller{createStatefulController(

M module-services/service-appmgr/model/ApplicationManager.cpp => module-services/service-appmgr/model/ApplicationManager.cpp +3 -1
@@ 37,6 37,7 @@ namespace app::manager
{
    namespace
    {
        constexpr auto ApplicationManagerStackDepth = 3072;
        constexpr auto timerBlock         = "BlockTimer";
    } // namespace



@@ 102,7 103,8 @@ namespace app::manager
    ApplicationManager::ApplicationManager(const ApplicationName &serviceName,
                                           std::vector<std::unique_ptr<app::ApplicationLauncher>> &&launchers,
                                           const ApplicationName &_rootApplicationName)
        : Service{serviceName}, ApplicationManagerBase(std::move(launchers)), rootApplicationName{_rootApplicationName},
        : Service{serviceName, {}, ApplicationManagerStackDepth},
          ApplicationManagerBase(std::move(launchers)), rootApplicationName{_rootApplicationName},
          actionsRegistry{[this](ActionEntry &action) { return handleAction(action); }},
          autoLockEnabled(false), autoLockTimer{std::make_unique<sys::Timer>(timerBlock,
                                                                             this,

M module-services/service-bluetooth/ServiceBluetooth.cpp => module-services/service-bluetooth/ServiceBluetooth.cpp +6 -1
@@ 28,7 28,12 @@
#include <BtKeysStorage.hpp>
#include <service-bluetooth/messages/Unpair.hpp>

ServiceBluetooth::ServiceBluetooth() : sys::Service(service::name::bluetooth, "", 4096)
namespace
{
    constexpr auto BluetoothServiceStackDepth = 2560U;
} // namespace

ServiceBluetooth::ServiceBluetooth() : sys::Service(service::name::bluetooth, "", BluetoothServiceStackDepth)
{
    auto settings                   = std::make_unique<settings::Settings>(this);
    settingsHolder                  = std::make_shared<bluetooth::SettingsHolder>(std::move(settings));

M module-services/service-eink/ServiceEink.cpp => module-services/service-eink/ServiceEink.cpp +1 -1
@@ 23,7 23,7 @@ namespace service::eink
{
    namespace
    {
        constexpr auto ServceEinkStackDepth = 4096 + 1024;
        constexpr auto ServceEinkStackDepth = 2048U;
        constexpr std::chrono::milliseconds displayPowerOffTimeout{3800};
    } // namespace


M module-services/service-gui/ServiceGUI.cpp => module-services/service-gui/ServiceGUI.cpp +1 -1
@@ 26,7 26,7 @@ namespace service::gui
{
    namespace
    {
        constexpr auto ServiceGuiStackDepth  = 4096U;
        constexpr auto ServiceGuiStackDepth  = 1024U;
        constexpr auto ContextsCount         = 2;
        constexpr auto CommandsQueueCapacity = 3;
        constexpr std::chrono::milliseconds BSPEinkBusyTimeout{3000}; ///< sync with \ref BSP_EinkBusyTimeout