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

opale_fake.c File Reference

#include <tigcclib.h>

Include dependency graph for opale_fake.c:

Include dependency graph

Go to the source code of this file.

Functions

void op_KernelStart (void)
void op_KernelStop (void)

Variables

unsigned long op_idleCounter


Function Documentation

void op_KernelStart void   ) 
 

Starts the kernel by launching the highest priority task ready to run. If there's been no call to op_TaskStart before entering op_KernelStart, the idle task will be made ready to run and the system will be freezed waiting for an interrupt or anything. So don't forget to create at least one task before calling op_KernelStart.
op_KernelStart never returns except if op_KernelStop is called.

section op_KernelStart
op_KernelStart:

        movem.l d0-a6,-(a7)
        
        lea.l   idleTask(pc),a0
        move.l  a0,currentTask                  ;currentTask = &idleTask;

        move.l  a7,exitSP                       ; saves SP

        move.l  (a0),a7
        
        addq.l  #6,a7

        movem.l (a7) ,d0-a6
        
        lea.l   op_idleCounter(pc),a0
        
        clr.l   (a0)
        move.l  (a0),op_tickCounter
        move.l  (a0),numberOfNestedShedulerHalts        ; numberOfNestedShedulerHalts = 0;
        
        trap    #6                              ; calls scheduler
                
IdleTaskFunction:
        addq.l  #1,op_idleCounter
Definition at line 24 of file opale_fake.c.

void op_KernelStop void   ) 
 

Stops all running tasks, and exits the kernel multithreading. The effect is just that op_KernelStart seemes to return, and so the code after the call to op_KernelStart will be executed.
Remember that it won't free ressources allocated by the tasks.

section op_KernelStop
op_KernelStop:

        trap #7                 ;op_EnterCriticalSection();

        move.l  exitSP(pc),a7   ; restores sp
        movem.l (a7) ,d0-a6     ; restores regs
        
        bra     RestoreIntVectors(pc)

;       never returns
Definition at line 64 of file opale_fake.c.


Variable Documentation

unsigned long op_idleCounter
 

counter incremented by the idle task. Useful to compute CPU load.

section op_idleCounter:
op_idleCounter:
        ds.l    1
Definition at line 16 of file opale_fake.c.


Generated on Sat Jul 30 21:49:20 2005 for Opale by doxygen 1.3.8