qvm_unique()

Obtain a system-wide unique number

Synopsis:

#include <qvm/utils.h>
uint64_t qvm_unique(uint64_t start,
                    uint64_t end)

Arguments:

start
The first legal number.
end
The last legal number.

Library:

Provided by qvm; no external library is required.

Description:

The unique number is unique in the entire hypervisor system. This function is useful when working with resources (e.g., a hardware device) that may be shared across multiple qvm process instances. Note that in order to be able to provide a number that is unique in the entire hypervisor system, this function access resources beyond the bounds of its VM.

Returns:

The unique number for the system, or ID_FAILED if no number was obtained.