Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
QNX Documentation Library
PtAddData

PtAddData

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

PtAddData()

Add data to the provided data chain

Synopsis:

int PtAddData( PtDataHdr_t **ptr, 
               long type,
               long subtype, 
               void *data, 
               long len, 
               PtDataRemoveF_t *remove );

Arguments:

ptr
The address of the pointer to the chain the data should be added to.
type
A unique data type.
subtype
A subtype that's used to distinguish multiple blocks of data added as the same type. This argument shouldn't be -1, because -1 has special meaning when searching for a specific block within the provided data chain.
data
A pointer to the data to be added to the provided data chain.
len
The size of the block of data added, or 0 if it isn't required.

Library:

ph

Description:

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(). You can retrieve this data by calling PtFindData(), or PtFindNextData().

Returns:

0 on success, or -1 if an error occurred (e.g. out of memory).

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PtFindData(), PtFindNextData(), PtRemoveData(), PtUnlinkData()