mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-10 05:41:53 +00:00
Remove ChibiOS registry, thread names.
Only useful for debugging, but even then not very visible or useful. Gained 256 bytes of code RAM.
This commit is contained in:
@@ -26,26 +26,17 @@
|
||||
|
||||
class ThreadBase {
|
||||
public:
|
||||
constexpr ThreadBase(
|
||||
const char* const name
|
||||
) : name { name }
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~ThreadBase() = default;
|
||||
|
||||
protected:
|
||||
static msg_t fn(void* arg) {
|
||||
auto obj = static_cast<ThreadBase*>(arg);
|
||||
chRegSetThreadName(obj->name);
|
||||
obj->run();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private:
|
||||
const char* const name;
|
||||
|
||||
virtual void run() = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user