FreeBSD/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb_resource.c
/*
 * returns 0 if no resource available
 */
returns 0 if no resource available
returns 0 if no resource available
static u32 cxio_hal_get_resource(struct buf_ring *fifo, struct mtx *lock)
{
	u32 entry;
	mtx_lock(lock);
	entry = (u32)(uintptr_t)buf_ring_dequeue_sc(fifo);
	mtx_unlock(lock);
	return entry;
}
static u32 cxio_hal_get_resource ( struct buf_ring * fifo , struct mtx * lock ) { u32 entry ; mtx_lock ( lock ) ; entry = ( u32 ) ( uintptr_t ) buf_ring_dequeue_sc ( fifo ) ; mtx_unlock ( lock ) ; return entry ; }
returns 0 if no resource available
returns 0 if no resource available