for (i = 0; i <= VOLMAXPARTS; i++) {
VVGCache.part[i].state = VVGC_PART_STATE_INVALID;
VVGCache.part[i].dlist_hash_buckets = NULL;
- code = pthread_cond_init(&VVGCache.part[i].cv, NULL);
+ CV_INIT(&VVGCache.part[i].cv, "cache part", CV_DEFAULT, 0);
if (code) {
goto error;
}
/* destroy per-partition VVGC state */
for (i = 0; i <= VOLMAXPARTS; i++) {
VVGCache.part[i].state = VVGC_PART_STATE_INVALID;
- pthread_cond_destroy(&VVGCache.part[i].cv);
+ CV_DESTROY(&VVGCache.part[i].cv);
}
return EOPNOTSUPP;
{
int code = 0;
- assert(entry->refcnt == 0);
+ osi_Assert(entry->refcnt == 0);
free(entry);
return code;
{
int code = 0;
- assert(entry->refcnt > 0);
+ osi_Assert(entry->refcnt > 0);
if (--entry->refcnt == 0) {
VVGCache_entry_t *nentry;
}
}
- assert(!child_ent);
+ osi_Assert(!child_ent);
child_ent = parent_ent;
code = _VVGC_hash_entry_add(dp,
child,
VVGCache.part[part->index].state = state;
if (old_state != state) {
- pthread_cond_broadcast(&VVGCache.part[part->index].cv);
+ CV_BROADCAST(&VVGCache.part[part->index].cv);
}
return old_state;