Skip to content

Commit d5cb178

Browse files
niklarm0xc0170
authored andcommitted
Use scheduler provided by shim layer in Harness.
1 parent 336bffa commit d5cb178

File tree

2 files changed

+2
-28
lines changed

2 files changed

+2
-28
lines changed

frameworks\utest/source/harness.cpp

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,6 @@
1818

1919
#include "utest/harness.h"
2020
#include <stdlib.h>
21-
#include "core-util/CriticalSectionLock.h"
22-
23-
24-
#ifndef YOTTA_CFG_UTEST_USE_CUSTOM_SCHEDULER
25-
#include "minar/minar.h"
26-
27-
static void *utest_minar_post(const utest_v1_harness_callback_t callback, const uint32_t delay_ms)
28-
{
29-
void *handle = minar::Scheduler::postCallback(callback).delay(minar::milliseconds(delay_ms)).getHandle();
30-
return handle;
31-
}
32-
static int32_t utest_minar_cancel(void *handle)
33-
{
34-
int32_t ret = minar::Scheduler::cancelCallback(handle);
35-
return ret;
36-
}
37-
static const utest_v1_scheduler_t utest_minar_scheduler =
38-
{
39-
utest_minar_post,
40-
utest_minar_cancel
41-
};
42-
#endif
4321

4422
using namespace utest::v1;
4523

@@ -71,11 +49,7 @@ namespace
7149

7250
location_t location = LOCATION_UNKNOWN;
7351

74-
#ifndef YOTTA_CFG_UTEST_USE_CUSTOM_SCHEDULER
75-
utest_v1_scheduler_t scheduler = utest_minar_scheduler;
76-
#else
77-
utest_v1_scheduler_t scheduler = {NULL, NULL};
78-
#endif
52+
utest_v1_scheduler_t scheduler = utest_v1_scheduler;
7953
}
8054

8155
static void die() {

frameworks\utest/utest/types.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include <stdint.h>
2323
#include <stdbool.h>
2424
#include <stdio.h>
25-
#include "compiler-polyfill/attributes.h"
25+
#include "shim.h"
2626

2727
namespace utest {
2828
namespace v1 {

0 commit comments

Comments
 (0)