<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" 

<refentry id="msg_queue_init_ex"> <!-- ID for references -->

<refentrytitle>msg_queue_init_ex</refentrytitle> <!-- title shown in references -->
<manvolnum>3</manvolnum></refmeta> <!-- man volume id (3 for libraries) -->

<refname>msg_queue_init_ex</refname> <!-- function name -->
<refpurpose>message queue initialization</refpurpose> <!-- short function description -->

#include &lt;cds/msg_queue.h&gt; <!-- included headers -->

<funcprototype> <!-- function prototype -->
  <funcdef>int <function>msg_queue_init_ex</function></funcdef>
  <paramdef>msg_queue_t *<parameter>q</parameter></paramdef>
  <paramdef>int <parameter>synchronized</parameter></paramdef>


<para>Initializes message queue structure. The value of
<parameter>synchronized</parameter> may be 0 or 1. Zero means, that the message
queue will not use mutex for internal data access (will be NOT synchronized), 1
means that message queue will be synchronized by mutex created internaly.
<!-- detailed description -->


<refsect1><title>Return value</title>
<!-- return value description -->
Returns 0 on success, non-zero on error.

<refsect1><title>See Also</title>
<xref linkend="msg_queue_init"/>, <xref linkend="msg_queue_destroy"/>
<!-- references to other pages -->