Data Structures | |
| struct | NvOsOsInfo |
| Info about OS type and the chip SKU. More... | |
Enumerations | |
| enum | NvOsOs { NvOsOs_Unknown = 0x0UL, NvOsOs_Windows = 0x1UL, NvOsOs_Linux = 0x2UL, NvOsOs_Qnx = 0x4UL, NvOsOs_Integrity = 0x5UL, NvOsOs_Force32 = 0x7FFFFFFFUL } |
| enum | NvOsSku { NvOsSku_Unknown = 0x0UL, NvOsSku_Android = 0x1UL, NvOsSku_Force32 = 0x7FFFFFFFUL } |
Functions | |
| NvError | NvOsShowError (NvError err, const char *file, int line) |
| This function prints an error and the line it appeared on. Does nothing if err is NvSuccess. More... | |
| void * | NvUAlloc0 (size_t size) |
| This function dynamically allocates zeroed memory. More... | |
| NvError | NvOsGetOsInformation (NvOsOsInfo *pOsInfo) |
| This function gets the OS information. More... | |
| void | NvOsGetProcessInfo (char *buf, NvU32 len) |
| This function gets process information. The buf parameter is printed as 's - (pid d)' which followed a standard of printf() in QNX libc. More... | |
| NvS32 | NvOsAtomicExchange32 (NvS32 *pTarget, NvS32 value) |
| This function atomically swaps the contents of a 32-bit memory location with a value. This is the equivalent of the following code, which is atomically executed. It means that the operation is not affected by other threads or processors and safely executed. More... | |
| NvS32 | NvOsAtomicExchangeAdd32 (NvS32 *pTarget, NvS32 value) |
| This function atomically increments the contents of a 32-bit memory location by a specified amount. This function is the equivalent of the following code, which is atomically executed. It means that the operation is not affected by other threads or processors and safely executed. More... | |
| NvError | NvOsGetConfigString (const char *name, char *value, NvU32 size) |
| This function gets an environment variable as string pointer. And copy it to value parameter by strncpy(), copying length is up to size parameter. More... | |
| NvError | NvOsGetConfigU32 (const char *name, NvU32 *value) |
| This function get an environment variable as integer. More... | |
| NvError | NvOsGetSysConfigString (const char *name, char *value, NvU32 size) |
| This function gets an environment variable as string pointer. And copy it to value parameter by strncpy(), copying length is up to size parameter. More... | |
| void * | NvOsAtomicCompareExchangePtr (void **pTarget, void *OldValue, void *NewValue) |
| This function atomically compares the contents of a pointer-sized memory location with a value, and if they match, updates it to a new value. This function is the equivalent of the following code, which is atomically executed. It means that the operation is not affected by other threads or processors and safely executed. More... | |
| NvS32 | NvOsAtomicCompareExchange32 (NvS32 *pTarget, NvS32 OldValue, NvS32 NewValue) |
| This function assigns new value to pointer if the value of pointer is same with the value specified by oldValue, atomically. This function is the equivalent of the following code, which is atomically executed. It means that the operation is not affected by other threads or processors and safely executed. More... | |
| int | NvOsDebugExternalLogInit (void) |
| This function initializes the connection with syslog. And if a shared memory for log level control exists, this function opens and maps the memory. NvOS logging API filters logs based on the log level control table in this shared memory. More... | |
| enum NvOsOs |
| Enumerator | |
|---|---|
| NvOsOs_Unknown | Unsupported OS. |
| NvOsOs_Windows | Windows OS. |
| NvOsOs_Linux | Linux OS. |
| NvOsOs_Qnx | QNX OS. |
| NvOsOs_Integrity | Integrity OS. |
| NvOsOs_Force32 | Max value for NvOsOs. |
Definition at line 91 of file nvos_s3_tegra_safety.h.
| enum NvOsSku |
| Enumerator | |
|---|---|
| NvOsSku_Unknown | Unknown SKU. |
| NvOsSku_Android | Android. |
| NvOsSku_Force32 | Max value for NvOsSku. |
Definition at line 108 of file nvos_s3_tegra_safety.h.
| NvS32 NvOsAtomicCompareExchange32 | ( | NvS32 * | pTarget, |
| NvS32 | OldValue, | ||
| NvS32 | NewValue | ||
| ) |
This function assigns new value to pointer if the value of pointer is same with the value specified by oldValue, atomically. This function is the equivalent of the following code, which is atomically executed. It means that the operation is not affected by other threads or processors and safely executed.
| [in,out] | pTarget | Pointer to target to be compared and updated. |
| [in] | OldValue | Compare with the value of pTarget pointer |
| [in] | NewValue | New value to assign pTarget pointer |
Usage considerations
This function atomically compares the contents of a pointer-sized memory location with a value, and if they match, updates it to a new value. This function is the equivalent of the following code, which is atomically executed. It means that the operation is not affected by other threads or processors and safely executed.
| [out] | pTarget | Pointer to target to be compared and updated. Should not be NULL |
| [in] | OldValue | Pointer to store old value to be compared. Should not be NULL |
| [in] | NewValue | Pointer to store new value to be exchanged. Should not be NULL |
Usage considerations
| NvS32 NvOsAtomicExchange32 | ( | NvS32 * | pTarget, |
| NvS32 | value | ||
| ) |
This function atomically swaps the contents of a 32-bit memory location with a value. This is the equivalent of the following code, which is atomically executed. It means that the operation is not affected by other threads or processors and safely executed.
| [in] | pTarget | Pointer to assign new value. Should not be NULL |
| [in] | value | new value to assign pTarget parameter |
Usage considerations
| NvS32 NvOsAtomicExchangeAdd32 | ( | NvS32 * | pTarget, |
| NvS32 | value | ||
| ) |
This function atomically increments the contents of a 32-bit memory location by a specified amount. This function is the equivalent of the following code, which is atomically executed. It means that the operation is not affected by other threads or processors and safely executed.
| [in] | pTarget | Pointer to add new value. Should not be NULL |
| [in] | value | new value to add pTarget parameter |
Usage considerations
| int NvOsDebugExternalLogInit | ( | void | ) |
This function initializes the connection with syslog. And if a shared memory for log level control exists, this function opens and maps the memory. NvOS logging API filters logs based on the log level control table in this shared memory.
Usage considerations
| NvError NvOsGetConfigString | ( | const char * | name, |
| char * | value, | ||
| NvU32 | size | ||
| ) |
This function gets an environment variable as string pointer. And copy it to value parameter by strncpy(), copying length is up to size parameter.
| [in] | name | Name of environment variable, passed to name parameter of getenv() in QNX libc |
| [out] | value | A buffer to store the value of the envionment specified by name |
| [in] | size | Maximum length of string to be copied to value |
Usage considerations
| NvError NvOsGetConfigU32 | ( | const char * | name, |
| NvU32 * | value | ||
| ) |
This function get an environment variable as integer.
| [in] | name | Name of environment variable, passed to name parameter of getenv() in QNX libc |
| [out] | value | Environment variable as 32 bit unsigned interger. |
Usage considerations
| NvError NvOsGetOsInformation | ( | NvOsOsInfo * | pOsInfo | ) |
This function gets the OS information.
| [out] | pOsInfo | Describe OS information |
Usage considerations
| void NvOsGetProcessInfo | ( | char * | buf, |
| NvU32 | len | ||
| ) |
This function gets process information. The buf parameter is printed as 's - (pid d)' which followed a standard of printf() in QNX libc.
| [out] | buf | Buffer that both process name and process id are printed into |
| [in] | len | length of buf parameter, printed length will not exceed len parameter |
Usage considerations
| NvError NvOsGetSysConfigString | ( | const char * | name, |
| char * | value, | ||
| NvU32 | size | ||
| ) |
This function gets an environment variable as string pointer. And copy it to value parameter by strncpy(), copying length is up to size parameter.
| [in] | name | Name of environment variable, passed to name parameter of getenv() in QNX libc |
| [out] | value | A buffer to store the value of the envionment specified by name |
| [in] | size | Maximum length of string to be copied to value |
Usage considerations
This function prints an error and the line it appeared on. Does nothing if err is NvSuccess.
| [in] | err | Error which is a type of NvError |
| [in] | file | File anme where an error happens in |
| [in] | line | Line number where an error happens on |
Usage considerations
| void* NvUAlloc0 | ( | size_t | size | ) |
This function dynamically allocates zeroed memory.
| [in] | size | The number of bytes to allocate |
Usage considerations