/* * vmci_get_context_id() - Gets the current context ID. * * Returns the current context ID. Note that since this is accessed only * from code running in the host, this always returns the host context ID.
*/
u32 vmci_get_context_id(void)
{ if (vmci_guest_code_active()) return vmci_get_vm_context_id(); elseif (vmci_host_code_active()) return VMCI_HOST_CONTEXT_ID;
/* * vmci_register_vsock_callback() - Register the VSOCK vmci_transport callback. * * The callback will be called when the first host or guest becomes active, * or if they are already active when this function is called. * To unregister the callback, call this function with NULL parameter. * * Returns 0 on success. -EBUSY if a callback is already registered.
*/ int vmci_register_vsock_callback(vmci_vsock_cb callback)
{ int err = 0;
/* In the host, this function could be called multiple times, * but we want to register it only once.
*/ if (is_host) { if (vmci_vsock_cb_host_called) goto out;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.