Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 317 → Rev 318

/shark/trunk/kernel/mutex.c
18,11 → 18,11
 
/**
------------
CVS : $Id: mutex.c,v 1.3 2003-09-12 10:10:41 giacomo Exp $
CVS : $Id: mutex.c,v 1.4 2003-11-05 15:05:12 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.3 $
Last update: $Date: 2003-09-12 10:10:41 $
Revision: $Revision: 1.4 $
Last update: $Date: 2003-11-05 15:05:12 $
------------
 
This file contains the mutex and condition variables handling functions.
89,9 → 89,10
int mutex_init(mutex_t *mutex, const mutexattr_t *attr)
{
RLEVEL l;
SYS_FLAGS f;
int result;
 
kern_cli();
f = kern_fsave();
mutex->mutexlevel = -1;
mutex->use = 0;
 
102,12 → 103,12
 
/* can the mutex level manage the mutexattr_t ? */
if ((result = m->init(l, mutex, attr)) >=0) {
kern_sti();
kern_frestore(f);
return result;
}
}
}
kern_sti();
kern_frestore(f);
 
return EINVAL;
}