18,11 → 18,11 |
|
/** |
------------ |
CVS : $Id: activate.c,v 1.7 2004-03-10 14:51:42 giacomo Exp $ |
CVS : $Id: activate.c,v 1.8 2004-05-17 15:03:51 anton Exp $ |
|
File: $File$ |
Revision: $Revision: 1.7 $ |
Last update: $Date: 2004-03-10 14:51:42 $ |
Revision: $Revision: 1.8 $ |
Last update: $Date: 2004-05-17 15:03:51 $ |
------------ |
|
task_activate & group_activate |
70,6 → 70,7 |
int task_activate(PID p) |
{ |
LEVEL l; /* the level of the task p */ |
struct timespec t; |
|
/* some controls on the task p */ |
if (p<0 || p>=MAX_PROC) { |
81,6 → 82,8 |
return -1; |
} |
|
kern_gettime(&t); |
|
/*+ if we are calling the runlevel functions the system is |
into the global_context... we only have to call |
the task_activate of the level +*/ |
91,7 → 94,7 |
proc_table[p].frozen_activations++; |
else { |
l = proc_table[p].task_level; |
level_table[l]->public_activate(l,p); |
level_table[l]->public_activate(l,p,&t); |
} |
kern_frestore(f); |
return 0; |
106,7 → 109,7 |
proc_table[p].frozen_activations++; |
else { |
l = proc_table[p].task_level; |
level_table[l]->public_activate(l,p); |
level_table[l]->public_activate(l,p,&t); |
event_need_reschedule(); |
} |
kern_frestore(f); |
120,7 → 123,7 |
/* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_activate,(unsigned short int)proc_table[p].context,0); |
l = proc_table[p].task_level; |
level_table[l]->public_activate(l,p); |
level_table[l]->public_activate(l,p,&t); |
|
/* Preempt if necessary */ |
scheduler(); |
140,6 → 143,7 |
{ |
PID i; /* a counter */ |
register LEVEL l; /* a level value */ |
struct timespec t; |
|
if (g == 0) { |
errno = EINVALID_GROUP; |
146,6 → 150,8 |
return -1; |
} |
|
kern_gettime(&t); |
|
/*+ if we are calling the runlevel functions the system is |
into the global_context... we only have to call |
the task_activate of the level +*/ |
162,7 → 168,7 |
/* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_activate,(unsigned short int)proc_table[i].context,0); |
l = proc_table[i].task_level; |
level_table[l]->public_activate(l,i); |
level_table[l]->public_activate(l,i,&t); |
} |
|
kern_frestore(f); |
181,7 → 187,7 |
/* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_activate,(unsigned short int)proc_table[i].context,0); |
l = proc_table[i].task_level; |
level_table[l]->public_activate(l,i); |
level_table[l]->public_activate(l,i,&t); |
event_need_reschedule(); |
} |
kern_frestore(f); |
196,7 → 202,7 |
continue; |
} |
l = proc_table[i].task_level; |
level_table[l]->public_activate(l,i); |
level_table[l]->public_activate(l,i,&t); |
/* tracer stuff */ |
TRACER_LOGEVENT(FTrace_EVT_task_activate,(unsigned short int)proc_table[i].context,0); |
} |