##### Synopsis

    #include <ctl_api.h>
    extern CTL_TASK_t *ctl_task_executing;

##### Description

The ctl_task_executing variable points to the CTL_TASK_t structure of the currently executing task. The priority field is the only one of the CTL_TASK_t structure that is defined for the task that is executing. It is an error is ctl_task_executing takes the NULL value.

##### Portability

ctl_task_executing is provided in every implementation of the CrossWorks tasking library.