Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1208 → Rev 1209

/demos/trunk/loader/parser.h
31,10 → 31,18
#define PAR_TASK_HARD 22
#define PAR_TASK_SOFT 23
#define PAR_TASK_BACK 24
#define PAR_TASK_FSF 25
 
#define PAR_NO_CRIT 25
#define PAR_CRIT 26
#define PAR_NO_CRIT 26
#define PAR_CRIT 27
 
#define PAR_FSF_SERVER 28
 
#define PAR_LOCAL_SCHEDULER 29
#define PAR_POSIX 30
#define PAR_EDF 31
#define PAR_RM 32
 
struct loader_task {
int number;
int group;
58,6 → 66,8
struct timespec crit_par_2;
struct timespec crit_par_3;
struct timespec crit_par_4;
int server;
int local_scheduler;
struct loader_task *next;
};
 
/demos/trunk/loader/fsfinit.c
0,0 → 1,51
#include "kernel/kern.h"
#include "fsf_server.h"
#include "fsf_contract.h"
 
void fsfinit()
{
 
struct timespec period1 = {0,10000000}; //30%
struct timespec period2 = {0,30000000}; //20%
struct timespec period3 = {0,30000000}; //10%
struct timespec budget1 = {0,3000000};
struct timespec budget2 = {0,6000000};
struct timespec budget3 = {0,3000000};
 
fsf_server_id_t server1 = -1;
fsf_server_id_t server2 = -1;
fsf_server_id_t server3 = -1;
fsf_server_id_t server4 = -1;
 
fsf_contract_parameters_t contract;
 
int bw;
 
fsf_initialize_contract(&contract);
 
fsf_set_contract_basic_parameters(&contract,&budget1,&period1,NULL,NULL,FSF_DEFAULT_WORKLOAD);
fsf_negotiate_contract(&contract,&server1);
bw = MAX_BANDWIDTH / TIMESPEC2USEC(&period1) * TIMESPEC2USEC(&budget1);
cprintf("FSF SERVER LEVEL %d BW %d.%03d\n",server1, (int)( (long long)bw * 100 / MAX_BANDWIDTH),
(int)( (long long)bw * 100000 / MAX_BANDWIDTH % 1000));
fsf_set_contract_basic_parameters(&contract,&budget2,&period2,NULL,NULL,FSF_DEFAULT_WORKLOAD);
fsf_negotiate_contract(&contract,&server2);
bw = MAX_BANDWIDTH / TIMESPEC2USEC(&period2) * TIMESPEC2USEC(&budget2);
cprintf("FSF SERVER LEVEL %d BW %d.%03d\n",server2, (int)( (long long)bw * 100 / MAX_BANDWIDTH),
(int)( (long long)bw * 100000 / MAX_BANDWIDTH % 1000));
 
fsf_set_contract_basic_parameters(&contract,&budget3,&period3,NULL,NULL,FSF_DEFAULT_WORKLOAD);
fsf_negotiate_contract(&contract,&server3);
bw = MAX_BANDWIDTH / TIMESPEC2USEC(&period3) * TIMESPEC2USEC(&budget3);
cprintf("FSF SERVER LEVEL %d BW %d.%03d\n",server3, (int)( (long long)bw * 100 / MAX_BANDWIDTH),
(int)( (long long)bw * 100000 / MAX_BANDWIDTH % 1000));
fsf_set_contract_basic_parameters(&contract,&budget2,&period2,NULL,NULL,FSF_DEFAULT_WORKLOAD);
fsf_set_local_scheduler_parameter(&contract, FSF_SCHEDULER_EDF);
fsf_negotiate_contract(&contract,&server4);
bw = MAX_BANDWIDTH / TIMESPEC2USEC(&period2) * TIMESPEC2USEC(&budget2);
cprintf("FSF SERVER LEVEL %d BW %d.%03d\n",server4, (int)( (long long)bw * 100 / MAX_BANDWIDTH),
(int)( (long long)bw * 100000 / MAX_BANDWIDTH % 1000));
 
}
/demos/trunk/loader/initfile.c
6,7 → 6,7
* Paolo Gai <pj@gandalf.sssup.it>
*
* Authors :
* Giacomo Guidi <giacomo@gandalf.sssup.it>
* Giacomo Guidi <giacomo@gandalf.sssup.it>
* (see the web pages for full authors list)
*
* ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
38,46 → 38,52
#include "kernel/kern.h"
#include "modules/edf.h"
#include "modules/cbs.h"
#include "modules/rr.h"
#include "modules/posix.h"
#include "pthread.h"
#include "drivers/keyb.h"
#include "modules/sem.h"
#include "modules/dummy.h"
 
#include "modules/sem.h"
#include "modules/hartport.h"
#include "modules/cabs.h"
 
#include "drivers/keyb.h"
#include "fsf_contract.h"
#include "fsf_server.h"
 
#include "modules/pi.h"
#include "modules/pc.h"
 
#include "dosread.h"
 
/*+ sysyem tick in us +*/
#define TICK 0
 
/*+ RR tick in us +*/
#define RRTICK 10000
 
void *start_file = NULL;
void *end_file = NULL;
void *start_file;
void *end_file;
 
TIME __kernel_register_levels__(void *arg)
{
struct multiboot_info *mb = (struct multiboot_info *)arg;
int grubstar_level;
 
EDF_register_level(EDF_ENABLE_ALL);
CBS_register_level(CBS_ENABLE_ALL, 0);
RR_register_level(RRTICK, RR_MAIN_YES, mb);
POSIX_register_level(RRTICK, 1, mb, 32);
grubstar_level = GRUBSTAR_register_level(FSF_MAX_N_SERVERS, 0);
FSF_register_module(grubstar_level);
dummy_register_level();
CBS_register_level(CBS_ENABLE_ALL,0);
 
SEM_register_module();
 
CABS_register_module();
PI_register_module();
PC_register_module();
 
PTHREAD_register_module(1, 0, 1);
 
dos_preload("loadfile.txt",100000,&start_file,&end_file);
 
cprintf("Start file ptr = %08lx\n",(long)(start_file));
cprintf("End file ptr = %08lx\n",(long)(end_file));
cprintf("Size = %8ld\n",(long)(end_file - start_file));
return TICK;
 
return TICK;
}
 
TASK __init__(void *arg)
90,4 → 96,3
 
return (void *)0;
}
 
/demos/trunk/loader/loader.c
2,6 → 2,9
#include "parser.h"
#include "dosread.h"
 
#include "fsf_contract.h"
#include "fsf_server.h"
 
/* Memory pointers on loaded file */
extern void *start_file;
extern void *end_file;
17,10 → 20,6
 
struct timespec zero_time;
int cal_cycles = 0;
int cal_rit_start = 0;
int cal_rit_calc_const = 0;
int cal_rit_calc_mean = 0;
int cal_rit_calc_gauss = 0;
 
mutex_t mux_table[MAX_MUTEX];
 
34,11 → 33,9
int crit_start,crit_len;
long long crit_start_cycles = 0, crit_len_cycles = 0;
struct timespec next_time;
static int act= 0;
struct loader_task *l = (struct loader_task *)(arg);
act++;
char tmp[20];
act_1 = TIMESPEC2USEC(&l->act_par_2);
act_2 = TIMESPEC2USEC(&l->act_par_3);
act_3 = TIMESPEC2USEC(&l->act_par_4);
74,16 → 71,15
}
#ifdef TASK_OUTPUT
printf_xy(exec_shadow % 20 + 60, exec_shadow / 20, GREEN, "R");
printf_xy((exec_shadow % 5) * 9 + 34, exec_shadow / 5 + 5, GREEN, "R[000000]");
#endif
if (l->exec_type == PAR_EXEC_CONST)
exec_cycles = (long long)(exec_1 - cal_rit_start - cal_rit_calc_const)
* CALIBRATION_DELTA / cal_cycles;
exec_cycles = (long long)(exec_1) * CALIBRATION_DELTA / cal_cycles;
if (l->exec_type == PAR_EXEC_MEAN)
exec_cycles = (long long)(exec_1 - cal_rit_start - cal_rit_calc_mean
+ rand() % exec_2 - exec_2/2) * CALIBRATION_DELTA / cal_cycles;
exec_cycles = (long long)(exec_1 + rand() % exec_2 - exec_2/2)
* CALIBRATION_DELTA / cal_cycles;
if (l->exec_type == PAR_EXEC_GAUSS)
exec_cycles = 0;
108,19 → 104,20
else {
for (i=0;i<crit_start_cycles;i++) kern_gettime(NULL);
#ifdef TASK_OUTPUT
printf_xy(exec_shadow % 20 + 59, exec_shadow / 20, RED,"B");
sprintf(tmp,"B[%02d][%02d]",exec_shadow,l->resource);
printf_xy((exec_shadow % 5) * 9 + 34, exec_shadow / 5 + 5, RED,tmp);
#endif
mutex_lock(&mux_table[l->resource]);
for (i=0;i<crit_len_cycles;i++) kern_gettime(NULL);
mutex_unlock(&mux_table[l->resource]);
#ifdef TASK_OUTPUT
printf_xy(exec_shadow % 20 + 59, exec_shadow / 20, GREEN,"R");
printf_xy((exec_shadow % 5) * 9 + 34, exec_shadow / 5 + 5, GREEN,"R[000000]");
#endif
for (i=0;i<exec_cycles;i++) kern_gettime(NULL);
}
 
#ifdef TASK_OUTPUT
printf_xy(exec_shadow % 20 + 60, exec_shadow / 20, WHITE, "E");
printf_xy((exec_shadow % 5) * 9 + 34, exec_shadow / 5 + 5, BLUE, "E[000000]");
#endif
return NULL;
137,12 → 134,10
int crit_start,crit_len;
long long crit_start_cycles = 0, crit_len_cycles = 0;
struct timespec next_time;
static int act=0;
int extra_rit, k;
int act = 0;
struct loader_task *l = (struct loader_task *)(arg);
act++;
char tmp[20];
act_1 = TIMESPEC2USEC(&l->act_par_2);
act_2 = TIMESPEC2USEC(&l->act_par_3);
act_3 = TIMESPEC2USEC(&l->act_par_4);
151,8 → 146,6
exec_2 = TIMESPEC2USEC(&l->exec_par_2);
exec_3 = TIMESPEC2USEC(&l->exec_par_3);
 
extra_rit = cal_rit_start;
 
if (l->crit_type == PAR_CRIT) {
crit_1 = TIMESPEC2USEC(&l->crit_par_1);
crit_2 = TIMESPEC2USEC(&l->crit_par_2);
160,16 → 153,15
crit_4 = TIMESPEC2USEC(&l->crit_par_4);
}
 
k = 0;
while(1) {
 
task_testcancel();
 
act++;
 
#ifdef TASK_OUTPUT
k++;
if (k > 15) k = 1;
printf_xy(exec_shadow % 20 + 59, exec_shadow / 20, k,"X");
sprintf(tmp,"X[%06d]",act);
printf_xy((exec_shadow % 5) * 9 + 34, exec_shadow / 5 + 5, GREEN, tmp);
#endif
 
if (l->act_type == PAR_ACT_MEAN) {
186,12 → 178,11
}
 
if (l->exec_type == PAR_EXEC_CONST)
exec_cycles = (long long)(exec_1 - extra_rit - cal_rit_calc_const)
* CALIBRATION_DELTA / cal_cycles;
exec_cycles = (long long)(exec_1) * CALIBRATION_DELTA / cal_cycles;
if (l->exec_type == PAR_EXEC_MEAN)
exec_cycles = (long long)(exec_1 - extra_rit - cal_rit_calc_mean
+ rand() % exec_2 - exec_2/2) * CALIBRATION_DELTA / cal_cycles;
exec_cycles = (long long)(exec_1 + rand() % exec_2 - exec_2/2)
* CALIBRATION_DELTA / cal_cycles;
if (l->exec_type == PAR_EXEC_GAUSS)
exec_cycles = 0;
211,20 → 202,20
}
}
extra_rit = 0;
 
if (l->crit_type == PAR_NO_CRIT)
for (i=0;i<exec_cycles;i++) kern_gettime(NULL);
else {
for (i=0;i<crit_start_cycles;i++) kern_gettime(NULL);
#ifdef TASK_OUTPUT
printf_xy(exec_shadow % 20 + 59, exec_shadow / 20, k,"B");
sprintf(tmp,"B[%02d][%02d]",exec_shadow,l->resource);
printf_xy((exec_shadow % 5) * 9 + 34, exec_shadow / 5 + 5, RED, tmp);
#endif
mutex_lock(&mux_table[l->resource]);
for (i=0;i<crit_len_cycles;i++) kern_gettime(NULL);
mutex_unlock(&mux_table[l->resource]);
#ifdef TASK_OUTPUT
printf_xy(exec_shadow % 20 + 59, exec_shadow / 20, k,"X");
sprintf(tmp,"X[%06d]",act);
printf_xy((exec_shadow % 5) * 9 + 34, exec_shadow / 5 + 5, GREEN, tmp);
#endif
for (i=0;i<exec_cycles;i++) kern_gettime(NULL);
}
247,12 → 238,10
int crit_start,crit_len;
long long crit_start_cycles = 0, crit_len_cycles = 0;
struct timespec next_time;
static int act=0;
int extra_rit, k;
int act = 0;
struct loader_task *l = (struct loader_task *)(arg);
char tmp[20];
act++;
act_1 = TIMESPEC2USEC(&l->act_par_2);
act_2 = TIMESPEC2USEC(&l->act_par_3);
act_3 = TIMESPEC2USEC(&l->act_par_4);
261,8 → 250,6
exec_2 = TIMESPEC2USEC(&l->exec_par_2);
exec_3 = TIMESPEC2USEC(&l->exec_par_3);
 
extra_rit = cal_rit_start;
 
if (l->crit_type == PAR_CRIT) {
crit_1 = TIMESPEC2USEC(&l->crit_par_1);
crit_2 = TIMESPEC2USEC(&l->crit_par_2);
270,16 → 257,15
crit_4 = TIMESPEC2USEC(&l->crit_par_4);
}
 
k = 0;
while(1) {
 
task_testcancel();
 
act++;
 
#ifdef TASK_OUTPUT
k++;
if (k > 15) k = 1;
printf_xy(exec_shadow % 20 + 59, exec_shadow / 20, k,"X");
sprintf(tmp,"X[%06d]",act);
printf_xy((exec_shadow % 5) * 9 + 34, exec_shadow / 5 + 5, GREEN, tmp);
#endif
 
if (l->act_type == PAR_ACT_MEAN) {
296,12 → 282,11
}
 
if (l->exec_type == PAR_EXEC_CONST)
exec_cycles = (long long)(exec_1 - extra_rit - cal_rit_calc_const)
* CALIBRATION_DELTA / cal_cycles;
exec_cycles = (long long)(exec_1) * CALIBRATION_DELTA / cal_cycles;
if (l->exec_type == PAR_EXEC_MEAN)
exec_cycles = (long long)(exec_1 - extra_rit - cal_rit_calc_mean
+ rand() % exec_2 - exec_2/2) * CALIBRATION_DELTA / cal_cycles;
exec_cycles = (long long)(exec_1 + rand() % exec_2 - exec_2/2)
* CALIBRATION_DELTA / cal_cycles;
if (l->exec_type == PAR_EXEC_GAUSS)
exec_cycles = 0;
321,20 → 306,20
}
}
extra_rit = 0;
 
if (l->crit_type == PAR_NO_CRIT)
for (i=0;i<exec_cycles;i++) kern_gettime(NULL);
else {
for (i=0;i<crit_start_cycles;i++) kern_gettime(NULL);
#ifdef TASK_OUTPUT
printf_xy(exec_shadow % 20 + 59, exec_shadow / 20, k,"B");
sprintf(tmp,"B[%02d][%02d]",exec_shadow,l->resource);
printf_xy((exec_shadow % 5) * 9 + 34, exec_shadow / 5 + 5, RED, tmp);
#endif
mutex_lock(&mux_table[l->resource]);
for (i=0;i<crit_len_cycles;i++) kern_gettime(NULL);
mutex_unlock(&mux_table[l->resource]);
#ifdef TASK_OUTPUT
printf_xy(exec_shadow % 20 + 59, exec_shadow / 20, k,"X");
sprintf(tmp,"X[%06d]",act);
printf_xy((exec_shadow % 5) * 9 + 34, exec_shadow / 5 + 5, GREEN, tmp);
#endif
for (i=0;i<exec_cycles;i++) kern_gettime(NULL);
}
350,9 → 335,6
{
long long i;
struct timespec start,end,diff;
int temp = 1234567;
int temp_1 = 1234567;
int temp_2 = 1234567;
 
kern_cli();
kern_gettime(&start);
365,36 → 347,6
 
cprintf("Calibration usec/[%d cycles] = %d\n",CALIBRATION_DELTA,cal_cycles);
 
kern_cli();
kern_gettime(&start);
temp = (long long)(temp_1) * CALIBRATION_DELTA / cal_cycles;
kern_gettime(&end);
kern_sti();
SUBTIMESPEC(&end,&start,&diff);
cal_rit_calc_const = TIMESPEC2USEC(&diff);
 
kern_cli();
kern_gettime(&start);
temp = (long long)(temp_1 + rand() % temp_2 - temp_2/2) * CALIBRATION_DELTA / cal_cycles;
kern_gettime(&end);
kern_sti();
SUBTIMESPEC(&end,&start,&diff);
cal_rit_calc_mean = TIMESPEC2USEC(&diff);
 
kern_cli();
kern_gettime(&start);
temp = TIMESPEC2USEC(&start);
kern_gettime(&end);
kern_sti();
SUBTIMESPEC(&end,&start,&diff);
cal_rit_start = TIMESPEC2USEC(&diff) * 6 + cal_rit_calc_const;
cprintf("Calibration delay start = %d const = %d mean = %d gauss = %d\n",
cal_rit_start,cal_rit_calc_const,cal_rit_calc_mean,cal_rit_calc_gauss);
 
return 0;
 
}
555,6 → 507,54
}
 
if (current->task_type == PAR_TASK_FSF) {
 
if (current->local_scheduler == PAR_POSIX) {
pthread_t j;
int err;
err = fsf_create_thread(current->server,&j,NULL,back_task,(void *)current,NULL);
if (err) {
cprintf("Error fsf task creating\n");
sys_end();
}
}
 
if (current->local_scheduler == PAR_EDF) {
HARD_TASK_MODEL ht;
pthread_t j;
int err;
 
hard_task_default_model(ht);
hard_task_def_mit(ht,TIMESPEC2USEC(&current->deadline));
hard_task_def_wcet(ht,TIMESPEC2USEC(&current->wcet));
err = fsf_create_thread(current->server,&j,NULL,test_task,(void *)current,&ht);
if (err) {
cprintf("Error fsf task creating\n");
sys_end();
}
 
}
 
if (current->local_scheduler == PAR_RM) {
HARD_TASK_MODEL ht;
pthread_t j;
int err;
hard_task_default_model(ht);
hard_task_def_mit(ht,TIMESPEC2USEC(&current->deadline));
hard_task_def_wcet(ht,TIMESPEC2USEC(&current->wcet));
err = fsf_create_thread(current->server,&j,NULL,test_task,(void *)current,&ht);
if (err) {
cprintf("Error fsf task creating\n");
sys_end();
}
}
 
total_task++;
 
}
 
}
 
cprintf("Task group %d created. Worst case BW = %d.%d \n",
577,11 → 577,15
struct timespec start_time;
 
while (current != NULL) {
ADDTIMESPEC(&zero_time,&current->act_par_1,&start_time);
 
kern_event_post(&start_time, (void *)((void *)group_activate), (void *)(current->group));
if (current->task_type != PAR_TASK_FSF) {
ADDTIMESPEC(&zero_time,&current->act_par_1,&start_time);
 
kern_event_post(&start_time, (void *)((void *)group_activate), (void *)(current->group));
 
}
 
current = current->next;
 
}
588,6 → 592,8
 
}
 
void fsfinit(void);
 
int main()
{
 
601,6 → 607,8
 
calibrate_cycle();
 
fsfinit();
 
loader_mutex_create(start_loader_task);
loader_task_create(start_loader_task);
/demos/trunk/loader/loadfile.txt
30,12 → 30,26
#
 
TOTAL_EXEC_TIME:[20][0];
HARD:[0]:[10]:ACT_MEAN([3][0],[1][0],[0][100000]):[0][900000]:[0][10000]
:EXEC_MEAN([0][5000],[0][1000]):NO_CRIT;
HARD:[0]:[10]:ACT_PERIODIC([1][0],[0][300000]):[0][100000]:[0][5000]
:EXEC_CONST([0][1000]):NO_CRIT;
SOFT:[1]:[10]:ACT_PERIODIC([2][0],[0][200000]):[0][200000]:[0][5000]
:EXEC_CONST([0][4000]):CRIT([0],[0][0],[0][1000],[0][2000],[0][1]);
BACK:[2]:[1]:ACT_SINGLE([3][0]):[0][0]:[0][0]
:EXEC_CONST([0][1000]):NO_CRIT;
 
BACK:[1]:[1]:ACT_SINGLE([4][0]):[0][0]:[0][0]
:EXEC_CONST([0][5000]):NO_CRIT;
 
HARD:[0]:[10]:ACT_PERIODIC([5][0],[0][10000]):[0][10000]:[0][100]
:EXEC_CONST([0][50]):CRIT([0],[0][5],[0][10],[0][20],[0][1]);
 
FSF:[S0]:POSIX:[1]:ACT_SINGLE([0][0]):[0][0]:[0][0]
:EXEC_CONST([0][5000]):CRIT([1],[0][500],[0][1000],[0][2000],[0][1]);
 
FSF:[S1]:POSIX:[1]:ACT_SINGLE([0][0]):[0][0]:[0][0]
:EXEC_CONST([0][5000]):CRIT([1],[0][500],[0][1000],[0][2000],[0][1]);
 
FSF:[S2]:POSIX:[20]:ACT_SINGLE([0][0]):[0][0]:[0][0]
:EXEC_CONST([0][16000]):CRIT([2],[0][500],[0][1000],[0][5000],[0][10000]);
 
FSF:[S3]:EDF:[5]:ACT_PERIODIC([0][0],[0][200000]):[0][200000]:[0][20000]
:EXEC_CONST([0][15000]):CRIT([2],[0][5000],[0][10000],[0][5000],[0][1]);
 
FSF:[S3]:EDF:[5]:ACT_PERIODIC([0][0],[0][111111]):[0][111111]:[0][11111]
:EXEC_MEAN([0][10000],[0][5000]):NO_CRIT;
 
END
/demos/trunk/loader/makefile
12,5 → 12,5
include $(BASE)/config/example.mk
 
loader:
make -f $(SUBMAKE) APP=loader INIT= OTHEROBJS="initfile.o parser.o dosread.o" OTHERINCL= SHARKOPT="__OLDCHAR__"
make -f $(SUBMAKE) APP=loader INIT= OTHEROBJS="fsfinit.o initfile.o parser.o dosread.o" OTHERINCL= SHARKOPT="__OLDCHAR__ __FIRST__"
 
/demos/trunk/loader/parser.c
93,6 → 93,11
*buf += 5;
return PAR_FOUND;
}
if (!strncmp(*buf, "FSF:",4)) {
*val = PAR_TASK_FSF;
*buf += 4;
return PAR_FOUND;
}
break;
 
case PAR_TASK_NUMBER:
110,6 → 115,24
*buf += i;
return PAR_FOUND;
break;
 
case PAR_LOCAL_SCHEDULER:
if (!strncmp(*buf,"POSIX",5)) {
*buf += 5;
*val = PAR_POSIX;
return PAR_FOUND;
}
if (!strncmp(*buf,"EDF",3)) {
*buf += 3;
*val = PAR_EDF;
return PAR_FOUND;
}
if (!strncmp(*buf,"RM",2)) {
*buf += 2;
*val = PAR_RM;
return PAR_FOUND;
}
break;
case PAR_ACT_TYPE:
if (!strncmp(*buf,"ACT_SINGLE(",11)) {
178,6 → 201,23
return PAR_ERROR;
break;
 
case PAR_FSF_SERVER:
if (!strncmp(*buf,"[S",2)) {
*buf += 2;
i = 0;
while (((char *)(*buf))[i] >= '0' && ((char *)(*buf))[i] <= '9') {
str[i] = ((char *)(*buf))[i];
i++;
}
if (((char *)(*buf))[i] != ']') return PAR_ERROR;
str[i] = 0;
*val = atoi(str);
i += 2;
*buf += i;
return PAR_FOUND;
} else return PAR_ERROR;
break;
 
}
 
return PAR_ERROR;
237,16 → 277,37
 
} else par_error(line_num);
 
res = find_break(pbuf,PAR_TASK_NUMBER, &time, &val);
if (res == PAR_FOUND) {
#ifdef PARSER_DEBUG
cprintf("TASK LEVEL = %d\n",val);
#endif
if (ld->task_type == PAR_TASK_FSF) {
res = find_break(pbuf,PAR_FSF_SERVER, &time, &val);
if (res == PAR_FOUND) {
#ifdef PARSER_DEBUG
cprintf("TASK SERVER = %d\n",val);
#endif
ld->server = val;
} else par_error(line_num);
 
ld->task_level = val;
res = find_break(pbuf,PAR_LOCAL_SCHEDULER, &time, &val);
if (res == PAR_FOUND) {
#ifdef PARSER_DEBUG
cprintf("TASK LOCAL SCHEDULER = %d\n",val);
#endif
ld->local_scheduler = val;
} else par_error(line_num);
} else {
res = find_break(pbuf,PAR_TASK_NUMBER, &time, &val);
if (res == PAR_FOUND) {
#ifdef PARSER_DEBUG
cprintf("TASK LEVEL = %d\n",val);
#endif
 
} else par_error(line_num);
ld->task_level = val;
 
} else par_error(line_num);
}
 
res = find_break(pbuf,PAR_TASK_NUMBER, &time, &val);
if (res == PAR_FOUND) {
#ifdef PARSER_DEBUG