Generic statements applicable for NvSciBuf interfaces.
NvSciBuf blanket statements
Input parameters
- NvSciBufModule passed as input parameter to an API is valid input if it is returned from a successful call to NvSciBufModuleOpen() and has not yet been deallocated using NvSciBufModuleClose().
- NvSciIpcEndpoint passed as input parameter to an API is valid if it is obtained from successful call to NvSciIpcOpenEndpoint() and has not yet been freed using NvSciIpcCloseEndpointSafe().
- NvSciBufObj is valid if it is obtained from a successful call to NvSciBufObjAlloc() or if it is obtained from a successful call to NvSciBufAttrListReconcileAndObjAlloc() or if it is obtained from a successful call to NvSciBufObjIpcImport() or if it is obtained from a successful call to NvSciBufObjDup() or if it is obtained from a successful call to NvSciBufObjDupWithReducePerm() and has not been deallocated using NvSciBufObjFree().
- Unreconciled NvSciBufAttrList is valid if it is obtained from successful call to NvSciBufAttrListCreate() or if it is obtained from successful call to NvSciBufAttrListClone() where input to NvSciBufAttrListClone() is valid unreconciled NvSciBufAttrList or if it is obtained from successful call to NvSciBufAttrListIpcImportUnreconciled() and has not been deallocated using NvSciBufAttrListFree().
- Reconciled NvSciBufAttrList is valid if it is obtained from successful call to NvSciBufAttrListReconcile() or if it is obtained from successful call to NvSciBufAttrListClone() where input to NvSciBufAttrListClone() is valid reconciled NvSciBufAttrList or if it is obtained from successful call to NvSciBufAttrListIpcImportReconciled() and has not been deallocated using NvSciBufAttrListFree().
- If the valid range for the input parameter is not explicitly mentioned in the API specification or in the blanket statements then it is considered that the input parameter takes any value from the entire range corresponding to its datatype as the valid value. Please note that this also applies to the members of a structure if the structure is taken as an input parameter.
- NvSciBufModule is not sharable accross processes. User must create a new NvSciBufModule using NvSciBufModuleOpen() in every process.
- Applications need to pass attribute values in the valid range when setting attributes in an NvSciBufAttrList.
- Applications need to ensure that any non-NULL NvSciBuf structures, such as NvSciBufModule, NvSciBufAttrList, NvSciBufObj, and NvSciBuf AttrList/Object, transport descriptors passed as an input parameter to NvSciBuf APIs were returned as an output parameter by a prior successful invocation of an NvSciBuf API and those structures were not freed.
Output parameters
- In general, output parameters are passed by reference through pointers. Also, since a null pointer cannot be used to convey an output parameter, API functions typically return an error code if a null pointer is supplied for a required output parameter unless otherwise stated explicitly. Output parameter is valid only if error code returned by an API is NvSciError_Success unless otherwise stated explicitly.
Concurrency
- Every individual function can be called concurrently with itself without any side-effects unless otherwise stated explicitly in the interface specifications.
- The conditions for combinations of functions that cannot be called concurrently or calling them concurrently leads to side effects are explicitly stated in the interface specifications.