/* --------------------------App Process1 ----------------------------------*/
NvSciBufAttrList AttrList1 = NULL;
void* ListDesc = NULL;
size_t ListDescSize = 0U;
/* creation of the attribute list, receiving other lists from other listeners */
err = NvSciBufAttrListIpcExportUnreconciled(
&AttrList1, /* array of unreconciled lists to be exported */
1, /* size of the array */
ipcEndpoint, /* valid and opened NvSciIpcEndpoint intended to
send the descriptor through */
&ListDesc, /* The descriptor buffer to be allocated and filled in */
&ListDescSize ); /* size of the newly created buffer */
if (err != NvSciError_Success) {
goto fail;
}
/* send the descriptor to the process2 */
/* wait for process 1 to reconcile and export reconciled list */
err = NvSciBufAttrListIpcImportReconciled(
module, /* NvSciBuf module using which this attrlist to be
imported */
ipcEndpoint, /* valid and opened NvSciIpcEndpoint on which the
descriptor is received */
ListDesc, /* The descriptor buffer to be imported */
ListDescSize, /* size of the descriptor buffer */
&AttrList1, /* array of unreconciled lists to be used for
validating the reconciled list */
1, /* Number or unreconciled lists */
&reconciledAttrList, /* Imported reconciled list */
if (err != NvSciError_Success) {
goto fail;
}
/* --------------------------App Process2 ----------------------------------*/
void* ListDesc = NULL;
size_t ListDescSize = 0U;
NvSciBufAttrList unreconciledList[2] = {NULL};
NvSciBufAttrList reconciledList = NULL;
NvSciBufAttrList newConflictList = NULL;
NvSciBufAttrList AttrList2 = NULL;
NvSciBufAttrList importedUnreconciledAttrList = NULL;
/* create the local AttrList */
/* receive the descriptor from the other process */
err = NvSciBufAttrListIpcImportUnreconciled(module, ipcEndpoint,
ListDesc, ListDescSize,
&importedUnreconciledAttrList);
if (err != NvSciError_Success) {
goto fail;
}
/* gather all the lists into an array and reconcile */
unreconciledList[0] = AttrList2;
unreconciledList[1] = importedUnreconciledAttrList;
err = NvSciBufAttrListReconcile(unreconciledList, 2, &reconciledList,
&newConflictList);
if (err != NvSciError_Success) {
goto fail;
}
err = NvSciBufAttrListIpcExportReconciled(
&AttrList1, /* array of unreconciled lists to be
exported */
ipcEndpoint, /* valid and opened NvSciIpcEndpoint
intended to send the descriptor through */
&ListDesc, /* The descriptor buffer to be
allocated and filled in */
&ListDescSize ); /* size of the newly created
buffer */
if (err != NvSciError_Success) {
goto fail;
}