Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1010 → Rev 1011

/shark/trunk/ports/first/modules/pistar.c
20,11 → 20,11
 
/**
------------
CVS : $Id: pistar.c,v 1.9 2004-10-25 14:39:31 trimarchi Exp $
CVS : $Id: pistar.c,v 1.10 2005-05-12 07:50:10 trimarchi Exp $
 
File: $File$
Revision: $Revision: 1.9 $
Last update: $Date: 2004-10-25 14:39:31 $
Revision: $Revision: 1.10 $
Last update: $Date: 2005-05-12 07:50:10 $
------------
 
Priority Inhertitance protocol. see pi.h for more details...
75,6 → 75,7
int nlocked[MAX_PROC]; /*+ how many mutex a task currently locks +*/
 
PID blocked[MAX_PROC]; /*+ blocked queue ... +*/
 
} PISTAR_mutex_resource_des;
 
 
84,6 → 85,7
PID owner;
int nblocked;
PID firstblocked;
//TIME wcet;
} PISTAR_mutex_t;
 
 
197,6 → 199,7
kern_frestore(f);
return (EDEADLK);
}
 
do {
while (p->owner != NIL) {
/* the mutex is locked by someone, "block" the task ...*/
248,9 → 251,9
PISTAR_mutex_t *p;
SYS_FLAGS f;
// return 0;
int cond;
cond = 1;
fsf_server_id_t server;
//int cond;
//cond = 1;
//fsf_server_id_t server;
 
f = kern_fsave();
 
291,8 → 294,8
/* if we are here, we have budget for critical section */
/* Set the task no preemptive for the localscheduler */
//kern_printf("(PISTAR NP %d", exec_shadow);
fsf_get_server(exec_shadow, &server);
fsf_settask_nopreemptive(&server, exec_shadow);
//fsf_get_server(exec_shadow, &server);
//fsf_settask_nopreemptive(&server, exec_shadow);
/* the mutex is free, We can lock it! */
lev->nlocked[exec_shadow]++;
383,8 → 386,8
}*/
 
/* Set the task preemptive for the localscheduler */
fsf_get_server(exec_shadow, &server);
fsf_settask_preemptive(&server, exec_shadow);
//fsf_get_server(exec_shadow, &server);
//fsf_settask_preemptive(&server, exec_shadow);
 
scheduler();
TRACER_LOGEVENT(FTrace_EVT_inheritance,(unsigned short int)proc_table[exec_shadow].context,(unsigned int)proc_table[exec].context);