#include "opale_internal.h"
Include dependency graph for opale_event.c:
Go to the source code of this file.
Functions | |
void | addTaskToTable (register t_TASK_BLOCK *table asm(" "), register unsigned char ident asm("Ð")) |
void | EventInit (register t_EVENT *event asm(" "), register unsigned long initValue asm("Ð")) |
void | MakeTaskReady (register t_EVENT *event asm(" ")) |
void | moveFromTable (register t_TASK_BLOCK *tableFrom asm(" "), register t_TASK_BLOCK *tableTo asm("¡"), register unsigned char ident asm("d0")) |
void | op_MailBoxInit (register t_MAILBOX *mailbox asm(" "), register void *initMessage asm("Ð")) |
void * | op_MailBoxPend (register t_MAILBOX *mailBox asm(" ")) |
unsigned short | op_MailBoxPost (register t_MAILBOX *mailBox asm(" "), register void *message asm("Ð")) |
void | op_QueueInit (register t_QUEUE *queue asm(" "), register void *buffer asm("Ð"), register unsigned short size asm("Ñ")) |
void * | op_QueuePend (register t_QUEUE *queue asm(" ")) |
unsigned short | op_QueuePost (register t_QUEUE *queue asm(" "), register void *message asm("Ð")) |
unsigned short | op_QueuePostFront (register t_QUEUE *queue asm(" "), register void *message asm("Ð")) |
void | op_SemaphoreInit (register t_SEMAPHORE *semaphore asm(" "), register unsigned long initValue asm("Ð")) |
void | op_SemaphorePend (register t_SEMAPHORE *semaphore asm(" ")) |
void | op_SemaphorePost (register t_SEMAPHORE *semaphore asm(" ")) |
void | removeTaskFromTable (register t_TASK_BLOCK *table asm(" "), register unsigned char ident asm("Ð")) |
void | WaitForEvent (register t_EVENT *event asm(" ")) |
|
Adds a task to a t_TASK_BLOCK. This could be either a table of waiting tasks, or sleeping tasks, or so.
References identToX, and identToY. Referenced by moveFromTable(), op_TaskStart(), and PerformDelay(). |
|
General initialization for events (semaphores, mailboxes, queues). Set values of common fields of the events control blocks. op_SemaphoreInit and op_MailBoxInit are just redefinitions of this function. op_QueueInit uses it too, but with complementary code.
References _Y_. Referenced by op_MailBoxInit(), op_QueueInit(), and op_SemaphoreInit(). |
|
Makes the highest priority task from a waiting table ready to run (transfers the task to the readyTasks table)
References indexToLowestSettedBit, MASK_Y, moveFromTable(), and readyTasks. Referenced by op_MailBoxPost(), op_QueuePost(), op_QueuePostFront(), and op_SemaphorePost(). Here is the call graph for this function: ![]() |
|
Tranfer a task from a waiting table to another. Used for making a task to sleep or to wake it.
References addTaskToTable(), op_Scheduler, and removeTaskFromTable(). Referenced by MakeTaskReady(), and WaitForEvent(). Here is the call graph for this function: ![]() |
|
Inits a MailBox with an initial message. It is done so you just don't have to fill manually the fields of the t_MAILBOX object.
References EventInit(). Here is the call graph for this function: ![]() |
|
Wait for a message to be posted in the mailbox. If a message already is in the mailbox when the function is called, it will just return it. If there's no message, the task will be removed from the ready list and make ready again only when a message has been posted and the task is the highest priority one waiting for it.
References op_EnterCriticalSection, op_ExitCriticalSection, and WaitForEvent(). Here is the call graph for this function: ![]() |
|
Post to the mailbox. It will fill the message field if it isn't already not NULL. If so, the function will return an error. If tasks were waiting on the mailbox, the highest priority one is made ready to run and the scheduler is called.
References MakeTaskReady(), op_EnterCriticalSection, and op_ExitCriticalSection. Here is the call graph for this function: ![]() |
|
Inits a message queue with an initial message. It is done so you just don't have to fill manually the fields of the t_MAILBOX object.
References EventInit(). Here is the call graph for this function: ![]() |
|
Wait for a message to be posted in the message queue. If one or more message already is in the queue when the function is called, it will just return the one on the front of the queue. If there's no message, the task will be removed from the ready list and make ready again only when a message has been posted and the task is the highest priority one waiting for it.
References op_EnterCriticalSection, op_ExitCriticalSection, and WaitForEvent(). Here is the call graph for this function: ![]() |
|
Post a message on the back of the message queue. It will add the message to the back of the queue if the queue isn't already full. If so, the function will return an error. If tasks were waiting on the message queue, the highest priority one is made ready to run and the scheduler is called.
References MakeTaskReady(), op_EnterCriticalSection, and op_ExitCriticalSection. Here is the call graph for this function: ![]() |
|
Post a message on the front of the message queue. It will add the message to the front of the queue if the queue isn't already full. If so, the function will return an error. This is different from QueuePost since the messages are taken from the front of the queue on a QueuePend. So a message posted with QueuePostFronT will be read before one posted with QueuePost. If tasks were waiting on the message queue, the highest priority one is made ready to run and the scheduler is called.
References MakeTaskReady(), op_EnterCriticalSection, and op_ExitCriticalSection. Here is the call graph for this function: ![]() |
|
Inits a Semaphore with an initial count. It is done so you just don't have to fill manually the fields of the t_SEMAPHORE object.
References EventInit(). Here is the call graph for this function: ![]() |
|
Pend on a semaphore. If the count is not 0, the function will just return. If the semaphore has already been taken (its count isn't 0), the task will be removed from the ready list and wait until some other task post to the semaphore, and no other task of higher priority is pending on it.
References op_EnterCriticalSection, op_ExitCriticalSection, and WaitForEvent(). Here is the call graph for this function: ![]() |
|
Post to the semaphore. It will increment the semaphore's count, and made ready to run the highest priority task pending on it. The scheduler is then called.
References MakeTaskReady(), op_EnterCriticalSection, and op_ExitCriticalSection. Here is the call graph for this function: ![]() |
|
Remove a task from a t_TASK_BLOCK. This could be either a table of waiting tasks, or sleeping tasks, or so.
References identToX, and identToY. Referenced by moveFromTable(), op_TaskStop(), and op_TaskWaitForTicks(). |
|
Transfers the current task to the waiting table of the wanted event
References currentTask, t_TASK::ident, moveFromTable(), and readyTasks. Referenced by op_MailBoxPend(), op_QueuePend(), and op_SemaphorePend(). Here is the call graph for this function: ![]() |