// Copyright 2024 The Pigweed Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
//     https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.

#include "system/worker.h"

#include "pw_log/log.h"
#include "pw_system/system.h"

namespace sense::system {
namespace internal {

/// A worker which delegates work to `pw::System`.
class SystemWorker final : public Worker {
 public:
  void RunOnce(pw::Function<void()>&& work) override {
    if (!pw::System().RunOnce(std::move(work))) {
      PW_LOG_ERROR("Unable to schedule work on system worker.");
    }
  }
};

}  // namespace internal

Worker& GetWorker() {
  static internal::SystemWorker worker;
  return worker;
}

}  // namespace sense::system
