Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 28 → Rev 29

/shark/trunk/kernel/modules/nop.c
20,11 → 20,11
 
/**
------------
CVS : $Id: nop.c,v 1.1.1.1 2002-03-29 14:12:52 pj Exp $
CVS : $Id: nop.c,v 1.2 2002-11-11 08:32:06 pj Exp $
 
File: $File$
Revision: $Revision: 1.1.1.1 $
Last update: $Date: 2002-03-29 14:12:52 $
Revision: $Revision: 1.2 $
Last update: $Date: 2002-11-11 08:32:06 $
------------
 
Binary Semaphores. see nop.h for more details...
73,7 → 73,7
mutex_t structure */
typedef struct {
PID owner;
QQUEUE blocked;
IQUEUE blocked;
} NOP_mutex_t;
 
 
124,7 → 124,7
return (ENOMEM);
 
p->owner = NIL;
qq_init(&p->blocked);
iq_init(&p->blocked, &freedesc, 0);
 
m->mutexlevel = l;
m->opt = (void *)p;
192,7 → 192,7
 
/* we insert the task in the semaphore queue */
proc_table[exec_shadow].status = NOP_WAIT;
qq_insertlast(exec_shadow,&p->blocked);
iq_insertlast(exec_shadow,&p->blocked);
 
/* and finally we reschedule */
exec = exec_shadow = -1;
253,7 → 253,7
proc_table[exec_shadow].context = kern_context_save();
 
/* the mutex is mine, pop the firsttask to extract */
p->owner = qq_getfirst(&p->blocked);
p->owner = iq_getfirst(&p->blocked);
if (p->owner != NIL) {
l = proc_table[p->owner].task_level;
level_table[l]->task_insert(l,p->owner);