init_message_ex
3

# init_message_ex

initialize message

    #include <cds/msg_queue.h>

      void init_message_ex
      mq_message_t *m
      void *data
      int data_len
      destroy_function_f func

## Description

Initializes message structure with given data and given data length like `create_message` but without its allocation.

Parameter `func` specifies function called on data pointer before freeing the message in `free_message`. It can be NULL. This function may be used for example for memory deallocation (for example may have value of `cds_free_ptr`) or some more complicated function for freeing complex data structure with pointers inside or so.

## See Also

, ,