Files
MuditaOS/test/mock-freertos-tls.cpp
Adam Dobrowolski b38adceced [EGD-6019] Minimum settings ownership lifetime fixups
added weakptr link to settings and checks
    it wont crash on deinitialized setings now
Pseuto UT are passing
Added:
    - deregistration on Settings destrution
    - weak referencing of Service to not crash Settings on missuse
    - Proxy as initialization parameter to Settings
Unused code removed
Enabled tests to be written for Settings
Removed dependency from freertos in test global file
EntryPath tests updated and compilation slimed
2021-05-18 13:25:54 +02:00

25 lines
637 B
C++

// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
typedef long BaseType_t;
typedef void *TaskHandle_t;
#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5
namespace
{
thread_local void *tls_pointers[configNUM_THREAD_LOCAL_STORAGE_POINTERS];
}
extern "C"
{
void *ff_stdio_pvTaskGetThreadLocalStoragePointer(TaskHandle_t, BaseType_t xIndex)
{
return tls_pointers[xIndex];
}
void ff_stdio_vTaskSetThreadLocalStoragePointer(TaskHandle_t, BaseType_t xIndex, void *pvValue)
{
tls_pointers[xIndex] = pvValue;
}
}