Embedded Multicore Building Blocks V1.0.0
Public Types | Public Member Functions | Public Attributes | List of all members
mtapi_group_attributes_struct Struct Reference

Group attributes. More...

#include <mtapi.h>

Public Types

typedef struct mtapi_group_attributes_struct mtapi_group_attributes_t
 Group attributes type. More...
 

Public Member Functions

void mtapi_groupattr_init (mtapi_group_attributes_t *attributes, mtapi_status_t *status)
 This function initializes a group attributes object. More...
 
void mtapi_groupattr_set (mtapi_group_attributes_t *attributes, const mtapi_uint_t attribute_num, const void *attribute, const mtapi_size_t attribute_size, mtapi_status_t *status)
 This function sets group attribute values in a group attributes object. More...
 

Public Attributes

mtapi_int_t some_value
 just a placeholder More...
 

Detailed Description

Group attributes.

Member Typedef Documentation

Group attributes type.

Member Function Documentation

void mtapi_groupattr_init ( mtapi_group_attributes_t attributes,
mtapi_status_t *  status 
)

This function initializes a group attributes object.

A group attributes object is a container of group attributes. It is an optional argument passed to mtapi_group_create() to specify non-default group attributes when creating a task group.

To set group attributes to non-default values, the application must allocate a group attributes object of type mtapi_group_attributes_t and initialize it with a call to mtapi_groupattr_init(). The application may call mtapi_groupattr_set() to specify attribute values. Calls to mtapi_groupattr_init() have no effect on group attributes after the group has been created. The mtapi_group_attributes_t object may safely be deleted by the application after the call to mtapi_group_create().

On success, *status is set to MTAPI_SUCCESS. On error, *status is set to the appropriate error defined below.

Error code Description
MTAPI_ERR_PARAMETER Invalid attributes parameter.
MTAPI_ERR_NODE_NOTINIT The calling node is not initialized.
See also
mtapi_group_create(), mtapi_groupattr_set()
Concurrency
Not thread-safe
Parameters
[out]attributesPointer to attributes
[out]statusPointer to error code, may be MTAPI_NULL
void mtapi_groupattr_set ( mtapi_group_attributes_t attributes,
const mtapi_uint_t  attribute_num,
const void *  attribute,
const mtapi_size_t  attribute_size,
mtapi_status_t *  status 
)

This function sets group attribute values in a group attributes object.

A group attributes object is a container of group attributes, optionally passed to mtapi_group_create() to specify non-default group attributes when creating a task group.

attributes is a pointer to a group attributes object that was previously initialized with a call to mtapi_groupattr_init(). Calls to mtapi_groupattr_set() have no effect on group attributes after the group has been created. The group attributes object may safely be deleted by the application after the call to mtapi_group_create().

See the table below for a list of predefined attribute numbers and the sizes of the attribute values. The application must set attribute_size to the exact size in bytes of the attribute value. Additional attributes may be defined by the implementation.

On success, *status is set to MTAPI_SUCCESS. On error, *status is set to the appropriate error defined below.

Error code Description
MTAPI_ERR_ATTR_READONLY Attribute cannot be modified.
MTAPI_ERR_PARAMETER Invalid attribute parameter.
MTAPI_ERR_ATTR_NUM Unknown attribute number.
MTAPI_ERR_ATTR_SIZE Incorrect attribute size.
MTAPI_ERR_NODE_NOTINIT The calling node is not initialized.
See also
mtapi_group_create(), mtapi_groupattr_init()
Concurrency
Not thread-safe
Parameters
[in,out]attributesPointer to attributes
[in]attribute_numAttribute id
[in]attributePointer to attribute value
[in]attribute_sizeSize of attribute value. may be 0, attribute is interpreted as value in that case
[out]statusPointer to error code, may be MTAPI_NULL

Member Data Documentation

mtapi_int_t mtapi_group_attributes_struct::some_value

just a placeholder