Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 318 → Rev 317

/shark/trunk/kernel/int_sem.c
18,11 → 18,11
 
/**
------------
CVS : $Id: int_sem.c,v 1.4 2003-11-05 15:05:11 giacomo Exp $
CVS : $Id: int_sem.c,v 1.3 2003-01-07 17:07:49 pj Exp $
 
File: $File$
Revision: $Revision: 1.4 $
Last update: $Date: 2003-11-05 15:05:11 $
Revision: $Revision: 1.3 $
Last update: $Date: 2003-01-07 17:07:49 $
------------
 
Internal semaphores.
75,10 → 75,12
{
SYS_FLAGS f;
 
//kern_cli();
f = kern_fsave();
 
if (s->count) {
s->count--;
//kern_sti();
kern_frestore(f);
return;
}
112,14 → 114,18
{
SYS_FLAGS f;
 
//kern_cli();
f = kern_fsave();
 
if (s->count) {
s->count--;
//kern_sti();
kern_frestore(f);
return 0;
}
 
//kern_sti();
kern_frestore(f);
return -1;
}
 
149,6 → 155,7
register int returnvalue;
SYS_FLAGS f;
 
//kern_cli();
f = kern_fsave();
if (s->blocked.first == -1)
returnvalue = s->count;
155,6 → 162,7
else
returnvalue = -1;
 
//kern_sti();
kern_frestore(f);
return returnvalue;
}