/*------------------------------------------------------------------------------ * Context: softirq or process */ void oz_pd_put(struct oz_pd *pd) { if(atomic_read(&pd->ref_count) <= 0) { WARN(1, "Unexpected ref_count decrement!\n"); return; } if (atomic_dec_and_test(&pd->ref_count)) oz_pd_destroy(pd); }
/*------------------------------------------------------------------------------ * Context: softirq or process */ void oz_pd_put(struct oz_pd *pd) { if (atomic_dec_and_test(&pd->ref_count)) oz_pd_destroy(pd); }