Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c34fbc6 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

main::shim::stack: Use internal stack manager access am: e24a9572

parents b6713500 e24a9572
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -67,12 +67,11 @@ class Stack {
  // Run the callable object on the module instance
  template <typename T>
  bool CallOnModule(std::function<void(T* mod)> run) {
    std::lock_guard<std::recursive_mutex> lock(Stack::GetInstance()->mutex_);
    if (Stack::GetInstance()->is_running_) {
      run(Stack::GetInstance()->GetStackManager()->GetInstance<T>());
      return true;
    std::lock_guard<std::recursive_mutex> lock(mutex_);
    if (is_running_) {
      run(stack_manager_.GetInstance<T>());
    }
    return false;
    return is_running_;
  }

  size_t NumModules() const { return num_modules_; }