NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release

Detailed Description

Functions

void NvOsSleepMS (NvU32 msec)
 This function sleep during the given millisecond. More...
 
NvError NvOsSleepUS (NvU32 usec)
 This function sleep during the given microsecond. More...
 
NvError NvOsSleepNS (NvU32 nsec)
 This function sleep during the given nanosecond. More...
 
NvError NvOsBusyWaitUS (NvU32 usec)
 This function busy-wait without blocking for a period of time. This function is designed for use with short delays less than 1ms and greater than 1us. If a delay more than 1ms is ncessary, please use NvOsSleepMS(). More...
 
NvError NvOsBusyWaitNS (NvU32 nsec)
 This function busy-wait without blocking for a period of time. This function is designed for use with short delays less than 1us and greater than 1ns.If a delay more than 1us is ncessary, please use NvOsBusyWaitUS(). More...
 

Function Documentation

◆ NvOsBusyWaitNS()

NvError NvOsBusyWaitNS ( NvU32  nsec)

This function busy-wait without blocking for a period of time. This function is designed for use with short delays less than 1us and greater than 1ns.If a delay more than 1us is ncessary, please use NvOsBusyWaitUS().

Parameters
[in]nsecThe nubmer of nanoseconds to busy-wait for. This value should be less than 500000000 nanoseconds Reference link: https://www.qnx.com/developers/docs/8.0/com.qnx.doc.neutrino.lib_ref/topic/n/nanospin_ns.html
Returns
NvSuccess : Success
NvError_InvalidState Error when a too-high rate of interrupt occurred during the calibration routine, timing information is not initialized in system startup-* program.
Precondition
None


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: Yes
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • Allowed execution state
    • Initialization: Yes
    • Operational: Yes
    • Reinit/Deinit Preparation: Yes
  • Maturity: GA

◆ NvOsBusyWaitUS()

NvError NvOsBusyWaitUS ( NvU32  usec)

This function busy-wait without blocking for a period of time. This function is designed for use with short delays less than 1ms and greater than 1us. If a delay more than 1ms is ncessary, please use NvOsSleepMS().

Parameters
[in]usecThe nubmer of microseconds to busy-wait for. The value should be less than 500000 microseconds Reference link: https://www.qnx.com/developers/docs/8.0/com.qnx.doc.neutrino.lib_ref/topic/n/nanospin_ns.html
Returns
NvSuccess Success
NvError_InvalidState Error when a too-high rate of interrupt occurred during the calibration routine, timing information is not initialized in system startup-* program.
Precondition
None


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: Yes
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • Allowed execution state
    • Initialization: Yes
    • Operational: Yes
    • Reinit/Deinit Preparation: Yes
  • Maturity: GA

◆ NvOsSleepMS()

void NvOsSleepMS ( NvU32  msec)

This function sleep during the given millisecond.

Parameters
[in]msecSleep during the given millisecond. The value should be greater than zero and less than 1000 millisecond (1 second)
Returns
N/A
Precondition
None


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: Yes
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • Allowed execution state
    • Initialization: Yes
    • Operational: Yes
    • Reinit/Deinit Preparation: Yes
  • Maturity: GA

◆ NvOsSleepNS()

NvError NvOsSleepNS ( NvU32  nsec)

This function sleep during the given nanosecond.

Parameters
[in]nsecSleep during the given nanosecond. The value should be greater than zero and less than 1,000,000,000 nanosecond (1 second)
Returns
NvSuccess : Success
NvError_InvalidState : The error will occur in the following situations The call was interrupted by a signal or timespec structure. The timespec structure of specified a nanosecond value less than zero or greater than or equal to 1000 million. The ID of the clock doesn't specify a known clock, or specifies the CPU-time clock of the calling thread. The ID of the clock for which clock_nanosleep() isn't supported, such as a CPU-time clock.
Precondition
None


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: Yes
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • Allowed execution state
    • Initialization: Yes
    • Operational: Yes
    • Reinit/Deinit Preparation: Yes
  • Maturity: GA

◆ NvOsSleepUS()

NvError NvOsSleepUS ( NvU32  usec)

This function sleep during the given microsecond.

Parameters
[in]usecSleep during the given microsecond. The value should be greater than zero and less than 1,000,000 microsecond (1 second)
Returns
NvSuccess Success
NvError_InvalidState The error will occur in the following situations The call was interrupted by a signal or timespec structure. The timespec structure of specified a nanosecond value less than zero or greater than or equal to 1000 million. The ID of the clock doesn't specify a known clock, or specifies the CPU-time clock of the calling thread. The ID of the clock for which clock_nanosleep() isn't supported, such as a CPU-time clock.
Precondition
None


Usage considerations

  • Allowed context for the API call
    • Interrupt handler: No
    • Signal handler: Yes
    • Thread-safe: Yes
    • Re-entrant: No
    • Async/Sync: Sync
  • Required privileges: None
  • Allowed execution state
    • Initialization: Yes
    • Operational: Yes
    • Reinit/Deinit Preparation: Yes
  • Maturity: GA