35TEST(Sync, IMutex_ScopedLock)
40 CHECK_TRUE(
mutex.m_locked);
42 CHECK_FALSE(
mutex.m_locked);
100 CHECK_TRUE(wo !=
nullptr);
105 CHECK_EQUAL(
true,
mutex.m_locked);
112 CHECK_TRUE(wo !=
nullptr);
117 CHECK_EQUAL(
true,
mutex.m_locked);
void(* g_RelaxCpuHandler)()
__stk_relax_cpu handler.
Namespace of STK package.
Namespace of the test inventory.
int32_t g_CriticalSectionState
Critical section state.
static struct stk::test::SyncWaitWakeRelaxCpuContext g_SyncWaitWakeRelaxCpuContext
static void SyncWaitWakeRelaxCpu()
Concrete implementation of IKernel.
void Initialize(uint32_t resolution_us=PERIODICITY_DEFAULT)
Prepare kernel for use: reset state, configure the platform, and register the service singleton.
void Start()
Start the scheduler. This call does not return until all tasks have exited (KERNEL_DYNAMIC mode) or i...
IPlatform * GetPlatform()
Get platform driver instance owned by this kernel.
void AddTask(ITask *user_task)
Register task for a soft real-time (SRT) scheduling.
virtual bool IsTimeout() const =0
Check if task woke up due to a timeout.
Locks bound mutex within a scope of execution. Ensures the mutex is always unlocked when leaving the ...
static IKernelService * GetInstance()
Get CPU-local instance of the kernel service.
virtual IWaitObject * Wait(ISyncObject *sobj, IMutex *mutex, Timeout timeout)=0
Put calling process into a waiting state until synchronization object is signaled or timeout occurs.
RAII-style low-level synchronization primitive for atomic code execution. Used as building brick for ...
SyncWaitWakeRelaxCpuContext()
PlatformTestMock * platform