CppELib 1.7.0
Loading...
Searching...
No Matches
ThreadFactory.h
Go to the documentation of this file.
1#ifndef OS_WRAPPER_THREAD_FACTORY_H_INCLUDED
2#define OS_WRAPPER_THREAD_FACTORY_H_INCLUDED
3
4#include <cstddef>
5
6namespace OSWrapper {
7
8class Runnable;
9class Thread;
10
12public:
13 virtual ~ThreadFactory() {}
14 virtual Thread* create(Runnable* r, int priority, std::size_t stackSize, void* stackAddress, const char* name) = 0;
15 virtual void destroy(Thread* t) = 0;
16 virtual void sleep(unsigned long millis) = 0;
17 virtual void yield() = 0;
18 virtual Thread* getCurrentThread() = 0;
19 virtual int getMaxPriority() const = 0;
20 virtual int getMinPriority() const = 0;
21 virtual int getHighestPriority() const = 0;
22 virtual int getLowestPriority() const = 0;
23};
24
25}
26
27#endif // OS_WRAPPER_THREAD_FACTORY_H_INCLUDED
Interface for implementing an active class.
Definition Runnable.h:9
Definition ThreadFactory.h:11
virtual int getLowestPriority() const =0
virtual int getHighestPriority() const =0
virtual void sleep(unsigned long millis)=0
virtual void destroy(Thread *t)=0
virtual Thread * create(Runnable *r, int priority, std::size_t stackSize, void *stackAddress, const char *name)=0
virtual int getMaxPriority() const =0
virtual ~ThreadFactory()
Definition ThreadFactory.h:13
virtual int getMinPriority() const =0
virtual void yield()=0
virtual Thread * getCurrentThread()=0
Abstract class that has functions of common RTOS's thread.
Definition Thread.h:50
OSWrapper provides abstract C++ interface of common RTOS: thread, mutex, event flag,...
Definition EventFlag.cpp:5