Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1537 → Rev 1538

/demos/trunk/loader/shark/shark.c
12,7 → 12,7
extern int total_loader_task;
extern int total_loader_contract;
 
mutex_object mutex_table[MAX_MUTEX];
mutex_t mutex_table[MAX_MUTEX];
int main_chunk;
 
/* Runtime Calibration */
166,18 → 166,17
 
}
 
extern unsigned int clk_per_msec;
 
/* Set the zero_time and post the first activation event */
void start_simulation() {
int i, object;
int i;
struct loader_task *l = loader_task_list;
struct timespec end_time;
int res;
PI_mutexattr_t a;
 
PI_mutexattr_default(a);
 
i = 0;
object = 0;
 
#ifdef __NEW_TRACER__
 
189,26 → 188,14
 
#endif
 
TRACER_LOGEVENT(FTrace_EVT_trace_start,proc_table[exec_shadow].context,clk_per_msec);
for (i=0;i<10;i++)
if (proc_table[i].context != 0) TRACER_LOGEVENT(FTrace_EVT_id,
(unsigned short int)proc_table[i].context,i);
TRACER_LOGEVENT(FTrace_EVT_trace_start,0,0);
 
kern_gettime(&zero_time);
i = 0;
while (i < total_loader_task) {
if (l->muxstatus == 1) {
res = fsf_init_shared_object(&(mutex_table[l->resource]).object,l->resource);
if (res != -1) {
mutex_table[l->resource].operation.op_id=1;
mutex_table[l->resource].operation.wcet.tv_sec=l->block[0].tv_sec;
mutex_table[l->resource].operation.wcet.tv_nsec=l->block[0].tv_nsec;
fsf_declare_shared_object_operation(&mutex_table[l->resource].object,
&mutex_table[l->resource].operation);
}
mutex_init(&mutex_table[l->resource],&a);
l->muxstatus = 2;
}