add a .clang-format file (#9154)

This commit is contained in:
Jorropo
2026-01-03 21:19:24 +01:00
committed by GitHub
parent abab6ce815
commit 0d11331d18
771 changed files with 77752 additions and 83184 deletions

View File

@@ -2,30 +2,26 @@
#include "configuration.h"
#include <cassert>
namespace concurrency
{
namespace concurrency {
#ifdef HAS_FREE_RTOS
Lock::Lock() : handle(xSemaphoreCreateBinary())
{
assert(handle);
if (xSemaphoreGive(handle) == false) {
abort();
}
Lock::Lock() : handle(xSemaphoreCreateBinary()) {
assert(handle);
if (xSemaphoreGive(handle) == false) {
abort();
}
}
void Lock::lock()
{
if (xSemaphoreTake(handle, portMAX_DELAY) == false) {
abort();
}
void Lock::lock() {
if (xSemaphoreTake(handle, portMAX_DELAY) == false) {
abort();
}
}
void Lock::unlock()
{
if (xSemaphoreGive(handle) == false) {
abort();
}
void Lock::unlock() {
if (xSemaphoreGive(handle) == false) {
abort();
}
}
#else
Lock::Lock() {}