Main Page   Modules   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

/projects/cubeos/src_current/kernel/schedule.h

Go to the documentation of this file.
00001 /*  src_experimental/kernel/schedule.h
00002     CubeOS Version 0.4.90 experimental
00003     Copyright (C) 1999,2000 Holger Kenn
00004 
00005     CubeOS is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or any later version.
00009 
00010     CubeOS is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015 */  
00016 #ifndef SCHEDULE_H
00017 #define SCHEDULE_H
00018 
00023 #define RR_SCHEDULER
00024 #include <context.h> /* for regs */
00025 #include <reent.h>
00026 #include <list.h>    /* for entry type */
00027 /* Again, goes into global_defs later */
00028 #define MAX_PROCESSNUM 16 
00029 #define MAX_PRIONUM 16    
00030 #define NO_TASK -1  
00031 
00032 #define STATE_EMPTY    0   
00033 #define STATE_RUNNING  1   
00034 #define STATE_READY    2   
00035 #define STATE_SUSPEND  3   
00036 #define STATE_KILLED   4   
00037 
00038 
00043 struct process {
00044         reglist regs;   
00045         void *stack;    
00046         char state;     
00047         char irq;       
00048         int signal;     
00049         int mask;       
00050         int ppid;       
00051         struct _reent reent; 
00052         int message;    
00053         struct sem_t * sem;  
00054         unsigned int time_delta; 
00056         int prio;       
00057         entry me;       
00058         int pid;        
00059         int next; 
00060 };
00061 extern struct process _KERN_ptable[MAX_PROCESSNUM]; 
00062 //extern int _KERN_deltahead;                       //!< head of the delta queue which holds time-suspended threads
00063 extern list _KERN_delta;                            
00064 extern list _KERN_prio[MAX_PRIONUM+1];
00065 int KERN_schedinit();
00066 int KERN_delta_handler();
00067 int KERN_create(void * function);
00068 void KERN_schedule(void);
00069 int getpid();
00070 //int pmsg_send(int pid,int message);
00071 //int pmsg_receive();
00072 int KERN_suspend(int i);
00073 int wakeup(int i);
00074 #endif

Generated on Thu Feb 20 15:38:45 2003 for cubeOS by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002