XCore task events

XCore generates number of events during task execution from synchronization operations and task switches.

Task switch events

Task switch events are generated when task switch occurs or interrupt occurs. Task is assigned an enum value of the TaskNumber type. The name, given to the task, is also assigned to the correspondent task number. Two special value: EnterInt and LeaveInt, are used to designate entry of the interrupt context and exit of the interrupt context. Task switch generates an event of the TaskSwitchEvent type.


struct TaskSwitchEvent // meta-named as TaskSwitch
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 task;
 };

task is the number of the task, which become active. The correspondent marker is Up for EnterInt, Down for LeaveInt and Push for tasks.

Mutex events

Mutex is assigned an enum value of the MutexNumber type. The name, given to the mutex, is also assigned to the correspondent mutex number. Mutex generates events of the MutexEvent type.


struct MutexEvent // meta-named as MutexEvent
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 task;
  uint16 mutex;
  uint8 type;
  
  enum Type : uint8
   {
    Lock,
    Unlock,
    IncLock,
    DecLock,
    Block
   };
 };

task is a task number.

mutex is a mutex number.

type is an event type. There are five event types.

Lock is generated when the task locks the mutex. The correspondent maker is Up.

Unlock is generated when the task unlocks the mutex. The correspondent maker is Down.

IncLock is generated when the task increments the lock count of the mutex, which is already locked by the task. The correspondent maker is Inc.

DecLock is generated when the task decrements the lock count of the mutex, which is remaining locked by the task. The correspondent maker is Dec.

Block is generated when the task becomes blocked by the mutex, which is already locked by another task. The correspondent maker is UpBlock.

Sem events

Semaphore is assigned an enum value of the SemNumber type. The name, given to the semaphore, is also assigned to the correspondent semaphore number. Semaphore generates events of the SemEvent type and the SemEvent_task type.


struct SemEvent // meta-named as SemEvent
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 sem;
  uint8 type;
  
  enum Type : uint8
   {
    ToTaskList,
    Give,
    GiveMany
   };
 };

sem is a semaphore number.

type is an event type. There are three event types.

ToTaskList is generated when the give_many() operation releases a group of tasks. The correspondent marker is UpUpPush.

Give is generated when a task or an interrupt gives the semaphore. The correspondent marker is Up.

GiveMany is generated when a task or an interrupt gives the semaphore many times. The correspondent marker is UpUp.


struct SemEvent_task // meta-named as SemEventTask
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 task;
  uint16 sem;
  uint8 type;
  
  enum Type : uint8
   {
    ToTask, 
    Take,    
    Block  
   };
 };

task is a task number.

sem is a semaphore number.

type is an event type. There are three event types.

ToTask is generated when the semaphore, which is given by another task or an interrupt, releases the task. The correspondent marker is UpPush.

Take is generated when the task takes the semaphore. The correspondent marker is Down.

Block is generated when the task becomes blocked by the semaphore. The correspondent marker is DownBlock.

Event events

Event is assigned an enum value of the EventNumber type. The name, given to the event, is also assigned to the correspondent event number. Event generates events of the EventEvent type and the EventEvent_task type.


struct EventEvent // meta-named as EventEvent
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 event;
  uint8 type;
  
  enum Type : uint8
   {
    Trigger
   };
 };

event is an event number.

type is an event type. There is only one event type.

Trigger is generated when a task or an interrupt triggers the event. The correspondent marker is Up.


struct EventEvent_task // meta-named as EventEventTask
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 task;
  uint16 event;
  uint8 type;
  
  enum Type : uint8
   {
    ToTask,
    Consume,
    Block
   };
 };

task is a task number.

event is an event number.

type is an event type. There are three event types.

ToTask is generated when the event, which is triggered by another task or an interrupt, releases the task. The correspondent marker is UpPush.

Consume is generated when the task consumes the event. The correspondent marker is Down.

Block is generated when the task becomes blocked by the event. The correspondent marker is DownBlock.

MultiSem events

Multi-semaphore is assigned an enum value of the MultiSemNumber type. The name, given to the multi-semaphore, is also assigned to the correspondent multi-semaphore number. Multi-semaphore generates events of the MultiSemEvent type and the MultiSemEvent_task type.


struct MultiSemEvent // meta-named as MultiSemEvent
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 msem;
  uint8 type;
  uint8 index;
  
  enum Type : uint8
   {
    Give
   };
 };

msem is a multi-semaphore number.

type is an event type. There is only one event type.

index is the input index.

Give is generated when a task or an interrupt gives the multi-semaphore. The correspondent marker is Up.


struct MultiSemEvent_task // meta-named as MultiSemEventTask
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 task;
  uint16 msem;
  uint8 type;
  uint8 index;
  
  enum Type : uint8
   {
    ToTask, 
    Block,  
    Take    
   };
 };

task is a task number.

msem is a multi-semaphore number.

type is an event type. There are three event types.

index is the input index.

ToTask is generated when the multi-semaphore, which is given by another task or an interrupt, releases the task. The correspondent marker is UpPush.

Take is generated when the task takes the multi-semaphore. The correspondent marker is Down.

Block is generated when the task becomes blocked by the multi-semaphore. The correspondent marker is DownBlock.

MultiEvent events

Multi-event is assigned an enum value of the MultiEventNumber type. The name, given to the multi-event, is also assigned to the correspondent multi-event number. Multi-event generates events of the MultiEventEvent type and the MultiEventEvent_task type.


struct MultiEventEvent // meta-named as MultiEventEvent
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 mevent;
  uint8 type;
  uint8 index;
  
  enum Type : uint8
   {
    Trigger
   };
 };

mevent is a multi-event number.

type is an event type. There is only one event type.

index is the input index.

Trigger is generated when a task or an interrupt triggers the multi-event. The correspondent marker is Up.


struct MultiEventEvent_task // meta-named as MultiEventEventTask
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 task;
  uint16 mevent;
  uint8 type;
  uint8 index;
  
  enum Type : uint8
   {
    ToTask,
    Consume,
    Block
   };
 };

task is a task number.

mevent is a multi-event number.

type is an event type. There are three event types.

index is the input index.

ToTask is generated when the multi-event, which is triggered by another task or an interrupt, releases the task. The correspondent marker is UpPush.

Consume is generated when the task consumes the multi-event. The correspondent marker is Down.

Block is generated when the task becomes blocked by the multi-event. The correspondent marker is DownBlock.

AntiSem events

Anti-semaphore is assigned an enum value of the AntiSemNumber type. The name, given to the anti-semaphore, is also assigned to the correspondent anti-semaphore number. Anti-semaphore generates events of the AntiSemEvent type and the AntiSemEvent_task type.


struct AntiSemEvent // meta-named as AntiSemEvent
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 asem;
  uint8 type;
  
  enum Type : uint8
   {
    Add,
    Sub,
    Release
   };
 };

asem is an anti-semaphore number.

type is an event type. There are three event types.

Add is generated when the anti-semaphore is added. The correspondent marker is Down.

Sub is generated when the anti-semaphore is subtracted, but still remaining blocking. The correspondent marker is Up.

Release is generated when the anti-semaphore becomes non-blocking. All blocked tasks, if any, are released. The correspondent marker is UpPush.


struct AntiSemEvent_task // meta-named as AntiSemEventTask
 {
  EventTimeType time;
  EventIdType id;

  uint16 task;
  uint16 asem;
  uint8 type;
  
  enum Type : uint8
   {
    Wait,
    Pass
   };
 };

task is a task number.

asem is an anti-semaphore number.

type is an event type. There are two event types.

Wait is generated when the task becomes blocked by the anti-semaphore. The correspondent marker is Wait.

Pass is generated when the task passes the non-blocking anti-semaphore. The correspondent marker is Pass.

ResSem events

Res-semaphore is assigned an enum value of the ResSemNumber type. The name, given to the res-semaphore, is also assigned to the correspondent res-semaphore number. Res-semaphore generates events of the ResSemEvent type and the ResSemEvent_task type.


struct ResSemEvent // meta-named as ResSemEvent
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 rsem;
  uint8 type;
  
  enum Type : uint8
   {
    Give
   };
 };

rsem is a res-semaphore number.

type is an event type. There is only one event type.

Give is generated when the res-semaphore is given. The correspondent marker is Up.


struct ResSemEvent_task // meta-named as ResSemEventTask
 {
  EventTimeType time;
  EventIdType id;
  
  uint16 task;
  uint16 rsem;
  uint8 type;
  
  enum Type : uint8
   {
    ToTask,
    Wait,
    Pass,
    Block,
    Take
   };
 };

task is a task number.

rsem is a res-semaphore number.

type is an event type. There are five event types.

ToTask is generated when the res-semaphore, which is given by another task or an interrupt, releases the task. The correspondent marker is UpPush.

Wait is generated when the task becomes blocked by the res-semaphore during the wait() operation. The correspondent marker is Wait.

Pass is generated when the task passes the non-blocking res-semaphore. The correspondent marker is Pass.

Block is generated when the task becomes blocked by the res-semaphore. The correspondent marker is DownBlock.

Take is generated when the task takes the res-semaphore during the take() operation. The correspondent marker is Down.