Main Page | Data Structures | File List | Data Fields | Globals
Small Business Loans Big Lines of Credit Merchant Cash Advances SBA Loans Short Term Loads Long Term Loans best business loans Working Capital Equipment Financingbusiness loans

opale_internal.h File Reference

#include <tigcclib.h>
#include "opale.h"

Include dependency graph for opale_internal.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  t_EVENT

Defines

#define identToX(_itx)   ((_itx)&MASK_X)
#define identToY(_ity)   ((_ity)>>MASK_Y)
#define IDLE_TASK_IDENT   IDLE_TASK_PRIORITY
#define IDLE_TASK_PRIORITY   LOWEST_PRIORITY
#define indexToSettedBit(_itsb)   (1<<(_itsb))
#define indexToUnsettedBit(_itub)   (~(1<<(_itub)))
#define MASK_X    )     ((_itx)&MASK_X)
 

Definition at line 17 of file opale_internal.h.

Referenced by addTaskToTable(), and removeTaskFromTable().

#define identToY _ity   )     ((_ity)>>MASK_Y)
 

Definition at line 18 of file opale_internal.h.

Referenced by addTaskToTable(), and removeTaskFromTable().

#define IDLE_TASK_IDENT   IDLE_TASK_PRIORITY
 

Definition at line 12 of file opale_internal.h.

Referenced by op_KernelInit().

#define IDLE_TASK_PRIORITY   LOWEST_PRIORITY
 

Definition at line 11 of file opale_internal.h.

#define indexToSettedBit _itsb   )     (1<<(_itsb))
 

Definition at line 14 of file opale_internal.h.

Referenced by Scheduler().

#define indexToUnsettedBit _itub   )     (~(1<<(_itub)))
 

Definition at line 15 of file opale_internal.h.

#define MASK_X   (_X_-1)
 

Definition at line 8 of file opale_internal.h.

Referenced by Scheduler().

#define MASK_Y   (_N_)
 

Definition at line 9 of file opale_internal.h.

Referenced by MakeTaskReady(), and Scheduler().

 
#define op_Scheduler  )     asm(" trap #6")
 

Definition at line 20 of file opale_internal.h.

Referenced by moveFromTable(), op_TaskStart(), op_TaskStop(), and op_TaskWaitForTicks().


Function Documentation

void addTaskToTable register t_TASK_BLOCK *table   asm(" "),
register unsigned char ident   asm("Ð")
 

Adds a task to a t_TASK_BLOCK. This could be either a table of waiting tasks, or sleeping tasks, or so.

Parameters:
table (a0.l) Pointer to the table
ident (d0.l) Ident of the task to insert
Definition at line 63 of file opale_event.c.

References identToX, and identToY.

Referenced by moveFromTable(), op_TaskStart(), and PerformDelay().

void ContextSwitch register t_TASK *highestPriorityTaskReady   asm("£"),
register t_TASK **currentTask   asm("¢")
 

Referenced by Scheduler().

void IdleTaskFunction register void *  asm(" ")  ) 
 

Referenced by op_KernelInit().

void InitIntVectors void   ) 
 

Referenced by op_KernelInit().

void* InitStack register void *args   asm(" "),
register char *stack   asm("¡"),
register   void(*)() asm func("¢")
 

Referenced by op_TaskStart().

void removeTaskFromTable register t_TASK_BLOCK *table   asm(" "),
register unsigned char ident   asm("Ð")
 

Remove a task from a t_TASK_BLOCK. This could be either a table of waiting tasks, or sleeping tasks, or so.

Parameters:
table (a0.l) Pointer to the table
ident (d0.l) Ident of the task to remove
Definition at line 76 of file opale_event.c.

References identToX, and identToY.

Referenced by moveFromTable(), op_TaskStop(), and op_TaskWaitForTicks().

void RestoreIntVectors void   ) 
 


Variable Documentation

t_TASK* currentTask
 

Referenced by op_TaskStop(), op_TaskWaitForTicks(), Scheduler(), and WaitForEvent().

t_TASK idleTask
 

Task Control Block for the idle task. Definition at line 44 of file opale_core.c.

Referenced by op_KernelInit(), op_TaskWaitForTicks(), and PerformDelay().

unsigned char* indexToLowestSettedBit
 

indexToLowestSettedBit is a pointer to a table used to get the index of the lowest weighted setted bit of a number. Given the number, the value at indexToLowestSettedBit[ number ] is the index of the wanted bit.
The size of the table is calculated in compilation time, since it doesn't have to be more than max( 2^X, 2^Y ) (cf TO_LOWEST_SETTED_BIT_TABLE_SIZE).
The memory for the table is taken from the t_op_BUFFER given as an argument of op_KernelInit, and the table itself is initialized by taht function.

Here is what would the table looks like fo 64 tasks:

                
indexToLowestSettedBit[ TO_LOWEST_SETTED_BIT_TABLE_SIZE ] =
{
        0, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        4, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        5, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        4, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        6, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        4, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        5, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        4, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        7, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        4, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        5, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        4, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        6, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        4, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        5, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0,
        4, 0, 1, 0,     2, 0, 1, 0,     3, 0, 1, 0,     2, 0, 1, 0
};
Definition at line 37 of file opale_core.c.

Referenced by MakeTaskReady(), op_KernelInit(), and Scheduler().

unsigned short numberOfNestedISRs
 

Definition at line 39 of file opale_core.c.

Referenced by op_KernelInit().

unsigned short numberOfNestedShedulerHalts
 

Definition at line 40 of file opale_core.c.

Referenced by op_KernelInit().

t_TASK_BLOCK* readyTasks
 

pointer to the task block used for general purpose scheduling. Definition at line 53 of file opale_core.c.

Referenced by MakeTaskReady(), op_KernelInit(), op_TaskStart(), op_TaskStop(), op_TaskWaitForTicks(), PerformDelay(), Scheduler(), and WaitForEvent().

t_TASK** runningTasks
 

Pointer to the array of running tasks. Definition at line 49 of file opale_core.c.

Referenced by op_KernelInit(), op_TaskStart(), op_TaskStop(), and Scheduler().

t_TASK_BLOCK* waitingTasks
 


Generated on Sun May 14 22:31:06 2006 for Opale by doxygen 1.3.8