TNeoKernel
v1.0
|
Task.
Definition at line 172 of file tn_tasks.h.
Data Fields | |
unsigned int * | task_stk |
pointer to task's current stack pointer; Note that this field must be a first field in the struct, this fact is exploited by platform-specific routines. More... | |
struct TN_ListItem | task_queue |
queue is used to include task in ready/wait lists | |
struct TN_ListItem | timer_queue |
queue is used to include task in timer list | |
struct TN_ListItem * | pwait_queue |
pointer to object's (semaphore, mutex, event, etc) wait list in which task is included for waiting | |
struct TN_ListItem | create_queue |
queue is used to include task in creation list (currently, this list is used for statistics only) | |
struct TN_ListItem | mutex_queue |
list of all mutexes that are locked by task | |
struct TN_ListItem | deadlock_list |
list of other tasks involved in deadlock. More... | |
TN_UWord * | stk_start |
base address of task's stack space | |
int | stk_size |
size of task's stack (in sizeof(unsigned int) , not bytes) | |
TN_TaskBody * | task_func_addr |
pointer to task's body function given to tn_task_create() | |
void * | task_func_param |
pointer to task's parameter given to tn_task_create() | |
int | base_priority |
base priority of the task (actual current priority may be higher than base priority because of mutex) | |
int | priority |
current task priority | |
enum TN_ObjId | id_task |
id for object validity verification | |
enum TN_TaskState | task_state |
task state | |
enum TN_WaitReason | task_wait_reason |
reason for waiting (relevant if only task_state is WAIT or WAIT+SUSPEND ) | |
enum TN_RCode | task_wait_rc |
waiting result code (reason why waiting finished) | |
unsigned long | tick_count |
remaining time until timeout; may be TN_WAIT_INFINITE . | |
int | tslice_count |
time slice counter | |
union { | |
struct TN_EGrpTaskWait eventgrp | |
fields specific to tn_eventgrp.h | |
struct TN_DQueueTaskWait dqueue | |
fields specific to tn_dqueue.h | |
struct TN_FMemTaskWait fmem | |
fields specific to tn_fmem.h | |
} | subsys_wait |
subsystem-specific fields that are used while task waits for something. More... | |
const char * | name |
task name for debug purposes, user may want to set it by hand | |
unsigned | priority_already_updated: 1 |
Internal flag used to optimize mutex priority algorithms. More... | |
unsigned int* TN_Task::task_stk |
pointer to task's current stack pointer; Note that this field must be a first field in the struct, this fact is exploited by platform-specific routines.
Definition at line 176 of file tn_tasks.h.
struct TN_ListItem TN_Task::deadlock_list |
list of other tasks involved in deadlock.
This list is non-empty only in emergency cases, and it is here to help you fix your bug that led to deadlock.
TN_MUTEX_DEADLOCK_DETECT
Definition at line 203 of file tn_tasks.h.
union { ... } TN_Task::subsys_wait |
subsystem-specific fields that are used while task waits for something.
Do note that these fields are grouped by union, so, they must not interfere with each other. It's quite ok here because task can't wait for different things.
unsigned TN_Task::priority_already_updated |
Internal flag used to optimize mutex priority algorithms.
For the comments on it, see file tn_mutex.c, function _mutex_do_unlock()
.
Definition at line 268 of file tn_tasks.h.