}
int isParent(REntry *r) {
- if (r->type==PARENTREAD || r->type==PARENTWRITE) {
+ if (r->type==PARENTREAD || r->type==PARENTWRITE || r->type==PARENTCOARSE) {
return TRUE;
} else {
return FALSE;
void* flag=NULL;
flag=(void*)LOCKXCHG((unsigned INTPTR*)&(V->array[index]), (unsigned INTPTR)flag);
if (flag!=NULL) {
- if (isParent(r)) { //parent's retire immediately
- atomic_dec(&V->item.total);
+ if (isParentCoarse(r)) { //parent's retire immediately
+ atomic_dec(&V->item.total);
}
return READY;
} else {
}
rptr->item.status=READY; {
}
- ptr=ptr->next;
+
}
+ ptr=ptr->next;
}while(ptr!=NULL);
}
bin->head=val; // released lock;