@@ -30,6 +30,10 @@ namespace rtos {
30
30
/* * The Thread class allow defining, creating, and controlling thread functions in the system. */
31
31
class Thread {
32
32
public:
33
+ /* * Allocate a new thread without starting execution
34
+ */
35
+ Thread ();
36
+
33
37
/* * Create a new thread, and start it executing the specified function.
34
38
@param task function to be executed by this thread.
35
39
@param argument pointer that is passed to the thread function as start argument. (default: NULL).
@@ -42,6 +46,19 @@ class Thread {
42
46
uint32_t stack_size=DEFAULT_STACK_SIZE,
43
47
unsigned char *stack_pointer=NULL );
44
48
49
+ /* * Starts a thread executing the specified function.
50
+ @param task function to be executed by this thread.
51
+ @param argument pointer that is passed to the thread function as start argument. (default: NULL).
52
+ @param priority initial priority of the thread function. (default: osPriorityNormal).
53
+ @param stack_size stack size (in bytes) requirements for the thread function. (default: DEFAULT_STACK_SIZE).
54
+ @param stack_pointer pointer to the stack area to be used by this thread (default: NULL).
55
+ @return status code that indicates the execution status of the function.
56
+ */
57
+ osStatus start (void (*task)(void const *argument), void *argument=NULL,
58
+ osPriority priority=osPriorityNormal,
59
+ uint32_t stack_size=DEFAULT_STACK_SIZE,
60
+ unsigned char *stack_pointer=NULL);
61
+
45
62
/* * Terminate execution of a thread and remove it from Active Threads
46
63
@return status code that indicates the execution status of the function.
47
64
*/
0 commit comments