Skip to content

Commit

Permalink
dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
mck1117 committed Jan 8, 2025
1 parent 34a1b07 commit 63f0a31
Showing 1 changed file with 0 additions and 49 deletions.
49 changes: 0 additions & 49 deletions unit_tests/tests/system/test_periodic_thread_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,6 @@

#include "pch.h"

#include "periodic_thread_controller.h"
#include <thread>

class TestPeriodicController : public PeriodicController<111> {
public:
TestPeriodicController() : PeriodicController("test") { }
private:
void PeriodicTask(efitick_t nowNt) override {
UNUSED(nowNt);
}
};

static TestPeriodicController instance;

systime_t chVTGetSystemTime(void) {
return getTimeNowUs();
}
Expand All @@ -32,38 +18,3 @@ systime_t chThdSleepUntilWindowed(systime_t prev, systime_t next) {
bool chThdShouldTerminateX(void) {
return false;
}

class taskq {
public:
// int trigger(taskq &tq);
// mutex mtx;
};


void func_wrapper(taskq &tq) {

}

thread_t *chThdCreateStatic(void *wsp, size_t size,
tprio_t prio, tfunc_t funcp, void *arg) {

taskq insta;

taskq &tq = insta;
/**
* I do not understand what's going on here. Do allocate thread on stack and that would crash once method is over?
* how do we dynamically create new std::thread?
*/

std::thread thr(func_wrapper, std::ref(tq));

thread_t *thread = new thread_t();
thread->funcp = funcp;
thread->arg = arg;
return thread;

}

TEST(system, periodic) {
// instance.Start();
}

0 comments on commit 63f0a31

Please sign in to comment.