FreeBSD/sys/dev/vxge/vxge.c
/*
 * vxge_init_mutex
 * Initializes mutexes used in driver
 */
vxge_init_mutex
Initializes mutexes used in driver
vxge_init_mutex Initializes mutexes used in driver
void
vxge_mutex_init(vxge_dev_t *vdev)
{
	int i;
	snprintf(vdev->mtx_drv_name, sizeof(vdev->mtx_drv_name),
	    "%s_drv", vdev->ndev_name);
	mtx_init(&vdev->mtx_drv, vdev->mtx_drv_name,
	    MTX_NETWORK_LOCK, MTX_DEF);
	for (i = 0; i < vdev->no_of_vpath; i++) {
		snprintf(vdev->vpaths[i].mtx_tx_name,
		    sizeof(vdev->vpaths[i].mtx_tx_name), "%s_tx_%d",
		    vdev->ndev_name, i);
		mtx_init(&vdev->vpaths[i].mtx_tx,
		    vdev->vpaths[i].mtx_tx_name, NULL, MTX_DEF);
	}
}
void vxge_mutex_init ( vxge_dev_t * vdev ) { int i ; snprintf ( vdev -> mtx_drv_name , sizeof ( vdev -> mtx_drv_name ) , " " , vdev -> ndev_name ) ; mtx_init ( & vdev -> mtx_drv , vdev -> mtx_drv_name , MTX_NETWORK_LOCK , MTX_DEF ) ; for ( i = 0 ; i < vdev -> no_of_vpath ; i ++ ) { snprintf ( vdev -> vpaths [ i ] . mtx_tx_name , sizeof ( vdev -> vpaths [ i ] . mtx_tx_name ) , " " , vdev -> ndev_name , i ) ; mtx_init ( & vdev -> vpaths [ i ] . mtx_tx , vdev -> vpaths [ i ] . mtx_tx_name , NULL , MTX_DEF ) ; } }
vxge_init_mutex
 Initializes mutexes used in driver
vxge_init_mutex Initializes mutexes used in driver