Embedded Multicore Building Blocks V1.0.0
|
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... | |
Group attributes.
typedef struct mtapi_group_attributes_struct mtapi_group_attributes_t |
Group attributes type.
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. |
[out] | attributes | Pointer to attributes |
[out] | status | Pointer 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. |
[in,out] | attributes | Pointer to attributes |
[in] | attribute_num | Attribute id |
[in] | attribute | Pointer to attribute value |
[in] | attribute_size | Size of attribute value. may be 0, attribute is interpreted as value in that case |
[out] | status | Pointer to error code, may be MTAPI_NULL |
mtapi_int_t mtapi_group_attributes_struct::some_value |
just a placeholder