2.1.1-beta (revision 4703)
How to use the attribute list for writing additional attributes to event records

First create an attribute list handle.

To write your additional attribute to an event record add your attributes to an empty attribute list right before you call the routine to write the event.

attr_value.uint32 = attribute_value;
OTF2_AttributeList_AddAttribute( attribute_list, attribute_id, OTF2_TYPE_UINT32, attr_value );

Then call the routine to write the event and pass the attribute list. The additional attributes are added to the event record and will be appended when reading the event later on. Please note: All attributes in the list will be added to event record. So make sure that there are only those attributes in the attribute list that you actually like to write. Please note: After writing the event record all attributes are removed from the attribute list. So the attribute list is empty again. If you want to write identical attributes to multiple events you have to add them each time new.

OTF2_EvtWriter_WriteEnter( ..., attribute_list, ... );