Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

RTDECL ( int   ) 

Create a recurring timer.

Returns:
iprt status code.
Parameters:
ppTimer Where to store the timer handle.
uMilliesInterval Milliseconds between the timer ticks. This is rounded up to the system granularity.
pfnTimer Callback function which shall be scheduled for execution on every timer tick.
pvUser User argument for the callback.
See also:
RTTimerDestroy, RTTimerStop
Create a suspended timer.

Returns:
iprt status code.
Return values:
VERR_NOT_SUPPORTED if an unsupported flag was specfied.
Parameters:
ppTimer Where to store the timer handle.
u64NanoInterval The interval between timer ticks specified in nanoseconds if it's a recurring timer. This is rounded to the fit the system timer granularity. For one shot timers, pass 0.
fFlags Timer flags.
pfnTimer Callback function which shall be scheduled for execution on every timer tick.
pvUser User argument for the callback.
See also:
RTTimerStart, RTTimerStop, RTTimerDestroy, RTTimerGetSystemGranularity
Stops and destroys a running timer.

Returns:
iprt status code.
Parameters:
pTimer Timer to stop and destroy. NULL is ok.
Stops an active timer.

Returns:
IPRT status code.
Return values:
VERR_INVALID_HANDLE if pTimer isn't valid.
VERR_TIMER_ACTIVE if the timer isn't suspended.
Parameters:
pTimer The timer to activate.
u64First The RTTimeSystemNanoTS() for when the timer should start firing (relative). If 0 is specified, the timer will fire ASAP.
See also:
RTTimerStop
Stops an active timer.

Returns:
IPRT status code.
Return values:
VERR_INVALID_HANDLE if pTimer isn't valid.
VERR_TIMER_SUSPENDED if the timer isn't active.
VERR_NOT_SUPPORTED if the IPRT implementation doesn't support stopping a timer.
Parameters:
pTimer The timer to suspend.
See also:
RTTimerStart
Requests a specific system timer granularity.

Successfull calls to this API must be coupled with the exact same number of calls to RTTimerReleaseSystemGranularity() in order to undo any changes made.

Returns:
IPRT status code.
Return values:
VERR_NOT_SUPPORTED if the requested value isn't supported by the host platform or if the host platform doesn't support modifying the system timer granularity.
VERR_PERMISSION_DENIED if the caller doesn't have the necessary privilege to modify the system timer granularity.
Parameters:
u32Request The requested system timer granularity in nanoseconds.
pu32Granted Where to store the granted system granularity. This is the value that should be passed to RTTimerReleaseSystemGranularity(). It is what RTTimerGetSystemGranularity() would return immediately after the change was made.
The value differ from the request in two ways; rounding and scale. Meaning if your request is for 10.000.000 you might be granted 10.000.055 or 1.000.000.
See also:
RTTimerReleaseSystemGranularity, RTTimerGetSystemGranularity
Releases a system timer granularity grant acquired by RTTimerRequestSystemGranularity().

Returns:
IPRT status code.
Return values:
VERR_NOT_SUPPORTED if the host platform doesn't have any way of modifying the system timer granularity.
VERR_WRONG_ORDER if nobody call RTTimerRequestSystemGranularity() with the given grant value.
Parameters:
u32Granted The granted system granularity.
See also:
RTTimerRequestSystemGranularity
Create a recurring low resolution timer.

Returns:
iprt status code.
Parameters:
phTimerLR Where to store the timer handle.
uMilliesInterval Milliseconds between the timer ticks, at least 100 ms. If higher resolution is required use the other API.
pfnTimer Callback function which shall be scheduled for execution on every timer tick.
pvUser User argument for the callback.
See also:
RTTimerLRCreateEx, RTTimerLRDestroy, RTTimerLRStop
Create a suspended low resolution timer.

Returns:
iprt status code.
Return values:
VERR_NOT_SUPPORTED if an unsupported flag was specfied.
Parameters:
phTimerLR Where to store the timer handle.
u64NanoInterval The interval between timer ticks specified in nanoseconds if it's a recurring timer, the minimum for is 100000000 ns. For one shot timers, pass 0.
fFlags Timer flags. Same as RTTimerCreateEx.
pfnTimer Callback function which shall be scheduled for execution on every timer tick.
pvUser User argument for the callback.
See also:
RTTimerLRStart, RTTimerLRStop, RTTimerLRDestroy
Stops and destroys a running low resolution timer.

Returns:
iprt status code.
Parameters:
hTimerLR The low resolution timer to stop and destroy. NIL_RTTIMERLR is accepted.
Stops an active low resolution timer.

Returns:
IPRT status code.
Return values:
VERR_INVALID_HANDLE if pTimer isn't valid.
VERR_TIMER_ACTIVE if the timer isn't suspended.
Parameters:
hTimerLR The low resolution timer to activate.
u64First The RTTimeSystemNanoTS() for when the timer should start firing (relative), the minimum is 100000000 ns. If 0 is specified, the timer will fire ASAP.
See also:
RTTimerLRStop
Stops an active low resolution timer.

Returns:
IPRT status code.
Return values:
VERR_INVALID_HANDLE if pTimer isn't valid.
VERR_TIMER_SUSPENDED if the timer isn't active.
VERR_NOT_SUPPORTED if the IPRT implementation doesn't support stopping a timer.
Parameters:
hTimerLR The low resolution timer to suspend.
See also:
RTTimerLRStart

Todo:
this isn't safe. a scheduling interrupt on the other cpu while we're in here could cause the thread to be timed out before we manage to wake it up and the event ends up in the wrong state. ditto for posix signals.

Definition at line 80 of file req.cpp.

{
    /*
     * Check input.
     */
    if (!pQueue)
    {
        AssertFailed();
        return VERR_INVALID_PARAMETER;
    }
    RTSemEventDestroy(pQueue->EventSem);
    RTMemFree(pQueue);
    return VINF_SUCCESS;
}


Generated by  Doxygen 1.6.0   Back to index