Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mpipe_thread.h File Reference

Simple wrapper of k_thread to reuse a thread's stack after its termination. More...

Go to the source code of this file.

Data Structures

struct  mpipe_thread
 Simple wrapper around k_thread. More...

Enumerations

enum  mpipe_thread_state { MPIPE_THREAD_PAUSED = 0 , MPIPE_THREAD_RUNNING , MPIPE_THREAD_TERMINATED }
 Thread state. More...

Functions

k_tid_t mpipe_thread_create (struct mpipe_thread *thread, k_thread_entry_t func, void *p1, void *p2, void *p3, int priority, k_timeout_t delay)
 Create a new thread reusing the stack from the thread pool.
int mpipe_thread_wait (struct mpipe_thread *thread)
 Block the thread until it is allowed to run or must exit.
void mpipe_thread_resume (struct mpipe_thread *thread)
 Resume a paused thread.
void mpipe_thread_pause (struct mpipe_thread *thread)
 Pause a running thread.
int mpipe_thread_join (struct mpipe_thread *thread, k_timeout_t timeout)
 Join a thread and release its stack back to the thread stack pool.

Detailed Description

Simple wrapper of k_thread to reuse a thread's stack after its termination.