Go to the source code of this file.
Typedefs | |
| typedef struct NvCallstackRec | NvCallstack |
| typedef void(* | NvOsDumpCallback) (void *context, const char *line) |
| typedef struct NvOsIntrMutexRec * | NvOsIntrMutexHandle |
| typedef void(* | NvOsInterruptHandler) (void *args) |
| Interrupt handler function. More... | |
Enumerations | |
| enum | { NVOS_VERB_LVL_0 = 0, NVOS_VERB_LVL_1 = 1, NVOS_VERB_LVL_2 = 2, NVOS_VERB_LVL_3 = 3, NVOS_VERB_LVL_4 = 4 } |
| It point verbose log level, used as a parameter of NvOsSetVerboseLevel() function. More... | |
| enum | NvOsCallstackType { NvOsCallstackType_NoStack = 1, NvOsCallstackType_HexStack = 2, NvOsCallstackType_SymbolStack = 3, NvOsCallstackType_Last = 4, NvOsCallstackType_Force32 = 0x7FFFFFFF } |
Functions | |
| NvError | NvOsFremove (const char *filename) |
| This function removes a file. More... | |
| NvError | NvOsMkdir (char *dirname) |
| This function creates a directory. More... | |
| NvError | NvOsReaddir (NvOsDirHandle dir, char *name, size_t size) |
| This function gets an entry name in directory. More... | |
| size_t | NvOsStrlen (const char *s) |
| This function counts string length. More... | |
| NvError | NvOsFsync (NvOsFileHandle stream) |
| NvError | NvOsFtruncate (NvOsFileHandle stream, NvU64 length) |
| NvS32 | NvOsVsnprintf (char *str, size_t size, const char *format, va_list ap) |
| This function produces a string according format parameter and ap parameter. And the maximum length of produced string, is limited by size parameter. More... | |
| NvS32 | NvOsSnprintf (char *str, size_t size, const char *format,...) |
| This function produces a string according format parameter, variable-argument list and size parameter. The maximum length of produced string, is limited by size parameter. More... | |
| void | NvOsLibraryUnload (NvOsLibraryHandle library) |
| This function unloads the loaded dynamic lib. More... | |
| void | NvOsFclose (NvOsFileHandle hFile) |
| This function closes a file stream. More... | |
| void | NvOsMutexDestroy (NvOsMutexHandle mutex) |
| This function destroys a mutex. More... | |
| void | NvOsMutexLock (NvOsMutexHandle mutex) |
| This function locks a mutex. More... | |
| void | NvOsMutexUnlock (NvOsMutexHandle mutex) |
| This function unlocks a mutex. More... | |
| void | NvOsSemaphoreDestroy (NvOsSemaphoreHandle semaphore) |
| This function destroys a semaphore. More... | |
| void | NvOsSemaphoreSignal (NvOsSemaphoreHandle semaphore) |
| This function increases the number of wait operation, to given semaphore. More... | |
| void | NvOsSemaphoreWait (NvOsSemaphoreHandle semaphore) |
| This function waits a semaphore, and decrease the number of wait operations. Thread is blocked infinitely, if number of semaphore wait operations is 0. More... | |
| void | NvOsWaitUS (NvU32 usec) |
| This function busy-wait without blocking for a period of time. This function is designed for use that requires short time delay less than 1ms. If a delay more than 1ms is ncessary, please use NvOsSleepMS(). More... | |
| void | NvOsThreadJoin (NvOsThreadHandle t) |
| This function blocks until while the thread is running, after the thread is terminated, this function unblocks. More... | |
| NvError | NvOsFprintf (NvOsFileHandle hFile, const char *format,...) |
| This function print string into a file stream as format and per format parameter and variable-argument list. More... | |
| void | NvOsDebugPrintf (const char *format,...) |
| This function print log. More... | |
| void | NvOsLogPrintf (int prio, const char *tag, const char *format,...) |
| This function prints a log message according to the prio parameter. More... | |
| void | NvOsVerbosePrintf (NvS32 VerbLevel, const char *Fmt,...) |
| This function print log, if current verbose log level is not smaller than log's verbose level. Log's verbose level is given as VerbLevel parameter, and log is printed actually by slogf() in QNX libc. More... | |
| void | NvOsDebugString (const char *str) |
| This function prints debug logs via the system log facility. More... | |
| void | NvOsDebugVprintf (const char *format, va_list ap) |
| This function print log as per format parameter and variable-argument list. More... | |
| int | NvOsGetVerboseLevel (NvS32 *VerbLevel) |
| This function gets the verbose log level. More... | |
| int | NvOsSetVerboseLevel (NvS32 VerbLevel) |
| This function set the verbose log level. More... | |
| void | NvOsDumpToDebugPrintf (void *context, const char *line) |
| NvCallstack * | NvOsCallstackCreate (NvOsCallstackType stackType) |
| void | NvOsCallstackDestroy (NvCallstack *callstack) |
| NvU32 | NvOsCallstackGetHeight (NvCallstack *stack) |
| void | NvOsCallstackGetFrame (char *buf, NvU32 len, NvCallstack *stack, NvU32 level) |
| void | NvOsCallstackDump (NvCallstack *stack, NvU32 skip, NvOsDumpCallback callBack, void *context) |
| NvU32 | NvOsCallstackHash (NvCallstack *stack) |
| NvBool | NvOsCallstackContainsPid (NvCallstack *stack, NvU32 pid) |
| static NV_INLINE void | NvOsDebugCallstack (NvU32 skip) |
| NvError | NvOsVfprintf (NvOsFileHandle stream, const char *format, va_list ap) |
| Prints a string to a file stream using a va_list. More... | |
| NvS32 | NvOsDebugNprintf (const char *format,...) |
| Same as NvOsDebugPrintf, except returns the number of chars written. More... | |
| void | NvOsStrcpy (char *dest, const char *src) |
| Copies a string. More... | |
| int | NvOsMemcmp (const void *s1, const void *s2, size_t size) |
| Compares two memory regions. More... | |
| NvError | NvOsPhysicalMemMap (NvOsPhysAddr phys, size_t size, NvOsMemAttribute attrib, NvU32 flags, void **ptr) |
| Maps computer resources into user space. More... | |
| void | NvOsPhysicalMemUnmap (void *ptr, size_t size) |
| Releases resources previously allocated by NvOsPhysicalMemMap(). More... | |
| NvError | NvOsIntrMutexCreate (NvOsIntrMutexHandle *mutex) |
| Creates a mutex that is safe to aquire in an ISR. More... | |
| void | NvOsIntrMutexLock (NvOsIntrMutexHandle mutex) |
| Aquire an ISR-safe mutex. More... | |
| void | NvOsIntrMutexUnlock (NvOsIntrMutexHandle mutex) |
| Releases an ISR-safe mutex. More... | |
| void | NvOsIntrMutexDestroy (NvOsIntrMutexHandle mutex) |
| Destroys an ISR-safe mutex. More... | |
| void | NvOsDataCacheWritebackRange (void *start, NvU32 length) |
| Writes back a range of the data cache. More... | |
| void | NvOsDataCacheWritebackInvalidateRange (void *start, NvU32 length) |
| Writes back and invlidates a range of the data cache. More... | |
| void | NvOsFlushWriteCombineBuffer (void) |
| Flushes the CPU's write combine buffer. More... | |
| NvError | NvOsInterruptRegister (NvU32 IrqListSize, const NvU32 *pIrqList, const NvOsInterruptHandler *pIrqHandlerList, void *context, NvOsInterruptHandle *handle, NvBool InterruptEnable) |
| Registers the interrupt handler with the IRQ number. More... | |
| void | NvOsInterruptUnregister (NvOsInterruptHandle handle) |
| Unregisters the interrupt handler from the associated IRQ number. More... | |
| NvError | NvOsInterruptEnable (NvOsInterruptHandle handle) |
| Enables the interrupt handler with the IRQ number. More... | |
| void | NvOsInterruptDone (NvOsInterruptHandle handle) |
| Called when the ISR/IST is done handling the interrupt. More... | |
| int | NvOsSetFpsTarget (int target) |
| To be deprecated. More... | |
| int | NvOsModifyFpsTarget (int fd, int target) |
| To be deprecated. More... | |
| void | NvOsCancelFpsTarget (int fd) |
| To be deprecated. More... | |
| NvError | NvOsInterruptPriorityThreadCreate (NvOsThreadFunction function, void *args, NvOsThreadHandle *thread) |
| Creates a near interrupt priority thread. More... | |
| typedef struct NvCallstackRec NvCallstack |
Definition at line 659 of file nvos_s1_tegra.h.
Definition at line 671 of file nvos_s1_tegra.h.
Interrupt handler function.
Definition at line 818 of file nvos_s1_tegra.h.
| typedef struct NvOsIntrMutexRec* NvOsIntrMutexHandle |
Definition at line 699 of file nvos_s1_tegra.h.
| anonymous enum |
It point verbose log level, used as a parameter of NvOsSetVerboseLevel() function.
Definition at line 578 of file nvos_s1_tegra.h.
| enum NvOsCallstackType |
| Enumerator | |
|---|---|
| NvOsCallstackType_NoStack | |
| NvOsCallstackType_HexStack | |
| NvOsCallstackType_SymbolStack | |
| NvOsCallstackType_Last | |
| NvOsCallstackType_Force32 | |
Definition at line 661 of file nvos_s1_tegra.h.
| NvBool NvOsCallstackContainsPid | ( | NvCallstack * | stack, |
| NvU32 | pid | ||
| ) |
| NvCallstack* NvOsCallstackCreate | ( | NvOsCallstackType | stackType | ) |
Referenced by NvOsDebugCallstack().
| void NvOsCallstackDestroy | ( | NvCallstack * | callstack | ) |
Referenced by NvOsDebugCallstack().
| void NvOsCallstackDump | ( | NvCallstack * | stack, |
| NvU32 | skip, | ||
| NvOsDumpCallback | callBack, | ||
| void * | context | ||
| ) |
Referenced by NvOsDebugCallstack().
| void NvOsCallstackGetFrame | ( | char * | buf, |
| NvU32 | len, | ||
| NvCallstack * | stack, | ||
| NvU32 | level | ||
| ) |
| NvU32 NvOsCallstackGetHeight | ( | NvCallstack * | stack | ) |
| NvU32 NvOsCallstackHash | ( | NvCallstack * | stack | ) |
| void NvOsCancelFpsTarget | ( | int | fd | ) |
To be deprecated.
Cancels the fps target previously supplied with the NvOsSetFpsTarget() function.
| fd | The file descriptor generated by NvOsSetFpsTarget. |
Writes back and invlidates a range of the data cache.
| start | A pointer to the start address. |
| length | The number of bytes to write back. |
Writes back a range of the data cache.
| start | A pointer to the start address. |
| length | The number of bytes to write back. |
|
static |
Definition at line 689 of file nvos_s1_tegra.h.
References NvOsCallstackCreate(), NvOsCallstackDestroy(), NvOsCallstackDump(), NvOsCallstackType_SymbolStack, and NvOsDumpToDebugPrintf().
| NvS32 NvOsDebugNprintf | ( | const char * | format, |
| ... | |||
| ) |
Same as NvOsDebugPrintf, except returns the number of chars written.
| void NvOsDebugString | ( | const char * | str | ) |
This function prints debug logs via the system log facility.
| [in] | str | The string to be printed |
Usage considerations
Referenced by NvOsDebugCallstack().
| NvError NvOsFsync | ( | NvOsFileHandle | stream | ) |
| NvError NvOsFtruncate | ( | NvOsFileHandle | stream, |
| NvU64 | length | ||
| ) |
| void NvOsInterruptDone | ( | NvOsInterruptHandle | handle | ) |
Called when the ISR/IST is done handling the interrupt.
| handle | Interrupt handle returned when a successfull call is made to NvOsInterruptRegister(). |
| NvError NvOsInterruptEnable | ( | NvOsInterruptHandle | handle | ) |
Enables the interrupt handler with the IRQ number.
| handle | Interrupt handle returned when a successfull call is made to NvOsInterruptRegister. |
| NvError_BadParameter | If the handle is not valid. |
| NvError_InsufficientMemory | If interrupt enable failed. |
| NvSuccess | If interrupt enable is successful. |
| NvError NvOsInterruptPriorityThreadCreate | ( | NvOsThreadFunction | function, |
| void * | args, | ||
| NvOsThreadHandle * | thread | ||
| ) |
Creates a near interrupt priority thread.
| function | The thread entry point. | |
| args | A pointer to the thread arguments. | |
| [out] | thread | A pointer to the result thread ID structure. |
| NvError NvOsInterruptRegister | ( | NvU32 | IrqListSize, |
| const NvU32 * | pIrqList, | ||
| const NvOsInterruptHandler * | pIrqHandlerList, | ||
| void * | context, | ||
| NvOsInterruptHandle * | handle, | ||
| NvBool | InterruptEnable | ||
| ) |
Registers the interrupt handler with the IRQ number.
| IrqListSize | Size of the IrqList passed in for registering the IRQ handlers for each IRQ number. |
| pIrqList | Array of IRQ numbers for which interupt handlers are to be registerd. |
| pIrqHandlerList | A pointer to an array of interrupt routines to be called when an interrupt occurs. |
| context | A pointer to the register's context handle. |
| handle | A pointer to the interrupt handle. |
| InterruptEnable | If true, immediately enable interrupt. Otherwise enable interrupt only after calling NvOsInterruptEnable(). |
| NvError_IrqRegistrationFailed | If the interrupt is already registered. |
| NvError_BadParameter | If the IRQ number is not valid. |
| void NvOsInterruptUnregister | ( | NvOsInterruptHandle | handle | ) |
Unregisters the interrupt handler from the associated IRQ number.
| handle | interrupt Handle returned when a successfull call is made to NvOsInterruptRegister(). |
| NvError NvOsIntrMutexCreate | ( | NvOsIntrMutexHandle * | mutex | ) |
Creates a mutex that is safe to aquire in an ISR.
| mutex | A pointer to the mutex is stored here on success. |
| void NvOsIntrMutexDestroy | ( | NvOsIntrMutexHandle | mutex | ) |
Destroys an ISR-safe mutex.
| mutex | The mutex to destroy. If mutex is NULL, this API has no effect. |
| void NvOsIntrMutexLock | ( | NvOsIntrMutexHandle | mutex | ) |
Aquire an ISR-safe mutex.
| mutex | The mutex to lock. For kernel (OAL) implementations, NULL implies the system-wide lock will be used. |
| void NvOsIntrMutexUnlock | ( | NvOsIntrMutexHandle | mutex | ) |
Releases an ISR-safe mutex.
| mutex | The mutex to unlock. For kernel (OAL) implementations, NULL implies the system-wide lock will be used. |
Compares two memory regions.
| s1 | A pointer to the first memory region. |
| s2 | A pointer to the second memory region. |
| size | The length to compare. |
This returns 0 If the memory regions are identical
| int NvOsModifyFpsTarget | ( | int | fd, |
| int | target | ||
| ) |
To be deprecated.
Sets the frame rate target with an existing file descriptor (fd).
| fd | An open fd returned by the NvOsSetFpsTarget() function. |
| target | The fps target. |
| NvError NvOsPhysicalMemMap | ( | NvOsPhysAddr | phys, |
| size_t | size, | ||
| NvOsMemAttribute | attrib, | ||
| NvU32 | flags, | ||
| void ** | ptr | ||
| ) |
Maps computer resources into user space.
| phys | The physical address start. | |
| size | The size of the aperture. | |
| attrib | Memory attributes (caching). | |
| flags | Bitwise OR of NVOS_MEM_*. | |
| [out] | ptr | A pointer to the result pointer. |
Releases resources previously allocated by NvOsPhysicalMemMap().
| ptr | The virtual pointer returned by NvOsPhysicalMemMap. If this pointer is null, this function has no effect. |
| size | The size of the mapped region. |
| int NvOsSetFpsTarget | ( | int | target | ) |
To be deprecated.
Sets a frame rate target that matches the CPU frequency scaling to the measured performance.
| target | The fps target. |
| void NvOsStrcpy | ( | char * | dest, |
| const char * | src | ||
| ) |
Copies a string.
The src string must be NUL terminated.
| dest | A pointer to the destination of the copy. |
| src | A pointer to the source string. |
| NvError NvOsVfprintf | ( | NvOsFileHandle | stream, |
| const char * | format, | ||
| va_list | ap | ||
| ) |
Prints a string to a file stream using a va_list.
| stream | The file stream. |
| format | A pointer to the format string. |
| ap | The va_list structure. |