create_message_ex
3

# create_message_ex

create and initialize message

    #include <cds/msg_queue.h>

      mq_message_t *create_message_ex
      int data_len

## Description

Allocates message with data of given size (`data_len`) using `cds_malloc`. It initializes message content so it will be freed automatically. Pointer to allocated data should be obtained by `get_message_data`.

Messages created by `create_message_ex` should be freed using `message_free`.

Unremoved messages created this way are freed automatically in `msg_queue_destroy` using `free_message`.

## Return value

Returns NULL on error, pointer to initialized message structure otherwise.

## See Also

,