[][src]Function nvml_binding::bindings::nvmlEventSetWait

pub unsafe extern "C" fn nvmlEventSetWait(
    set: nvmlEventSet_t,
    data: *mut nvmlEventData_t,
    timeoutms: c_uint
) -> nvmlReturn_t

Waits on events and delivers events

For Fermi &tm; or newer fully supported devices.

If some events are ready to be delivered at the time of the call, function returns immediately. If there are no events ready to be delivered, function sleeps till event arrives but not longer than specified timeout. This function in certain conditions can return before specified timeout passes (e.g. when interrupt arrives)

In case of xid error, the function returns the most recent xid error type seen by the system. If there are multiple xid errors generated before nvmlEventSetWait is invoked then the last seen xid error type is returned for all xid error events.

@param set Reference to set of events to wait on @param data Reference in which to return event data @param timeoutms Maximum amount of wait time in milliseconds for registered event

@return - \ref NVML_SUCCESS if the data has been set - \ref NVML_ERROR_UNINITIALIZED if the library has not been successfully initialized - \ref NVML_ERROR_INVALID_ARGUMENT if \a data is NULL - \ref NVML_ERROR_TIMEOUT if no event arrived in specified timeout or interrupt arrived - \ref NVML_ERROR_GPU_IS_LOST if a GPU has fallen off the bus or is otherwise inaccessible - \ref NVML_ERROR_UNKNOWN on any unexpected error

@see nvmlEventType @see nvmlDeviceRegisterEvents