Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/vmware/vmci/vmci_kernel_if.c
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
* | * | ||||
*------------------------------------------------------------------------------ | *------------------------------------------------------------------------------ | ||||
*/ | */ | ||||
void | void | ||||
vmci_cleanup_lock(vmci_lock *lock) | vmci_cleanup_lock(vmci_lock *lock) | ||||
{ | { | ||||
if mtx_initialized(lock) | |||||
mtx_destroy(lock); | mtx_destroy(lock); | ||||
} | } | ||||
/* | /* | ||||
*------------------------------------------------------------------------------ | *------------------------------------------------------------------------------ | ||||
* | * | ||||
* vmci_grab_lock | * vmci_grab_lock | ||||
* | * | ||||
* Grabs the given lock. | * Grabs the given lock. | ||||
▲ Show 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | |||||
{ | { | ||||
mtx_unlock(lock); | mtx_unlock(lock); | ||||
} | } | ||||
/* | /* | ||||
*------------------------------------------------------------------------------ | *------------------------------------------------------------------------------ | ||||
* | * | ||||
* vmci_initialized_lock | |||||
* | |||||
* Returns whether a lock has been initialized. | |||||
* | |||||
* Results: | |||||
* Return 1 if initialized or 0 if unininitialized. | |||||
* | |||||
* Side effects: | |||||
* None | |||||
* | |||||
*------------------------------------------------------------------------------ | |||||
*/ | |||||
int | |||||
vmci_initialized_lock(vmci_lock *lock) | |||||
{ | |||||
return mtx_initialized(lock); | |||||
} | |||||
/* | |||||
*------------------------------------------------------------------------------ | |||||
* | |||||
* vmci_alloc_kernel_mem | * vmci_alloc_kernel_mem | ||||
* | * | ||||
* Allocate physically contiguous memory for the VMCI driver. | * Allocate physically contiguous memory for the VMCI driver. | ||||
* | * | ||||
* Results: | * Results: | ||||
* The address allocated or NULL on error. | * The address allocated or NULL on error. | ||||
* | * | ||||
* | * | ||||
▲ Show 20 Lines • Show All 262 Lines • ▼ Show 20 Lines | |||||
void | void | ||||
vmci_mutex_release(vmci_mutex *mutex) | vmci_mutex_release(vmci_mutex *mutex) | ||||
{ | { | ||||
mtx_unlock(mutex); | mtx_unlock(mutex); | ||||
} | } | ||||
/* | |||||
*------------------------------------------------------------------------------ | |||||
* | |||||
* vmci_mutex_initialized | |||||
* | |||||
* Returns whether a mutex has been initialized. | |||||
* | |||||
* Results: | |||||
* Return 1 if initialized or 0 if unininitialized. | |||||
* | |||||
* Side effects: | |||||
* None | |||||
* | |||||
*------------------------------------------------------------------------------ | |||||
*/ | |||||
int | |||||
vmci_mutex_initialized(vmci_mutex *mutex) | |||||
{ | |||||
return mtx_initialized(mutex); | |||||
} | |||||
/* | /* | ||||
*------------------------------------------------------------------------------ | *------------------------------------------------------------------------------ | ||||
* | * | ||||
* vmci_alloc_queue -- | * vmci_alloc_queue -- | ||||
* | * | ||||
* Allocates kernel queue pages of specified size with IOMMU mappings, plus | * Allocates kernel queue pages of specified size with IOMMU mappings, plus | ||||
* space for the queue structure/kernel interface and the queue header. | * space for the queue structure/kernel interface and the queue header. | ||||
* | * | ||||
▲ Show 20 Lines • Show All 612 Lines • Show Last 20 Lines |