<h1>mutex v4_0</h1><p>The Xilinx Mutex driver. This driver supports the Xilinx Mutex Core. More detailed description of the driver operation can be found in the <aclass="el"href="xmutex_8c.html">xmutex.c</a> file.</p>
<p><b>Features</b></p>
<p>The Xilinx Mutex supports the following features:</p>
<li>Provide for synchronization between multiple processors in the system.</li>
<li>Write to lock scheme with CPU ID encoded.</li>
<li>Multiple Mutex locks within a single instance of the device.</li>
<li>An optional user field within each Mutex that can be read or written to by software.</li>
</ul>
<p>This driver is intended to be RTOS and processor independent. Any needs for dynamic memory management, threads or thread mutual exclusion, virtual memory, or cache control must be satisfied by the layer above this driver. The effective address provided to the <aclass="el"href="xmutex_8c.html#a250cfb7229128feb084799a476d423d6">XMutex_CfgInitialize()</a> function can be either the real, physical address or the remapped virtual address. The remapping of this address occurs above this driver, no remapping occurs within the driver itself.</p>
<p><b>Initialization & Configuration</b></p>
<p>The <aclass="el"href="struct_x_mutex___config.html">XMutex_Config</a> structure is used by the driver to configure itself. This configuration structure is typically created by the tool-chain based on HW build properties.</p>
<p>To support multiple runtime loading and initialization strategies employed by various operating systems, the driver instance can be initialized in the following way:</p>
<li>XMutex_LookupConfig (DeviceId) - Use the device identifier to find the static configuration structure defined in XMutex_g.c. This is setup by the tools. For some operating systems the config structure will be initialized by the software and this call is not needed. This function returns the CfgPtr argument used by the CfgInitialize function described below.</li>
</ul>
<ul>
<li>XMutex_CfgInitialize (InstancePtr, ConfigPtr, EffectiveAddress) - Uses a configuration structure provided by the caller. If running in a system with address translation, the provided virtual memory base address replaces the physical address present in the configuration structure. The EffectiveAddress argument is required regardless of operating system environment, i.e. in standalone, ConfigPtr->BaseAddress is recommended and not the xparameters definition..</li>