Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 228 → Rev 219

/shark/trunk/kernel/modules/pc.c
20,11 → 20,11
 
/**
------------
CVS : $Id: pc.c,v 1.3 2003-09-12 10:10:41 giacomo Exp $
CVS : $Id: pc.c,v 1.2 2003-01-07 17:07:50 pj Exp $
 
File: $File$
Revision: $Revision: 1.3 $
Last update: $Date: 2003-09-12 10:10:41 $
Revision: $Revision: 1.2 $
Last update: $Date: 2003-01-07 17:07:50 $
------------
 
Priority Ceiling protocol. see pc.h for more details...
259,11 → 259,9
kern_cli();
 
p = (PC_mutex_t *)m->opt;
if (!p) {
if (!p)
/* if the mutex is not initialized, return an error! */
kern_sti();
return (EINVAL);
}
 
if (p->owner == exec_shadow) {
/* the task already owns the mutex */
271,11 → 269,9
return (EDEADLK);
}
 
if (p->ceiling > lev->priority[exec_shadow]) {
if (p->ceiling > lev->priority[exec_shadow])
/* see POSIX standard p. 258 */
kern_sti();
return (EINVAL);
}
 
while (!PC_accept(lev, lev->priority[exec_shadow])) {
/* the mutex is locked by someone,
319,11 → 315,9
kern_cli();
 
p = (PC_mutex_t *)m->opt;
if (!p) {
if (!p)
/* if the mutex is not initialized, return an error! */
kern_sti();
return (EINVAL);
}
 
if (p->owner == exec_shadow) {
/* the task already owns the mutex */
331,11 → 325,9
return (EDEADLK);
}
 
if (p->ceiling < lev->priority[exec_shadow]) {
if (p->ceiling < lev->priority[exec_shadow])
/* see POSIX standard p. 258 */
kern_sti();
return (EINVAL);
}
 
while (!PC_accept(lev, lev->priority[exec_shadow])) {
/* a task already owns the mutex */