18,11 → 18,11 |
|
/** |
------------ |
CVS : $Id: grpcreat.c,v 1.2 2002-11-11 08:34:08 pj Exp $ |
CVS : $Id: grpcreat.c,v 1.3 2003-01-07 17:07:49 pj Exp $ |
|
File: $File$ |
Revision: $Revision: 1.2 $ |
Last update: $Date: 2002-11-11 08:34:08 $ |
Revision: $Revision: 1.3 $ |
Last update: $Date: 2003-01-07 17:07:49 $ |
------------ |
|
This file contains: |
168,7 → 168,6 |
- master_level (initialized later, modified by l[]->task_create() ) |
- task_level (initialized later in this function) |
- context, stack (initialized at the end of this function) |
- request_time (initialized when a request (activation) is issued) |
- additional stuff like priority & co. have to be init. only if used...) |
- delay_timer (initialized in __kernel_init__ and mantained coherent |
by the scheduling modules...) |
176,10 → 175,11 |
*/ |
|
/* search for a level that can manage the task model */ |
for (l=0; l<sched_levels; l++) |
if (level_table[l]->level_accept_task_model(l,m) >= 0) |
for (l=level_first; l != -1; l=level_next[l]) |
if (level_table[l]->public_create(l,i,m) >= 0) |
break; |
if (l == sched_levels) { |
|
if (l == -1) { |
/* no level can accept the task_model, exit!!! */ |
proc_table[i].status = FREE; |
iq_insertfirst(i,&freedesc); |
190,15 → 190,6 |
/* initialize task level */ |
proc_table[i].task_level = l; |
|
/* calls the task-oriented function task_create */ |
if (level_table[l]->task_create(l,i,m) < 0) { |
/* an error occurred in the task_create */ |
proc_table[i].status = FREE; |
iq_insertfirst(i,&freedesc); |
errno = ETASK_CREATE; |
return -1; |
} |
|
/* register all the resource models passed */ |
for (;;) { |
r = va_arg(rlist,RES_MODEL *); |
207,10 → 198,8 |
|
/* search for a level that can manage the resource model */ |
for (l_res=0; l_res<res_levels; l_res++) |
if (resource_table[l_res]->level_accept_resource_model(l_res,r) >= 0) { |
resource_table[l_res]->res_register(l_res, i, r); |
if (resource_table[l_res]->res_register(l_res, i, r) >= 0) |
break; |
} |
if (l_res == res_levels) { |
/* no level can accept the resource_model, exit!!! */ |
/* detach the resources and the task */ |
340,7 → 329,7 |
resource_table[lr]->res_detach(lr,i); |
|
l = proc_table[i].task_level; |
level_table[l]->task_detach(l,i); |
level_table[l]->public_detach(l,i); |
|
proc_table[i].status = FREE; |
|
379,7 → 368,7 |
va_end(rlist); |
|
if (p != NIL) { |
if (level_table[proc_table[p].task_level]->level_guarantee) |
if (level_table[proc_table[p].task_level]->public_guarantee) |
if (guarantee() < 0) { |
group_create_reject(p); |
errno = ENO_GUARANTEE; |