}
unsigned int keyindex=(key&mlookup.mask)>>1;
- volatile unsigned int * lockptr=&mlookup.larray[keyindex&LOCKMASK].lock;
+ volatile unsigned int * lockptr=&mlookup.larray[keyindex&LOCKAMASK].lock;
while(!write_trylock(lockptr)) {
sched_yield();
}
unsigned int keyindex=(key&mlookup.mask)>>1;
volatile unsigned int * lockptr=&mlookup.larray[keyindex&LOCKMASK].lock;
- while(!write_trylock(lockptr)) {
+ while(!read_trylock(lockptr)) {
sched_yield();
}
}
node = node->next;
} while (node!=NULL);
- write_unlock(lockptr);
+ read_unlock(lockptr);
return NULL;
}