#include <sys/device.h>
Go to the source code of this file.
Data Structures | |
struct | _NUTTHREADINFO |
Thread information structure. More... | |
Defines | |
#define | TDS_TERM 0 |
#define | TDS_RUNNING 1 |
#define | TDS_READY 2 |
#define | TDS_SLEEP 3 |
#define | THREAD(threadfn, arg) |
Macro for thread entry definitions. | |
Typedefs | |
typedef _NUTTHREADINFO | NUTTHREADINFO |
Functions | |
HANDLE | NutThreadCreate (u_char *name, void(*fn)(void *), void *arg, u_short stackSize) |
Create a new thread. | |
u_char | NutThreadSetPriority (u_char level) |
Set the current thread's priority. | |
void | NutThreadResumeAsync (HANDLE th) |
Make a previously suspended thread ready to run. | |
void | NutThreadWake (HANDLE timer, HANDLE th) |
Resume a previously suspended thread. | |
void | NutThreadYield (void) |
Give up the CPU. | |
void | NutThreadAddPriQueue (NUTTHREADINFO *td, NUTTHREADINFO **tqpp) |
Add a thread to a prioritiy ordered queue. | |
void | NutThreadRemoveQueue (NUTTHREADINFO *td, NUTTHREADINFO *volatile *tqpp) |
Remove a thread from a specified queue. | |
Variables | |
NUTTHREADINFO *volatile | runningThread |
Currently running thread. | |
NUTTHREADINFO *volatile | nutThreadList |
List of all created threads. | |
NUTTHREADINFO *volatile | runQueue |
List of ready-to-run threads. |
|
Value: void threadfn(void *arg) __attribute__ ((noreturn)); \ void threadfn(void *arg)
|
|
List of all created threads. Linked list of NUTTHREADINFO structures of all threads. New threads are put in front. This list contains at least two threads, the main application thread followed by the idle thread. |
|
Currently running thread. Pointer to the NUTTHREADINFO structure of the currently running thread. |
|
List of ready-to-run threads. Priority ordered linked list of NUTTHREADINFO structures of all threads which are ready to run. |