mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-01-19 19:41:21 -05:00
- Dump logs to file every 10 sec. - max file size is 50 MB (after reaching it, no more logs will be logged), - Add `LockGuard` with locking mechanism supporting IRQ and use it in `Logger`. - Fix minor style issues in `Logger`. - Add `mount_user_lfs_partition.py` script for mounting LFS on Linux FS in order to get `MuditaOS.log` file from `user` partition
23 lines
556 B
C++
23 lines
556 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include <mutex.hpp>
|
|
|
|
class LockGuard
|
|
{
|
|
public:
|
|
explicit LockGuard(cpp_freertos::MutexStandard& mutex);
|
|
~LockGuard();
|
|
LockGuard(const LockGuard &) = delete;
|
|
LockGuard(LockGuard &&) = delete;
|
|
|
|
LockGuard &operator=(const LockGuard &) = delete;
|
|
LockGuard &operator=(LockGuard &&) = delete;
|
|
|
|
private:
|
|
BaseType_t savedInterruptStatus;
|
|
cpp_freertos::MutexStandard &mutex;
|
|
};
|