Unit tests: Fix style in rtos Thread.h stubs

pull/14929/head
Lingkai Dong 2021-07-19 10:01:34 +01:00
parent 1f99729474
commit 5fe0f8916b
1 changed files with 37 additions and 18 deletions

View File

@ -48,11 +48,23 @@ public:
osStatus start(mbed::Callback<void()> task); osStatus start(mbed::Callback<void()> task);
osStatus join() {return 0;}; osStatus join()
{
return 0;
};
osStatus terminate(); osStatus terminate();
osStatus set_priority(osPriority priority){return 0;}; osStatus set_priority(osPriority priority)
osPriority get_priority() const{return osPriorityNormal;}; {
uint32_t flags_set(uint32_t flags){return 0;}; return 0;
};
osPriority get_priority() const
{
return osPriorityNormal;
};
uint32_t flags_set(uint32_t flags)
{
return 0;
};
/** State of the Thread */ /** State of the Thread */
enum State { enum State {
@ -77,25 +89,32 @@ public:
Deleted, /**< The task has been deleted or not started */ Deleted, /**< The task has been deleted or not started */
}; };
State get_state() const { State get_state() const
{
return Ready; return Ready;
}; };
uint32_t stack_size() const { uint32_t stack_size() const
{
return 0; return 0;
}; };
uint32_t free_stack() const { uint32_t free_stack() const
{
return 0; return 0;
}; };
uint32_t used_stack() const { uint32_t used_stack() const
{
return 0; return 0;
}; };
uint32_t max_stack() const { uint32_t max_stack() const
{
return 0; return 0;
}; };
const char *get_name() const { const char *get_name() const
{
return ""; return "";
}; };
osThreadId_t get_id() const { osThreadId_t get_id() const
{
return 0; return 0;
}; };
virtual ~Thread(); virtual ~Thread();