Add data to the provided data chain
int PtAddData( PtDataHdr_t **ptr, long type, long subtype, void *data, long len, PtDataRemoveF_t *remove );
This function adds a piece of data to the provided data chain. The data provided must be in a block of memory created by malloc(). This data can be retrieved by calling PtFindData(), or PtFindNextData().
The arguments are:
0 on success, or -1 if an error (e.g. out of memory) occurred.
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PtFindData(), PtFindNextData(), PtRemoveData(), PtUnlinkData()