Esempio n. 1
0
static void paBufDeinit(stasis_buffer_manager_t * bm) {
  stasis_buffer_manager_page_array_t *pa = bm->impl;

  for(pageid_t i =0; i < pa->pageCount; i++) {
    if(pa->pageMap[i]) {
      deletelock(pa->pageMap[i]->rwlatch);
      deletelock(pa->pageMap[i]->loadlatch);
      free(pa->pageMap[i]);
    }
  }
  pthread_mutex_destroy(&pa->mut);
  free(pa);
}
Esempio n. 2
0
void deleteq(queue_t *q)
{
  free(q->packets);
  deletelock(&q->lock);
}