/shark/trunk/kernel/activate.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: activate.c,v 1.4 2003-11-05 15:05:10 giacomo Exp $ |
CVS : $Id: activate.c,v 1.5 2003-12-10 16:54:58 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.4 $ |
Last update: $Date: 2003-11-05 15:05:10 $ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-12-10 16:54:58 $ |
------------ |
task_activate & group_activate |
62,7 → 62,7 |
#include <errno.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/*+ |
Activates a single task |
118,7 → 118,7 |
proc_table[p].frozen_activations++; |
else { |
/* tracer stuff */ |
trc_logevent(TRC_ACTIVATE,&p); |
TRACER_LOGEVENT(FTrace_EVT_task_activate,1,p,0); |
l = proc_table[p].task_level; |
level_table[l]->public_activate(l,p); |
160,7 → 160,7 |
continue; |
} |
/* tracer stuff */ |
trc_logevent(TRC_ACTIVATE,&i); |
TRACER_LOGEVENT(FTrace_EVT_task_activate,1,i,0); |
l = proc_table[i].task_level; |
level_table[l]->public_activate(l,i); |
} |
179,7 → 179,7 |
continue; |
} |
/* tracer stuff */ |
trc_logevent(TRC_ACTIVATE,&i); |
TRACER_LOGEVENT(FTrace_EVT_task_activate,1,i,0); |
l = proc_table[i].task_level; |
level_table[l]->public_activate(l,i); |
event_need_reschedule(); |
198,7 → 198,7 |
l = proc_table[i].task_level; |
level_table[l]->public_activate(l,i); |
/* tracer stuff */ |
trc_logevent(TRC_ACTIVATE,&i); |
TRACER_LOGEVENT(FTrace_EVT_task_activate,1,i,0); |
} |
scheduler(); |
/shark/trunk/kernel/modules/edf.c |
---|
20,11 → 20,11 |
/** |
------------ |
CVS : $Id: edf.c,v 1.8 2003-09-29 16:24:36 giacomo Exp $ |
CVS : $Id: edf.c,v 1.9 2003-12-10 16:55:00 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.8 $ |
Last update: $Date: 2003-09-29 16:24:36 $ |
Revision: $Revision: 1.9 $ |
Last update: $Date: 2003-12-10 16:55:00 $ |
------------ |
This file contains the scheduling module EDF (Earliest Deadline First) |
60,8 → 60,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
//#define EDF_DEBUG |
#define edf_printf kern_printf |
122,7 → 123,7 |
case EDF_IDLE: |
/* tracer stuff */ |
trc_logevent(TRC_INTACTIVATION,&p); |
TRACER_LOGEVENT(FTrace_EVT_task_timer,3,p,proc_table[p].task_level); |
/* similar to EDF_task_activate */ |
temp = iq_query_timespec(p,&lev->ready); |
ADDUSEC2TIMESPEC(lev->period[p], temp); |
371,7 → 372,7 |
proc_table[p].avail_time = proc_table[p].wcet; |
jet_update_endcycle(); /* Update the Jet data... */ |
trc_logevent(TRC_ENDCYCLE,&p); /* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_end_cycle,3,p,l); |
break; |
390,7 → 391,7 |
if (proc_table[p].status == EDF_IDLE) |
proc_table[p].status = EDF_WAIT; |
trc_logevent(TRC_DISABLE,&p); |
TRACER_LOGEVENT(FTrace_EVT_task_disable,3,p,l); |
break; |
/shark/trunk/kernel/modules/posix.c |
---|
20,11 → 20,11 |
/** |
------------ |
CVS : $Id: posix.c,v 1.5 2003-10-07 09:25:33 giacomo Exp $ |
CVS : $Id: posix.c,v 1.6 2003-12-10 16:55:00 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-10-07 09:25:33 $ |
Revision: $Revision: 1.6 $ |
Last update: $Date: 2003-12-10 16:55:00 $ |
------------ |
This file contains the scheduling module compatible with POSIX |
63,8 → 63,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/*+ Status used in the level +*/ |
#define POSIX_READY MODULE_STATUS_BASE |
264,7 → 265,7 |
proc_table[p].status = SLEEP; |
jet_update_endcycle(); /* Update the Jet data... */ |
trc_logevent(TRC_ENDCYCLE,&exec_shadow); /* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_end_cycle,3,p,l); |
return 0; |
} |
/shark/trunk/kernel/modules/hardcbs.c |
---|
45,8 → 45,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/*+ Status used in the level +*/ |
#define HCBS_IDLE APER_STATUS_BASE /*+ waiting the activation +*/ |
#define HCBS_ZOMBIE APER_STATUS_BASE+1 /*+ waiting the period end +*/ |
190,7 → 191,7 |
} |
/* tracer stuff */ |
trc_logevent(TRC_INTACTIVATION,&p); |
TRACER_LOGEVENT(FTrace_EVT_task_timer,3,p,proc_table[p].task_level); |
} |
449,7 → 450,7 |
} |
jet_update_endcycle(); /* Update the Jet data... */ |
trc_logevent(TRC_ENDCYCLE,&p); /* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_end_cycle,3,p,l); |
break; |
456,7 → 457,7 |
case 1: |
lev->flag[p] |= HCBS_SLEEP; |
trc_logevent(TRC_DISABLE,&p); |
TRACER_LOGEVENT(FTrace_EVT_task_disable,3,p,l); |
break; |
/shark/trunk/kernel/modules/cbs.c |
---|
20,11 → 20,11 |
/** |
------------ |
CVS : $Id: cbs.c,v 1.7 2003-07-24 12:24:51 giacomo Exp $ |
CVS : $Id: cbs.c,v 1.8 2003-12-10 16:54:59 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.7 $ |
Last update: $Date: 2003-07-24 12:24:51 $ |
Revision: $Revision: 1.8 $ |
Last update: $Date: 2003-12-10 16:54:59 $ |
------------ |
This file contains the aperiodic server CBS (Total Bandwidth Server) |
60,8 → 60,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/*+ 4 debug purposes +*/ |
#undef CBS_TEST |
#undef CBS_COUNTER |
239,7 → 240,7 |
if (p==5) cbs_counter2++; |
#endif |
/* tracer stuff */ |
trc_logevent(TRC_INTACTIVATION,&p); |
TRACER_LOGEVENT(FTrace_EVT_task_timer,3,p,proc_table[p].task_level); |
} |
492,7 → 493,7 |
} |
jet_update_endcycle(); /* Update the Jet data... */ |
trc_logevent(TRC_ENDCYCLE,&p); /* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_end_cycle,3,p,l); |
break; |
499,7 → 500,7 |
case 1: |
lev->flag[p] |= CBS_SLEEP; |
trc_logevent(TRC_DISABLE,&p); |
TRACER_LOGEVENT(FTrace_EVT_task_disable,3,p,l); |
break; |
/shark/trunk/kernel/modules/rrsoft.c |
---|
20,11 → 20,11 |
/** |
------------ |
CVS : $Id: rrsoft.c,v 1.5 2003-05-01 19:39:35 pj Exp $ |
CVS : $Id: rrsoft.c,v 1.6 2003-12-10 16:55:01 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-05-01 19:39:35 $ |
Revision: $Revision: 1.6 $ |
Last update: $Date: 2003-12-10 16:55:01 $ |
------------ |
This file contains the scheduling module RRSOFT (Round Robin) |
60,8 → 60,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/*+ Status used in the level +*/ |
#define RRSOFT_READY MODULE_STATUS_BASE |
#define RRSOFT_IDLE MODULE_STATUS_BASE+2 |
121,8 → 122,6 |
lev->reactivation_timer[p] = kern_event_post(&lev->reactivation_time[p], |
RRSOFT_timer_reactivate, |
(void *)p); |
/* tracer stuff */ |
// trc_logevent(TRC_INTACTIVATION,&p); |
} |
/* This is not efficient but very fair :-) |
324,7 → 323,7 |
proc_table[p].status = RRSOFT_IDLE; |
jet_update_endcycle(); /* Update the Jet data... */ |
trc_logevent(TRC_ENDCYCLE,&exec_shadow); /* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_end_cycle,3,p,l); |
return 0; |
} |
/shark/trunk/kernel/modules/ss.c |
---|
20,11 → 20,11 |
/** |
------------ |
CVS : $Id: ss.c,v 1.4 2003-01-07 17:07:51 pj Exp $ |
CVS : $Id: ss.c,v 1.5 2003-12-10 16:55:01 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.4 $ |
Last update: $Date: 2003-01-07 17:07:51 $ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-12-10 16:55:01 $ |
------------ |
This file contains the aperiodic Sporadic Server (SS). |
125,8 → 125,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/* For debugging purpose */ |
//#define DEBUG 1 |
884,7 → 885,7 |
} |
jet_update_endcycle(); /* Update the Jet data... */ |
trc_logevent(TRC_ENDCYCLE,&exec_shadow); /* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_end_cycle,3,p,l); |
return 0; |
} |
/shark/trunk/kernel/modules/tbs.c |
---|
20,11 → 20,11 |
/** |
------------ |
CVS : $Id: tbs.c,v 1.4 2003-01-07 17:07:51 pj Exp $ |
CVS : $Id: tbs.c,v 1.5 2003-12-10 16:55:01 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.4 $ |
Last update: $Date: 2003-01-07 17:07:51 $ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-12-10 16:55:01 $ |
------------ |
This file contains the aperiodic server TBS (Total Bandwidth Server) |
60,8 → 60,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/*+ 4 debug purposes +*/ |
#undef TBS_TEST |
328,7 → 329,7 |
TBS_activation(lev); |
jet_update_endcycle(); /* Update the Jet data... */ |
trc_logevent(TRC_ENDCYCLE,&exec_shadow); /* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_end_cycle,3,p,l); |
return 0; |
} |
/shark/trunk/kernel/modules/rr2.c |
---|
20,11 → 20,11 |
/** |
------------ |
CVS : $Id: rr2.c,v 1.4 2003-01-07 17:07:50 pj Exp $ |
CVS : $Id: rr2.c,v 1.5 2003-12-10 16:55:01 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.4 $ |
Last update: $Date: 2003-01-07 17:07:50 $ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-12-10 16:55:01 $ |
------------ |
This file contains the scheduling module RR2 (Round Robin) version 2 |
60,8 → 60,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/*+ Status used in the level +*/ |
#define RR2_READY MODULE_STATUS_BASE |
221,7 → 222,7 |
proc_table[p].status = SLEEP; |
jet_update_endcycle(); /* Update the Jet data... */ |
trc_logevent(TRC_ENDCYCLE,&exec_shadow); /* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_end_cycle,3,p,l); |
return 0; |
} |
/shark/trunk/kernel/modules/ds.c |
---|
20,11 → 20,11 |
/** |
------------ |
CVS : $Id: ds.c,v 1.4 2003-01-07 17:07:50 pj Exp $ |
CVS : $Id: ds.c,v 1.5 2003-12-10 16:54:59 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.4 $ |
Last update: $Date: 2003-01-07 17:07:50 $ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-12-10 16:54:59 $ |
------------ |
This file contains the aperiodic server DS (Deferrable Server) |
64,8 → 64,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/*+ Status used in the level +*/ |
#define DS_WAIT APER_STATUS_BASE /*+ waiting the service +*/ |
365,7 → 366,7 |
DS_activation(lev); |
jet_update_endcycle(); /* Update the Jet data... */ |
trc_logevent(TRC_ENDCYCLE,&exec_shadow); /* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_end_cycle,3,p,l); |
return 0; |
} |
/shark/trunk/kernel/modules/rm.c |
---|
20,11 → 20,11 |
/** |
------------ |
CVS : $Id: rm.c,v 1.5 2003-05-05 07:31:44 pj Exp $ |
CVS : $Id: rm.c,v 1.6 2003-12-10 16:55:00 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-05-05 07:31:44 $ |
Revision: $Revision: 1.6 $ |
Last update: $Date: 2003-12-10 16:55:00 $ |
------------ |
This file contains the scheduling module RM (Rate Monotonic) |
67,8 → 67,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/*+ Status used in the level +*/ |
#define RM_READY MODULE_STATUS_BASE /*+ - Ready status +*/ |
#define RM_WCET_VIOLATED MODULE_STATUS_BASE+2 /*+ when wcet is finished +*/ |
121,7 → 122,7 |
case RM_IDLE: |
/* tracer stuff */ |
trc_logevent(TRC_INTACTIVATION,&p); |
TRACER_LOGEVENT(FTrace_EVT_task_timer,3,p,proc_table[p].task_level); |
/* similar to RM_task_activate */ |
temp = iq_query_timespec(p, &lev->ready); |
ADDUSEC2TIMESPEC(lev->period[p], temp); |
335,7 → 336,7 |
proc_table[p].avail_time = proc_table[p].wcet; |
jet_update_endcycle(); /* Update the Jet data... */ |
trc_logevent(TRC_ENDCYCLE,&exec_shadow); /* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_end_cycle,3,p,l); |
/* when the deadline timer fire, it recognize the situation and set |
correctly all the stuffs (like reactivation, sleep, etc... ) */ |
/shark/trunk/kernel/modules/ps.c |
---|
20,11 → 20,11 |
/** |
------------ |
CVS : $Id: ps.c,v 1.4 2003-01-07 17:07:50 pj Exp $ |
CVS : $Id: ps.c,v 1.5 2003-12-10 16:55:00 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.4 $ |
Last update: $Date: 2003-01-07 17:07:50 $ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-12-10 16:55:00 $ |
------------ |
This file contains the aperiodic server PS (Polling Server) |
103,8 → 103,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/*+ Status used in the level +*/ |
#define PS_WAIT APER_STATUS_BASE /*+ waiting the service +*/ |
407,7 → 408,7 |
PS_activation(lev); |
jet_update_endcycle(); /* Update the Jet data... */ |
trc_logevent(TRC_ENDCYCLE,&exec_shadow); /* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_end_cycle,3,p,l); |
return 0; |
} |
/shark/trunk/kernel/modules/rr.c |
---|
20,11 → 20,11 |
/** |
------------ |
CVS : $Id: rr.c,v 1.5 2003-04-28 11:52:05 giacomo Exp $ |
CVS : $Id: rr.c,v 1.6 2003-12-10 16:55:00 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-04-28 11:52:05 $ |
Revision: $Revision: 1.6 $ |
Last update: $Date: 2003-12-10 16:55:00 $ |
------------ |
This file contains the scheduling module RR (Round Robin) |
60,8 → 60,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
//#define RRDEBUG |
#define rr_printf kern_printf |
245,7 → 246,7 |
proc_table[p].status = SLEEP; |
jet_update_endcycle(); /* Update the Jet data... */ |
trc_logevent(TRC_ENDCYCLE,&exec_shadow); /* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_end_cycle,3,p,l); /* tracer stuff */ |
#ifdef RRDEBUG |
rr_printf("(msg%d)",p); |
/shark/trunk/kernel/modules/sem.c |
---|
20,11 → 20,11 |
/** |
------------ |
CVS : $Id: sem.c,v 1.5 2003-11-06 09:42:23 giacomo Exp $ |
CVS : $Id: sem.c,v 1.6 2003-12-10 16:55:01 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-11-06 09:42:23 $ |
Revision: $Revision: 1.6 $ |
Last update: $Date: 2003-12-10 16:55:01 $ |
------------ |
This file contains the Hartik 3.3.1 Semaphore functions |
69,10 → 69,10 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <limits.h> |
#include <fcntl.h> |
#include <tracer.h> |
/* Semaphores descriptor tables */ |
static struct sem_des { |
360,7 → 360,7 |
LEVEL l; /* for readableness only */ |
/* tracer stuff */ |
trc_logevent(TRC_SEM_WAIT,s); |
TRACER_LOGEVENT(FTrace_EVT_set_mutex_wait,3,*s,exec_shadow); |
kern_epilogue_macro(); |
388,7 → 388,7 |
else { |
s1->count--; |
/* tracer stuff */ |
trc_logevent(TRC_SEM_WAIT,s); |
TRACER_LOGEVENT(FTrace_EVT_set_mutex_wait,3,*s,exec_shadow); |
kern_context_load(proc_table[exec_shadow].context); |
} |
412,9 → 412,6 |
s1 = &sem_table[*s]; |
/* tracer stuff */ |
//trc_logevent(TRC_SEM_WAITNB,s); |
if (s1->blocked.first != NIL || s1->count == 0) { |
errno = EAGAIN; |
kern_frestore(f); |
452,9 → 449,6 |
/* The non blocking wait is really simple! */ |
/* We do not suspend or schedule anything */ |
if (wait == NON_BLOCK) { |
/* tracer */ |
//trc_logevent(TRC_SEM_WAITNB,s); |
if (s1->blocked.first != NIL || s1->count < n) { |
errno = EAGAIN; |
kern_sti(); |
476,7 → 470,7 |
LEVEL l; /* for readableness only */ |
/* tracer */ |
trc_logevent(TRC_SEM_WAIT,s); |
TRACER_LOGEVENT(FTrace_EVT_set_mutex_wait,3,*s,exec_shadow); |
kern_epilogue_macro(); |
504,7 → 498,7 |
else { |
s1->count -= n; |
/* tracer */ |
trc_logevent(TRC_SEM_WAIT,s); |
TRACER_LOGEVENT(FTrace_EVT_set_mutex_wait,3,*s,exec_shadow); |
kern_context_load(proc_table[exec_shadow].context); |
} |
} |
551,7 → 545,7 |
} |
/* tracer */ |
trc_logevent(TRC_SEM_SIGNAL,s); |
TRACER_LOGEVENT(FTrace_EVT_set_mutex_lock,1,*s,exec_shadow); |
kern_frestore(f); |
} |
else { |
576,7 → 570,7 |
} |
/* tracer */ |
trc_logevent(TRC_SEM_SIGNAL,s); |
TRACER_LOGEVENT(FTrace_EVT_set_mutex_lock,3,*s,exec_shadow); |
kern_context_load(proc_table[exec_shadow].context); |
} |
626,7 → 620,7 |
} |
/* tracer */ |
trc_logevent(TRC_SEM_SIGNAL,s); |
TRACER_LOGEVENT(FTrace_EVT_set_mutex_lock,3,*s,exec_shadow); |
/* Preempt if necessary */ |
if (fl) event_need_reschedule(); |
656,7 → 650,7 |
} |
/* tracer */ |
trc_logevent(TRC_SEM_SIGNAL,s); |
TRACER_LOGEVENT(FTrace_EVT_set_mutex_lock,3,*s,exec_shadow); |
/* Preempt if necessary */ |
if (fl) scheduler(); |
/shark/trunk/kernel/modules/makefile |
---|
9,6 → 9,7 |
LIBRARY = mod |
OBJS_PATH = $(BASE)/kernel/modules |
INCL += -I$(BASE)/tracer/include |
# |
# Object files |
41,14 → 42,7 |
bd_edf.o \ |
bd_pscan.o |
TRC_OBJ = trace.o \ |
trcdummy.o \ |
trcfixed.o \ |
trccirc.o \ |
trcdfix.o \ |
trcudp.o |
OBJS = $(SCHED_OBJ) $(APER_OBJ) $(RES_OBJ) |
OBJS = $(SCHED_OBJ) $(APER_OBJ) $(RES_OBJ) $(TRC_OBJ) |
include $(BASE)/config/lib.mk |
/shark/trunk/kernel/kill.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: kill.c,v 1.6 2003-11-13 08:57:21 giacomo Exp $ |
CVS : $Id: kill.c,v 1.7 2003-12-10 16:54:59 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.6 $ |
Last update: $Date: 2003-11-13 08:57:21 $ |
Revision: $Revision: 1.7 $ |
Last update: $Date: 2003-12-10 16:54:59 $ |
------------ |
This file contains: |
66,8 → 66,9 |
#include <errno.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/*+ this structure contains the functions to be called to test if a |
task is blocked on a cancellation point +*/ |
static struct { |
168,7 → 169,7 |
kern_context_delete(proc_table[i].context); |
/* tracer stuff */ |
trc_logevent(TRC_DESTROY,&i); |
TRACER_LOGEVENT(FTrace_EVT_task_end,1,i,0); |
//kern_printf("[k%i]",i); |
/* Free the used stack area */ |
/shark/trunk/kernel/kern.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: kern.c,v 1.5 2003-05-01 19:40:53 pj Exp $ |
CVS : $Id: kern.c,v 1.6 2003-12-10 16:54:59 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-05-01 19:40:53 $ |
Revision: $Revision: 1.6 $ |
Last update: $Date: 2003-12-10 16:54:59 $ |
------------ |
This file contains: |
71,8 → 71,9 |
#include <errno.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/*----------------------------------------------------------------------*/ |
/* Kernel System variables */ |
/*----------------------------------------------------------------------*/ |
279,9 → 280,6 |
// kern_printf("]"); |
/* tracer stuff */ |
//trc_logevent(exec,TRC_SCHEDULE,NULL,0); |
/* we follow the shadow chain */ |
old_exec_shadow=exec_shadow; |
exec_shadow = exec = p; |
289,9 → 287,8 |
exec_shadow = proc_table[exec_shadow].shadow; |
/* tracer stuff */ |
//trc_logevent(exec_shadow,TRC_DISPATCH,NULL,0); |
if (old_exec_shadow!=exec_shadow) |
trc_logevent(TRC_SCHEDULE,&exec_shadow); |
TRACER_LOGEVENT(FTrace_EVT_task_schedule,1,exec_shadow,0); |
// kern_printf("[%i->%i]",old_exec_shadow,exec_shadow); |
/* we control the correctness of the shadows when we kill */ |
374,8 → 371,6 |
/* Kernel main system functions */ |
/*----------------------------------------------------------------------*/ |
extern int trc_systemevents(trc_event_t *evt, int event, void *ptr); |
/*+ |
This function initialize |
- the virtual machine (timer, interrupt, mem) |
485,13 → 480,6 |
sys_tick = __kernel_register_levels__(multiboot); |
/* tracer stuff */ |
/* |
trc_register_eventclass(TRC_CLASS_SYSTEM, |
TRC_SYSTEMNUMBER, |
trc_systemevents); |
*/ |
/* test on system tick */ |
if (sys_tick>=55000) { |
printk("The system tick must be less than 55 mSec!"); |
538,7 → 526,9 |
// sys_atexit((void(*)(void *))C8042_restore,NULL,AFTER_EXIT); |
/* tracer stuff */ |
#ifdef __OLD_TRACER__ |
trc_resume(); |
#endif |
/* exec and exec_shadow are already = -1 */ |
kern_gettime(&schedule_time); |
565,7 → 555,9 |
// ll_abort(666); |
/* tracer stuff */ |
#ifdef __OLD_TRACER__ |
trc_suspend(); |
#endif |
runlevel = RUNLEVEL_SHUTDOWN; |
/shark/trunk/kernel/grpcreat.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: grpcreat.c,v 1.4 2003-11-05 15:05:11 giacomo Exp $ |
CVS : $Id: grpcreat.c,v 1.5 2003-12-10 16:54:58 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.4 $ |
Last update: $Date: 2003-11-05 15:05:11 $ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2003-12-10 16:54:58 $ |
------------ |
This file contains: |
64,7 → 64,8 |
#include <errno.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
//#include <kernel/trace.h> |
#include <tracer.h> |
static DWORD unique_task_ID = 0; |
302,7 → 303,8 |
proc_table[i].context = c; |
/* Tracer stuff */ |
trc_logevent(TRC_CREATE,&i); |
TRACER_LOGEVENT(FTrace_EVT_task_create,3,i,(int)c); |
//kern_printf("[c%i %i]",i,proc_table[i].context); |
/* Count the task if it is an Application or System Task... */ |
/shark/trunk/kernel/tskmsg.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: tskmsg.c,v 1.2 2003-07-22 11:56:06 giacomo Exp $ |
CVS : $Id: tskmsg.c,v 1.3 2003-12-10 16:54:59 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.2 $ |
Last update: $Date: 2003-07-22 11:56:06 $ |
Revision: $Revision: 1.3 $ |
Last update: $Date: 2003-12-10 16:54:59 $ |
------------ |
**/ |
60,9 → 60,10 |
#include <errno.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/* |
The running task (pointed by exec_shadow) sent a message m to the |
scheduling module that handle the task p. |
/shark/trunk/kernel/signal.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: signal.c,v 1.7 2003-12-02 15:56:37 giacomo Exp $ |
CVS : $Id: signal.c,v 1.8 2003-12-10 16:54:59 giacomo Exp $ |
File: $File$ |
Revision: $Revision: 1.7 $ |
Last update: $Date: 2003-12-02 15:56:37 $ |
Revision: $Revision: 1.8 $ |
Last update: $Date: 2003-12-10 16:54:59 $ |
------------ |
This file contains: |
83,8 → 83,9 |
#include <kernel/descr.h> |
#include <kernel/var.h> |
#include <kernel/func.h> |
#include <kernel/trace.h> |
#include <tracer.h> |
/* look at nanoslp.c */ |
int nanosleep_interrupted_by_signal(PID i); |
1399,7 → 1400,7 |
PID p; |
/* tracer stuff */ |
trc_logevent(TRC_INTR,&no); |
TRACER_LOGEVENT(FTrace_EVT_interrupt_start,1,no,0); |
if (int_table[no].fast != NULL) { |
kern_sti(); |
1407,6 → 1408,8 |
kern_cli(); |
} |
TRACER_LOGEVENT(FTrace_EVT_interrupt_end,1,no,0); |
/* If a sporadic process is linked,activate it */ |
p = int_table[no].proc_index; |
task_activate(p); // no problem if p == nil |
/shark/trunk/kernel/makefile |
---|
9,6 → 9,7 |
LIBRARY = gkern |
OBJS_PATH = $(BASE)/kernel |
INCL += -I$(BASE)/tracer/include |
# Object files |
39,7 → 40,6 |
signal.o \ |
time.o \ |
tpreempt.o \ |
trace.o \ |
tskmsg.o |
include $(BASE)/config/lib.mk |