20,11 → 20,11 |
|
/** |
------------ |
CVS : $Id: nopm.c,v 1.1.1.1 2002-03-29 14:12:52 pj Exp $ |
CVS : $Id: nopm.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 $ |
------------ |
|
See modules/nopm.h. |
73,7 → 73,7 |
mutex_t structure */ |
typedef struct { |
PID owner; |
QQUEUE blocked; |
IQUEUE blocked; |
int counter; |
} NOPM_mutex_t; |
|
108,12 → 108,12 |
kern_printf("----------------------\n"); |
for(i=0;i<index;i++) { |
ptr=table[i]->opt; |
if (ptr->blocked.first!=NIL) { |
if (!iq_isempty(&ptr->blocked)) { |
kern_printf("%i blocks on 0x%p: ",ptr->owner,table[i]); |
j=ptr->blocked.first; |
j=iq_query_first(&ptr->blocked); |
while (j!=NIL) { |
kern_printf("%i ",(int)j); |
j=proc_table[j].next; |
j=iq_query_next(j, &ptr->blocked); |
} |
kern_printf("\n"); |
} else { |
181,7 → 181,7 |
return (ENOMEM); |
|
p->owner = NIL; |
qq_init(&p->blocked); |
iq_init(&p->blocked, &freedesc, 0); |
p->counter=0; |
|
m->mutexlevel = l; |
254,7 → 254,7 |
|
/* we insert the task in the semaphore queue */ |
proc_table[exec_shadow].status = NOPM_WAIT; |
qq_insertlast(exec_shadow,&p->blocked); |
iq_insertlast(exec_shadow,&p->blocked); |
|
/* and finally we reschedule */ |
exec = exec_shadow = -1; |
327,7 → 327,7 |
|
/* the mutex is mine, pop the firsttask to extract */ |
for (;;) { |
e = qq_getfirst(&p->blocked); |
e = iq_getfirst(&p->blocked); |
if (e == NIL) { |
p->owner = NIL; |
break; |