15,11 → 15,11 |
|
/** |
------------ |
CVS : $Id: cbs_ft.c,v 1.2 2002-10-28 08:14:58 pj Exp $ |
CVS : $Id: cbs_ft.c,v 1.3 2002-11-11 08:14:22 pj Exp $ |
|
File: $File$ |
Revision: $Revision: 1.2 $ |
Last update: $Date: 2002-10-28 08:14:58 $ |
Revision: $Revision: 1.3 $ |
Last update: $Date: 2002-11-11 08:14:22 $ |
------------ |
|
This file contains the server CBS_FT |
65,7 → 65,6 |
/*+ Status used in the level +*/ |
#define CBS_FT_IDLE APER_STATUS_BASE /*+ waiting the activation +*/ |
#define CBS_FT_ZOMBIE APER_STATUS_BASE+1 /*+ waiting the period end +*/ |
#define CBS_FT_DELAY APER_STATUS_BASE+2 /*+ waiting the delay end +*/ |
|
/* structure of an element of the capacity queue */ |
struct cap_queue { |
290,7 → 289,6 |
switch (status) { |
case CBS_FT_IDLE : return "CBS_FT_Idle"; |
case CBS_FT_ZOMBIE : return "CBS_FT_Zombie"; |
case CBS_FT_DELAY : return "CBS_FT_Delay"; |
default : return "CBS_FT_Unknown"; |
} |
} |
435,7 → 433,7 |
|
/* we finally put the task in the FREE status */ |
proc_table[p].status = FREE; |
q_insertfirst(p,&freedesc); |
iq_insertfirst(p,&freedesc); |
|
|
/* and free the allocated bandwidth */ |
605,29 → 603,11 |
return 0; /* if the task p is chosen, it is always eligible */ |
} |
|
#ifdef __TEST1__ |
extern int testactive; |
extern struct timespec s_stime[]; |
extern TIME s_curr[]; |
extern TIME s_PID[]; |
extern int useds; |
#endif |
|
static void CBS_FT_task_dispatch(LEVEL l, PID p, int nostop) |
{ |
CBS_FT_level_des *lev = (CBS_FT_level_des *)(level_table[l]); |
level_table[ lev->scheduling_level ]-> |
guest_dispatch(lev->scheduling_level,p,nostop); |
|
#ifdef __TEST1__ |
if (testactive) |
{ |
TIMESPEC_ASSIGN(&s_stime[useds], &schedule_time); |
s_curr[useds] = proc_table[p].avail_time; |
s_PID[useds] = p; |
useds++; |
} |
#endif |
} |
|
static void CBS_FT_task_epilogue(LEVEL l, PID p) |
836,13 → 816,6 |
} |
|
|
static void CBS_FT_task_delay(LEVEL l, PID p, TIME usdelay) |
{ |
printk("CBS_FT_task_delay\n"); |
kern_raise(XINVALID_TASK,p); |
} |
|
|
static int CBS_FT_guest_create(LEVEL l, PID p, TASK_MODEL *m) |
{ kern_raise(XINVALID_GUEST,exec_shadow); return 0; } |
|
873,12 → 846,9 |
static void CBS_FT_guest_sleep(LEVEL l, PID p) |
{ kern_raise(XINVALID_GUEST,exec_shadow); } |
|
static void CBS_FT_guest_delay(LEVEL l, PID p,DWORD tickdelay) |
{ kern_raise(XINVALID_GUEST,exec_shadow); } |
|
|
|
|
/* Registration functions */ |
|
/*+ Registration function: |
930,7 → 900,6 |
lev->l.task_endcycle = CBS_FT_task_endcycle; |
lev->l.task_end = CBS_FT_task_end; |
lev->l.task_sleep = CBS_FT_task_sleep; |
lev->l.task_delay = CBS_FT_task_delay; |
|
lev->l.guest_create = CBS_FT_guest_create; |
lev->l.guest_detach = CBS_FT_guest_detach; |
942,7 → 911,6 |
lev->l.guest_endcycle = CBS_FT_guest_endcycle; |
lev->l.guest_end = CBS_FT_guest_end; |
lev->l.guest_sleep = CBS_FT_guest_sleep; |
lev->l.guest_delay = CBS_FT_guest_delay; |
|
/* fill the CBS_FT descriptor part */ |
for (i=0; i<MAX_PROC; i++) { |