<div><br><span class="q"><font size="2">ACE VERSION: 5.5.8<br><br>HOST MACHINE and OPERATING SYSTEM:<br>Windows XP Professional and Enterprise Linux 5.0<br><br>Version 2002<br><br>TARGET MACHINE and OPERATING SYSTEM, if different from HOST:NO<br>
<br>COMPILER NAME AND VERSION (AND PATCHLEVEL):<br><br>Visual studio 2005<br><br>THE $ACE_ROOT/ace/config.h FILE<br><br>#include "ace/config-win32.h" for windows<br><br>#include "ace/config-linux.h" for linux<br>
<br>DOES THE PROBLEM AFFECT:<br><br> COMPILATION? NO<br> LINKING? NO<br><br> EXECUTION? YES<br><br> OTHER<br><br> SYNOPSIS:</font></span></div>
<div><span class="q"><font size="2">Thanks for the Guidance.</font></span></div>
<div><span class="q"><font size="2">I have made the copy of <font color="#550055" size="2">ACE_ROOT/tests/Process_Mutex_Test.cpp and </font>when i m trying to run ACE_ROOT/tests/Process_Mutex_Test.cpp by modifying the ACE_Process_Mutex to ACE_RW_Process_mutex with command line arguments as <strong>-n mutex</strong> , I m getting <strong>abort status</strong> after the parent has spawned the first child process,acquired the mutex,worked for somewhile and released the mutex.</font></span></div>
<div><span class="q"><font size="2">DESCRIPTIOM</font></span></div>
<div><span class="q"><font size="2">I want to have a the multiple readers to have <strong>simulatenous access to a shared data</strong>.</font></span></div>
<div><span class="q"><font size="2">Is there any count we can maintain to have the number of active readers(reader processes)</font></span></div>
<div><span class="q"><font size="2"></font></span> </div>
<div><span class="q"><font size="2">Thanks</font></span></div>
<div><span class="q"><font size="2">Kul</font></span></div>
<div><span class="q"><font size="2"></font></span> </div>
<div><span class="q"><font size="2"></font></span> </div>
<div><span class="gmail_quote"><font size="2">On 3/10/08, <b class="gmail_sendername">Douglas C. Schmidt</b> <<a href="mailto:schmidt@dre.vanderbilt.edu">schmidt@dre.vanderbilt.edu</a>> wrote:</font></span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><font size="2">Hi,<br><br>Thanks for using the PRF.<br><br>>> ACE VERSION: 5.5.8<br><br>BTW, please upgrade to ACE+TAO+CIAO x.6.3 (i.e., ACE 5.6.3, TAO 1.6.3,<br>
and CIAO 0.6.3), which you can download from<br><br><a href="http://download.dre.vanderbilt.edu">http://download.dre.vanderbilt.edu</a><br><br>under the heading: "Latest Beta Kit."<br><br>The DOC groups at Washington University, UC Irvine, and Vanderbilt<br>
University only provide "best effort" support for non-sponsors for the<br>latest release, as described in<br><br><a href="http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/docs/ACE-bug-process.html">http://www.dre.vanderbilt.edu/~schmidt/DOC_ROOT/ACE/docs/ACE-bug-process.html</a><br>
<br>Thus, if you need more "predictable" help for earlier versions of<br>ACE+TAO, I recommend that you check out<br><br><a href="http://www.dre.vanderbilt.edu/support.html">http://www.dre.vanderbilt.edu/support.html</a><br>
<br>for a list of companies that will provide you with ACE+TAO commercial<br>support.<br><br>>> HOST MACHINE and OPERATING SYSTEM:<br>>> Windows XP Professional and Enterprise Linux 5.0<br>>><br>>> Version 2002<br>
>><br>>> TARGET MACHINE and OPERATING SYSTEM, if different from HOST:NO<br>>><br>>> COMPILER NAME AND VERSION (AND PATCHLEVEL):<br>>><br>>> Visual studio 2005<br>>><br>>> THE $ACE_ROOT/ace/config.h FILE<br>
>><br>>> #include "ace/config-win32.h" for windows<br>>><br>>> #include "ace/config-linux.h" for linux<br>>><br>>> DOES THE PROBLEM AFFECT:<br>>><br>>> COMPILATION? NO<br>
>> LINKING? NO<br>>><br>>> EXECUTION? YES<br>>><br>>> OTHER<br>>><br>>> SYNOPSIS:<br>>> Adding a sleep(0) after the statement of releasing mutex ,single writer<br>
>> and reader is in sync.<br>>><br>>can u pl;ease let me know how to use the the ACE_RW_Process_mutex for<br>>multiple readers.??<br>><br>><br>>><br>>> DESCRIPTION.<br>>> I am writing the code below.<br>
>><br>><br>>I want to implement the same for multiple readers.can u please hint me about<br>>the same or if there is any sample of using ACE_RW_Process_mutex.<br><br>I don't think there are any examples of ACE_RW_Process_Mutex, so I<br>
recommend you make a copy of<br><br>ACE_ROOT/tests/Process_Mutex_Test.cpp<br><br>and update it to use ACE_RW_Process_Mutex. Again, if you need more<br>help, I recommend that you check out<br><br><a href="http://www.dre.vanderbilt.edu/support.html">http://www.dre.vanderbilt.edu/support.html</a><br>
<br>for a list of companies that will provide you with ACE+TAO commercial<br>support.<br><br>Thanks,<br><br> Doug<br><br>> int ACE_TMAIN (int argc, ACE_TCHAR *argv[])<br>>><br>>><br>>> {<br>>><br>
>> int count =0;<br>>><br>>> float ltime=0;<br>>><br>>> ACE_RW_Process_Mutex m_RWMutex(ACE_TEXT("MyMutex"));<br>>><br>>> if (agrc == 1) // For server which is writing<br>
>><br>>> {<br>>><br>>> while (1)<br>>><br>>> {<br>>><br>>> if (m_RWMutex.acquire_write() == 0)<br>>><br>>> {<br>>><br>
>> ltime = ::GetTickCount(); //number of millisec since the<br>>> system has started<br>>><br>>> ACE_OS::printf("Writer acquired...%d at:<br>>> %f\n",count++,ltime);<br>
>><br>>> ACE_OS::sleep(2);<br>>><br>>> ltime = ::GetTickCount();<br>>><br>>> ACE_OS::printf("Writer releasing... ...%d at:<br>>> %f\n",count++,ltime);<br>
>><br>>> m_RWMutex.release();<br>>><br>><br>> ACE_OS::sleep(0);<br>><br>><br>> }<br>>><br>>> }<br>>><br>>> }<br>>><br>
>> else //For Client which is reading<br>>><br>>> {<br>>><br>>> while (1)<br>>><br>>> {<br>>><br>>> if (m_RWMutex.acquire_read() == 0)<br>
>><br>>> {<br>>><br>>> ltime = ::GetTickCount();<br>>><br>>> ACE_OS::printf("Reader acquired... ...%d at:<br>>> %f\n",count++,ltime);<br>
>><br>>> ACE_OS::sleep(2);<br>>><br>>> ltime = ::GetTickCount();<br>>><br>>> ACE_OS::printf("Reader releasing...%d at:<br>>> %f\n",count++,ltime);<br>
>><br>>> m_RWMutex.release();<br>>><br>><br>>ACE_OS::sleep(0);<br>><br>> }<br>>><br>>> }<br>>><br>>> }<br>>><br>>> return 0;<br>
>><br>>> }<br>>><br>>> OUTPUT is like this(WITH ACE_RW_Process_Mutex):<br>>><br>>><br>>><br>>> Writer count TimeStamp(in millisec)<br>>><br>>><br>
>> writer acquired 0 at 88110592<br>>><br>>> writer released 0 at 88112592<br>>><br>>> writer acquired 1 at 88112592<br>>><br>>> writer released 1 at 88114592<br>
>><br>>> writer acquired 2 at 88114592<br>>><br>>> writer released 2 at 88116592<br>>><br>>> writer acquired 3 at 88116592<br>>><br>>> writer released 3 at 88118592<br>
>><br>>><br>>><br>>> Reader<br>>><br>>> Reader acquired 0 at 88112872<br>>><br>>> Reader released 0 at 88114872<br>>><br>>> Reader acquired 1 at 88114872<br>
>><br>>> Reader released 1 at 88116872<br>>><br>>> Reader acquired 2 at 88116872<br>>><br>>> Reader released 2 at 88118872<br>>><br>>> Reader acquired 3 at 88118872<br>
>><br>>><br>>><br>>><br>>><br>>> OUTPUT is like this (WITH ACE_Process_Mutex):<br>>><br>>><br>>><br>>> Writer count TimeStamp(in millisec)<br>>><br>
>><br>>><br>>> writer acquired 0 at 88560984<br>>><br>>> writer released 0 at 88562984<br>>><br>>> writer acquired 1 at 88562984<br>>><br>>> writer released 1 at 88564984<br>
>><br>>> writer acquired 2 at 88566984<br>>><br>>> writer released 2 at 88568984<br>>><br>>> writer acquired 3 at 88570984<br>>><br>>> writer released 3 at 88572984<br>
>><br>>><br>>><br>>> Reader<br>>><br>>> Reader acquired 0 at 88564984<br>>><br>>> Reader released 0 at 88566984<br>>><br>>> Reader acquired 1 at 88568984<br>
>><br>>> Reader released 1 at 88570984<br>>><br>>> Reader acquired 2 at 88572984<br>>><br>>> Reader released 2 at 88574984<br>>><br>>> Reader acquired 3 at 88576984<br>
>><br>>> Reader released 3 at 88578984<br>>><br>>><br>>><br>>> Thanks<br>>><br>>> Kul<br>>><br>>><br>>> On 3/4/08, Douglas C. Schmidt <<a href="mailto:schmidt@dre.vanderbilt.edu">schmidt@dre.vanderbilt.edu</a>> wrote:<br>
>> ><br>>> > Hi,<br>>> ><br>>> > Thanks for using the PRF.<br>>> ><br>>> > >ACE VERSION: 5.5.8<br>>> > ><br>>> > >HOST MACHINE and OPERATING SYSTEM:<br>
>> > >Windows XP Professional and Enterprise Linux 5.0<br>>> > ><br>>> > >Version 2002<br>>> > ><br>>> > >TARGET MACHINE and OPERATING SYSTEM, if different from HOST:NO<br>
>> > ><br>>> > >COMPILER NAME AND VERSION (AND PATCHLEVEL):<br>>> > ><br>>> > >Visual studio 2005<br>>> > ><br>>> > >THE $ACE_ROOT/ace/config.h FILE<br>
>> > ><br>>> > >#include "ace/config-win32.h" for windows<br>>> > ><br>>> > >#include "ace/config-linux.h" for linux<br>>> > ><br>>> > >DOES THE PROBLEM AFFECT:<br>
>> > ><br>>> > > COMPILATION? NO<br>>> > ><br>>> > > LINKING? NO<br>>> > ><br>>> > > EXECUTION? YES<br>>> > ><br>
>> > > OTHER<br>>> > ><br>>> > > SYNOPSIS:<br>>> > ><br>>> > >Use of ACE_RW_Process_Mutex.I developed a very simple program which<br>>> > needs to<br>
>> > >be extended for Multiple readers and single writer ( shared memory<br>>> > concept<br>>> > >using a Hash Map with allocator)<br>>> > ><br>>> > >Even a single Reader and single writer are not getting<br>
>> > >syncronized.Pleaseprovide with a sample program of<br>>> > >ACE_RW_Process_Mutex.<br>>> > ><br>>> > ><br>>> > ><br>>> > >DESCRIPTION:<br>>> > ><br>
>> > >After having a look into ACE_ROOT/examples/Threads ,I implemented the<br>>> > >following code using ACE_RW_Process_Mutex. and run in both Windows and<br>>> > >linux5.0. But in both the cases the synchronization is not happening .<br>
>> > ><br>>> > >Yes I have tried with ACE_Process_Mutex.Its working Fine in Windows<br>>> > >and linux.I m attaching the code of ACE_Process_Mutex along with its<br>>> > >output and also of ACE_RW_Process_Mutex along with its output<br>
>> > ><br>>> > >The Code is written as below (WITH ACE_RW_Process_Mutex)<br>>> > ><br>>> > >int ACE_TMAIN (int argc, ACE_TCHAR *argv[])<br>>> > ><br>>> > >{<br>
>> > ><br>>> > >int count =0;<br>>> > ><br>>> > >float ltime=0;<br>>> ><br>>> > BTW, I recommend you use<br>>> ><br>>> > ACE_RW_Process_Mutex m_RWMutex;<br>
>> ><br>>> > if (m_RWMutex.open (ACE_TEXT("MyMutex")) == -1)<br>>> > ACE_DEBUG ((LM_ERROR, "%p\n", "RWMutex::open"));<br>>> ><br>>> > to make sure that the open isn't failing.<br>
>> ><br>>> > > ACE_RW_Process_Mutex m_RWMutex(ACE_TEXT("MyMutex"));<br>>> > ><br>>> > > if (agrc == 1) // For server which is writing<br>>> > ><br>
>> > > {<br>>> > ><br>>> > > while (1)<br>>> > ><br>>> > > {<br>>> > ><br>>> > > if (m_RWMutex.acquire_write() == 0)<br>
>> > ><br>>> > > {<br>>> > ><br>>> > > ltime = ::GetTickCount();<br>>> > ><br>>> > > ACE_OS::printf("Writer acquired...%d at:<br>
>> > >%f\n",count++,ltime);<br>>> > ><br>>> > > ACE_OS::sleep(2);<br>>> > ><br>>> > > ltime = ::GetTickCount();<br>>> > ><br>
>> > > ACE_OS::printf("Writer releasing... ...%d at:<br>>> > >%f\n",count++,ltime);<br>>> > ><br>>> > > m_RWMutex.release();<br>>> > ><br>
>> > > }<br>>> > ><br>>> > > }<br>>> > ><br>>> > > }<br>>> > ><br>>> > > else //For Client which is reading<br>
>> > ><br>>> > > {<br>>> > ><br>>> > > while (1)<br>>> > ><br>>> > > {<br>>> > ><br>>> > > if (m_RWMutex.acquire_read() == 0)<br>
>> > ><br>>> > > {<br>>> > ><br>>> > > ltime = ::GetTickCount();<br>>> > ><br>>> > > ACE_OS::printf("Reader acquired... ...%d at:<br>
>> > >%f\n",count++,ltime);<br>>> > ><br>>> > > ACE_OS::sleep(2);<br>>> > ><br>>> > > ltime = ::GetTickCount();<br>>> > ><br>
>> > > ACE_OS::printf("Reader releasing...%d at:<br>>> > >%f\n",count++,ltime);<br>>> > ><br>>> > > m_RWMutex.release();<br>>> > ><br>
>> > > }<br>>> > ><br>>> > > }<br>>> > ><br>>> > > }<br>>> > ><br>>> > > return 0;<br>>> > ><br>>> > >}<br>
>> ><br>>> > I can't figure out what the difference is between the two outputs with<br>>> > a cursory look. Can you please explain why you think the<br>>> > RW_Process_Mutex isn't working whereas the Process_Mutex is working?<br>
>> ><br>>> > Thanks,<br>>> ><br>>> > Doug<br>>> ><br>>> > >output is like this(WITH ACE_RW_Process_Mutex):<br>>> > ><br>>> > >Writer<br>
>> > ><br>>> > >writer acquired 0 at 88110592<br>>> > ><br>>> > >writer released 0 at 88112592<br>>> > ><br>>> > >writer acquired 1 at 88112592<br>
>> > ><br>>> > >writer released 1 at 88114592<br>>> > ><br>>> > >writer acquired 2 at 88114592<br>>> > ><br>>> > >writer released 2 at 88116592<br>
>> > ><br>>> > >writer acquired 3 at 88116592<br>>> > ><br>>> > >writer released 3 at 88118592<br>>> > ><br>>> > ><br>>> > ><br>
>> > >Reader<br>>> > ><br>>> > >Reader acquired 0 at 88112872<br>>> > ><br>>> > >Reader released 0 at 88114872<br>>> > ><br>>> > >Reader acquired 1 at 88114872<br>
>> > ><br>>> > >Reader released 1 at 88116872<br>>> > ><br>>> > >Reader acquired 2 at 88116872<br>>> > ><br>>> > >Reader released 2 at 88118872<br>
>> > ><br>>> > >Reader acquired 3 at 88118872<br>>> > ><br>>> > ><br>>> > ><br>>> > ><br>>> > ><br>>> > >output is like this (WITH ACE_Process_Mutex):<br>
>> > ><br>>> > >Writer<br>>> > ><br>>> > >writer acquired 0 at 88560984<br>>> > ><br>>> > >writer released 0 at 88562984<br>>> > ><br>
>> > >writer acquired 1 at 88562984<br>>> > ><br>>> > >writer released 1 at 88564984<br>>> > ><br>>> > >writer acquired 2 at 88566984<br>>> > ><br>
>> > >writer released 2 at 88568984<br>>> > ><br>>> > >writer acquired 3 at 88570984<br>>> > ><br>>> > >writer released 3 at 88572984<br>
>> > ><br>>> > ><br>>> > ><br>>> > >Reader<br>>> > ><br>>> > >Reader acquired 0 at 88564984<br>>> > ><br>>> > >Reader released 0 at 88566984<br>
>> > ><br>>> > >Reader acquired 1 at 88568984<br>>> > ><br>>> > >Reader released 1 at 88570984<br>>> > ><br>>> > >Reader acquired 2 at 88572984<br>
>> > ><br>>> > >Reader released 2 at 88574984<br>>> > ><br>>> > >Reader acquired 3 at 88576984<br>>> > ><br>>> > >Reader released 3 at 88578984<br>
>> > ><br>>> > ><br>>> > ><br>>> > ><br>>> > >On 3/3/08, Matthew Gillen <<a href="mailto:mgillen@bbn.com">mgillen@bbn.com</a>> wrote:<br>>> > >><br>
>> > >> kul gupta wrote:<br>>> > >> > After having a look into ACE_ROOT/examples/Threads ,I implemented<br>>> > the<br>>> > >> > following code using ACE_RW_Process_Mutex. and run in both Windows<br>
>> > and<br>>> > >> > linux5.0. But in both the cases the synchronization is not<br>>> > happening .<br>>> > >><br>>> > >> It would help if were more specific about what actually /is/<br>
>> > >> happening. Do<br>>> > >> you see the output messages in the wrong order? Do you never see<br>>> > some<br>>> > >> output messages?<br>>> > >><br>
>> > >> Matt<br>>> > >><br>>> > ><br>>> > >------=_Part_37_22204605.1204610511961<br>>> > >Content-Type: text/html; charset=ISO-8859-1<br>>> > >Content-Transfer-Encoding: 7bit<br>
>> > >Content-Disposition: inline<br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="courier<br>>> > new,monospace"><font size="1"><span style="FONT-SIZE: 10pt; FONT-FAMILY:<br>
>> > Arial">Subject: </span><span style="FONT-SIZE: 10pt; FONT-FAMILY:<br>>> > &#39;Courier New&#39;">ACE_RW_Process_Mutex in single writer and multiple<br>>> > readers</span><span style="FONT-SIZE: 9.5pt; FONT-FAMILY:<br>
>> > Arial"></span></font></font></p><br>>> > ><pre><font face="courier new,monospace"><font size="1"><span<br>>> > style="FONT-FAMILY: Arial">ACE VERSION</span>: 5.5.8</font></font></pre><br>
>> > ><div><font face="courier new,monospace"><font size="1"><span<br>>> > style="FONT-FAMILY: Arial">HOST MACHINE and OPERATING<br>>> > SYSTEM</span>:</font></font></div><br>
>> > ><div><font face="courier new,monospace" size="1">Windows XP<br>>> > Professional and Enterprise Linux 5.0</font></div><pre><font<br>>> > face="courier new,monospace" size="1">Version 2002</font></pre><pre><font<br>
>> > face="courier new,monospace" size="1">TARGET MACHINE and OPERATING SYSTEM,<br>>> > if different from HOST:NO</font></pre><br>>> > ><pre><font face="courier new,monospace"><font size="1"><span<br>
>> > style="FONT-FAMILY: Arial">COMPILER NAME AND VERSION</span> (AND<br>>> > PATCHLEVEL):</font></font></pre><pre><font face="courier new,monospace"<br>
>> > size="1">Visual studio 2005</font></pre><br>>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><font face="courier new,monospace"><font<br>
>> > size="1"><span style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">THE<br>>> > $ACE_ROOT/ace/config.h FILE </span><span style="FONT-SIZE: 9.5pt;<br>>> > FONT-FAMILY: Arial"></span></font></font></p><br>
>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">#include &quot;ace/config-win32.h&quot;&nbsp;&nbsp; for<br>>> > windows</font></font></span></p><br>>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">#include &quot;ace/config-linux.h&quot;&nbsp;&nbsp; for<br>
>> > linux</font></font></span></p><br>>> > ><pre><font face="courier new,monospace"><font size="1"><span<br>>> > style="FONT-FAMILY: Arial">DOES THE PROBLEM<br>
>> > AFFECT</span>:</font></font></pre><pre><font face="courier new,monospace"<br>>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COMPILATION? &nbsp;<br>
>> > NO</font></pre><br>>> > ><pre><font face="courier new,monospace"<br>>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LINKING?&nbsp;<br>
>> > &nbsp;&nbsp;&nbsp;&nbsp; NO</font></pre><pre><font face="courier<br>>> > new,monospace" size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
>> > EXECUTION?&nbsp;&nbsp;&nbsp;&nbsp; YES</font></pre><pre><font face="courier<br>>> > new,monospace" size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OTHER<br>
>> > &nbsp;</font></pre><br>>> > ><pre><font face="courier new,monospace" size="1">&nbsp;&nbsp;&nbsp;<br>>> > <span style="FONT-FAMILY: Arial">SYNOPSIS</span>:</font></pre><br>
>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">Use of ACE_RW_Process_Mutex.I developed a very simple program which<br>>> > needs to be extended for Multiple readers and single writer ( shared memory<br>>> > concept using a Hash Map with allocator)</font></font></span></p><br>
>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">Even a single Reader and single writer are not getting<br>>> > syncronized.Please provide with a sample program of<br>>> > ACE_RW_Process_Mutex.</font></font></span></p><br>
>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><font face="courier new,monospace"><font<br>>> > size="1"><span style="FONT-SIZE: 10pt; FONT-FAMILY:<br>
>> > Arial">&nbsp;</span><span style="FONT-SIZE: 9.5pt; FONT-FAMILY:<br>>> > Arial"></span></font></font></p><pre><br>>> > ><font face="courier new,monospace"><font size="1"><span<br>
>> > style="FONT-FAMILY: Arial">DESCRIPTION</span>:</font></font></pre><pre><font<br>>> > face="courier new,monospace" size="1">After having a look into<br>
>> > ACE_ROOT/examples/Threads ,I implemented the following code using<br>>> > ACE_RW_Process_Mutex. and run in both Windows and linux5.0. But in both<br>>> > the cases the synchronization is not happening .</font></pre><br>
>> > ><pre><font face="courier new,monospace" size="1">Yes I have tried with<br>>> > ACE_Process_Mutex.Its working Fine in Windows and linux.I m attaching<br>>> > the code of ACE_Process_Mutex along with its output<span<br>
>> > style="mso-spacerun: yes">&nbsp; </span>and also of ACE_RW_Process_Mutex<br>>> > along with its output</font></pre><br>>> > ><pre><font face="courier new,monospace" size="1">The Code is written as<br>
>> > below<span style="mso-spacerun: yes">&nbsp; </span>(WITH<br>>> > ACE_RW_Process_Mutex)</font></pre><pre><font face="courier<br>>> > new,monospace"><font size="1">int ACE_TMAIN (int argc, ACE_TCHAR<br>
>> > *argv[])</font></font></pre><br>>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">{</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">int count =0;</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">float ltime=0;</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp; ACE_RW_Process_Mutex<br>>> > m_RWMutex(ACE_TEXT(&quot;MyMutex&quot;));</font></font></span></p><br>>> > ><br>
>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp; if (agrc == 1)<span style="mso-tab-count:<br>>> > 3">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
>> > </span>// For server which is writing</font></font></span></p><br>>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">&nbsp;&nbsp;&nbsp; {</font></font></span></p><br>
>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while<br>>> > (1)</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
>> > {</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if<br>>> > (m_RWMutex.acquire_write() == 0)</font></font></span></p><br>
>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>>> > {</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1"><span style="mso-tab-count:<br>>> > 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
>> > </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>ltime =<br>>> > ::GetTickCount();</font></font></span></p><br>>> > ><br>
>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>>> > ACE_OS::printf(&quot;Writer acquired...%d<span style="mso-spacerun:<br>
>> > yes">&nbsp; </span>at: %f\n&quot;,count++,ltime);</font></font></span></p><br>>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
>> > ACE_OS::sleep(2);</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1"><span style="mso-tab-count:<br>>> > 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>>> > </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>ltime =<br>
>> > ::GetTickCount();</font></font></span></p><br>>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>>> > ACE_OS::printf(&quot;Writer releasing... ...%d<span style="mso-spacerun:<br>
>> > yes">&nbsp; </span>at: %f\n&quot;,count++,ltime);</font></font></span></p><br>>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
>> > m_RWMutex.release();</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>>> > }</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
>> > }</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp; }</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">&nbsp;&nbsp;&nbsp; else<span style="mso-tab-count:<br>
>> > 4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
>> > </span>//For Client which is reading </font></font></span></p><br>>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">&nbsp;&nbsp;&nbsp; {</font></font></span></p><br>
>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while<br>>> > (1)</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
>> > {</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if<br>>> > (m_RWMutex.acquire_read() == 0)</font></font></span></p><br>
>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>>> > {</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ltime<br>
>> > = ::GetTickCount(); </font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1"><span style="mso-tab-count:<br>>> > 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>>> > </span><span style="mso-spacerun: yes">&nbsp;&nbsp;<br>
>> > </span>ACE_OS::printf(&quot;Reader acquired... ...%d<span<br>>> > style="mso-spacerun: yes">&nbsp; </span>at:<br>>> > %f\n&quot;,count++,ltime);</font></font></span></p><br>
>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>>> > ACE_OS::sleep(2);</font></font></span></p><br>
>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1"><span style="mso-tab-count:<br>>> > 2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>>> > </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>ltime =<br>
>> > ::GetTickCount();</font></font></span></p><br>>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>>> > ACE_OS::printf(&quot;Reader releasing...%d<span style="mso-spacerun:<br>
>> > yes">&nbsp; </span>at: %f\n&quot;,count++,ltime);</font></font></span></p><br>>> > ><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
>> > m_RWMutex.release();</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>>> > }</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>
>> > }</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">&nbsp;&nbsp;&nbsp; }</font></font></span></p><br>>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>
>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>>> > size="1">&nbsp;&nbsp;&nbsp; return 0;</font></font></span></p><br>
>> > ><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt;<br>>> > FONT-FAMILY: &#39;Courier New&#39;"><font face="courier new,monospace"><font<br>
>> > size="1">}</font></font></span></p><pre><font face="courier new,monospace"<br>>> > size="1">output is like this(WITH ACE_RW_Process_Mutex):</font></pre><br>
>> > ><pre><font face="courier new,monospace" size="1">Writer </font></pre><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>0 <span<br>>> > style="mso-tab-count: 1">&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88110592</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>0 <span<br>>> > style="mso-tab-count: 1">&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88112592</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>1<span<br>>> > style="mso-spacerun: yes">&nbsp; </span><span style="mso-tab-count:<br>
>> > 1">&nbsp; </span>at<span style="mso-spacerun: yes">&nbsp;&nbsp;<br>>> > </span>88112592</font></font></span></p><br>>> > ><br>
>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>1<span<br>>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span><span style="mso-tab-count:<br>
>> > 1"></span>at<span style="mso-spacerun: yes">&nbsp;&nbsp;<br>>> > </span>88114592</font></font></span></p><br>>> > ><br>
>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>2<span<br>>> > style="mso-spacerun: yes">&nbsp; </span><span style="mso-tab-count:<br>
>> > 1">&nbsp; </span>at<span style="mso-spacerun: yes">&nbsp;&nbsp;<br>>> > </span>88114592</font></font></span></p><br>>> > ><br>
>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>2<span<br>>> > style="mso-spacerun: yes">&nbsp; </span><span style="mso-tab-count:<br>
>> > 1">&nbsp; </span>at<span style="mso-spacerun: yes">&nbsp;&nbsp;<br>>> > </span>88116592</font></font></span></p><br>>> > ><br>
>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>3 <span<br>>> > style="mso-tab-count: 1">&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88116592</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer released <span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;</span>3 <span<br>>> > style="mso-tab-count: 1">&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88118592</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="courier<br>
>> > new,monospace" size="1">&nbsp;</font></p><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="courier<br>>> > new,monospace" size="1">Reader</font></p><br>
>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>0<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88112872</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>0<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88114872</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88114872</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88116872</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>2<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88116872</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>2<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88118872</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>3<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88118872</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="courier<br>
>> > new,monospace" size="1">&nbsp;</font></p><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="courier<br>>> > new,monospace" size="1">&nbsp;</font></p><br>
>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="courier<br>>> > new,monospace" size="1">output is like this (WITH<br>>> > ACE_Process_Mutex):</font></p><br>
>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="courier<br>>> > new,monospace" size="1">Writer </font></p><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>0 <span<br>>> > style="mso-tab-count: 1">&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp;&nbsp; </span>88560984</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>0 <span<br>>> > style="mso-tab-count: 1">&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88562984</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>1<span<br>>> > style="mso-spacerun: yes">&nbsp; </span><span style="mso-tab-count:<br>
>> > 1">&nbsp; </span>at<span style="mso-spacerun: yes">&nbsp;&nbsp;<br>>> > </span>88562984</font></font></span></p><br>>> > ><br>
>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>1<span<br>>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span><span style="mso-tab-count:<br>
>> > 1"></span>at<span style="mso-spacerun: yes">&nbsp;&nbsp;<br>>> > </span>88564984</font></font></span></p><br>>> > ><br>
>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>2<span<br>>> > style="mso-spacerun: yes">&nbsp; </span><span style="mso-tab-count:<br>
>> > 1">&nbsp; </span>at<span style="mso-spacerun: yes">&nbsp;&nbsp;<br>>> > </span>88566984</font></font></span></p><br>>> > ><br>
>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>2<span<br>>> > style="mso-spacerun: yes">&nbsp; </span><span style="mso-tab-count:<br>
>> > 1">&nbsp; </span>at <span style="mso-spacerun:<br>>> > yes">&nbsp;&nbsp;</span>88568984</font></font></span></p><br>>> > ><br>
>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>3 <span<br>>> > style="mso-tab-count: 1">&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88570984</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">writer released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp; </span>3 <span<br>>> > style="mso-tab-count: 1">&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88572984</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="courier<br>
>> > new,monospace" size="1">&nbsp;</font></p><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="courier<br>>> > new,monospace" size="1">Reader</font></p><br>
>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>0<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88564984</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>0<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88566984</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88568984</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>1<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88570984</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>2<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88572984</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader released<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>2<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88574984</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace"><font size="1">Reader acquired<span<br>
>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>3<span style="mso-tab-count:<br>>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>
>> > yes">&nbsp;&nbsp; </span>88576984</font></font></span></p><br>>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><span<br>
>> > style="FONT-SIZE: 10pt; FONT-FAMILY: &#39;Courier New&#39;"><font<br>>> > face="courier new,monospace" size="1">Reader released<span<br>>> > style="mso-spacerun: yes">&nbsp;&nbsp; </span>3<span style="mso-tab-count:<br>
>> > 1">&nbsp;&nbsp;&nbsp;&nbsp; </span>at<span style="mso-spacerun:<br>>> > yes">&nbsp;&nbsp; </span>88578984</font></span></p><br>
>> > ><br>>> > ><p class="MsoNormal" style="MARGIN: 0in 0in 0pt"><font face="courier<br>>> > new,monospace" size="1">&nbsp;</font></p><br><br><br>
>> > ><div><span class="gmail_quote"><font face="courier new,monospace"<br>>> > size="1">On 3/3/08, <b class="gmail_sendername">Matthew Gillen</b> &lt;<a<br>
>> > href="mailto:<a href="mailto:mgillen@bbn.com">mgillen@bbn.com</a>"><a href="mailto:mgillen@bbn.com">mgillen@bbn.com</a></a>&gt;<br>>> > wrote:</font></span><br>>> > ><blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px<br>
>> > 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><font face="courier<br>>> > new,monospace" size="1">kul gupta wrote:<br>&gt; After having a look into<br>>> > ACE_ROOT/examples/Threads ,I implemented the<br><br>
>> > >&gt; following code using ACE_RW_Process_Mutex. and run in both Windows<br>>> > and<br>&gt; linux5.0. But in both the cases the synchronization is not<br>>> > happening .<br><br>It would help if were more specific about what actually<br>
>> > /is/ happening.&nbsp;&nbsp;Do<br><br>>> > >you see the output messages in the wrong order?&nbsp;&nbsp;Do you never<br>>> > see some<br>output messages?<br><br>Matt<br></font></blockquote></div><br><br>
>> > ><br>>> > >------=_Part_37_22204605.1204610511961--<br>>> > ><br>>> ><br>>> ><br>>> > --<br>>> > Dr. Douglas C. Schmidt Professor and Associate<br>
>> > Chair<br>>> > Electrical Engineering and Computer Science TEL: (615) 343-8197<br>>> > Vanderbilt University WEB:<br>>> > <a href="http://www.dre.vanderbilt.edu/~schmidt">www.dre.vanderbilt.edu/~schmidt</a><br>
>> > Nashville, TN 37203 NET:<br>>> > <a href="mailto:d.schmidt@vanderbilt.edu">d.schmidt@vanderbilt.edu</a><br>>> ><br>>><br>>><br>><br>>------=_Part_7130_8139674.1205128337979<br>
>Content-Type: text/html; charset=ISO-8859-1<br>>Content-Transfer-Encoding: 7bit<br>>Content-Disposition: inline<br>><br>><div><br>><blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>
><div>&nbsp;</div><br>><div><font color="#550055" size="1"></font>&nbsp;</div><br>><div><font color="#550055" size="1">ACE VERSION: 5.5.8<br><br>HOST MACHINE and OPERATING SYSTEM:<br>Windows XP Professional and Enterprise Linux 5.0<br><br>Version 2002<br><br>TARGET MACHINE and OPERATING SYSTEM, if different from HOST:NO<br><br>
><br>COMPILER NAME AND VERSION (AND PATCHLEVEL):<br><br>Visual studio 2005<br><br>THE $ACE_ROOT/ace/config.h FILE<br><br>#include &quot;ace/config-win32.h&quot; &nbsp; for windows<br><br>#include &quot;ace/config-linux.h&quot; &nbsp; for linux<br><br>
><br>DOES THE PROBLEM AFFECT:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;COMPILATION? &nbsp; NO<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LINKING? &nbsp; &nbsp; &nbsp; NO<br><br>&nbsp;&nbsp;&nbsp;EXECUTION? &nbsp; &nbsp; YES<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OTHER<br><br>&nbsp;&nbsp;&nbsp;SYNOPSIS:<br>Adding a sleep(0) after the statement of&nbsp;releasing mutex ,single writer and reader is in sync.</font></div><br>
></blockquote><br>><div>can u pl;ease let me know how to use the the ACE_RW_Process_mutex for multiple readers.??</div><br><br>><blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>
><div><span style="FONT-SIZE: 10pt"><font size="1"></font></span>&nbsp;</div><br>><div style="DIRECTION: ltr"><br>><p style="MARGIN: 0in 0in 0pt"><span style="FONT-SIZE: 10pt"><font size="1">DESCRIPTION.</font></span></p></div><br>
><div><span>I am writing the code below.</span></div></blockquote><br>><div>&nbsp;</div><br>><div>I want to implement the same for multiple readers.can u please hint me about the same or if there is any sample of using ACE_RW_Process_mutex.</div><br><br>
><blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>><div><span><font size="1">&nbsp;int ACE_TMAIN (int argc, ACE_TCHAR *argv[])<br><br><br>{<br><br></font></span><span><font size="1">int count =0;<br><br>float ltime=0;<br><br></font></span><span><font size="1">&nbsp;&nbsp;&nbsp; <font style="BACKGROUND-COLOR: #33ccff">ACE_RW_Process_Mutex</font> m_RWMutex(ACE_TEXT(&quot;MyMutex&quot;));<br><br>
><br></font></span><span><font size="1">&nbsp;&nbsp;&nbsp; if (agrc == 1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // For server which is writing<br><br>&nbsp;&nbsp;&nbsp; {<br><br></font></span><font size="1"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (1)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (m_RWMutex.acquire_write() == 0)<br><br>
><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br><br></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ltime = ::GetTickCount();&nbsp; //number of millisec since the system has started<span></span> </font><span><br><br><font size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_OS::printf(&quot;Writer acquired...%d&nbsp; at: %f\n&quot;,count++,ltime);<br><br>
><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_OS::sleep(2);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ltime = ::GetTickCount();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_OS::printf(&quot;Writer releasing... ...%d&nbsp; at: %f\n&quot;,count++,ltime);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_RWMutex.release();</font></span></div><br>
></blockquote><br>><div>&nbsp;</div><br>><div><font size="1">&nbsp;ACE_OS::sleep(0);</font><br>&nbsp;</div><br><br>><blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>
><div><span><font size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; else&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //For Client which is reading <br><br>&nbsp;&nbsp;&nbsp; {<br><br></font></span><span><font size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; while (1)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br><br>
><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (m_RWMutex.acquire_read() == 0)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br><br></font></span><span><font size="1">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ltime = ::GetTickCount(); <br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; ACE_OS::printf(&quot;Reader acquired... ...%d&nbsp; at: %f\n&quot;,count++,ltime);<br><br>
><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_OS::sleep(2);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ltime = ::GetTickCount();<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_OS::printf(&quot;Reader releasing...%d&nbsp; at: %f\n&quot;,count++,ltime);<br><br></font></span><font size="1"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_RWMutex.release();</span></font></div><br>
></blockquote><br>><div>&nbsp;</div><br>><div><font size="1">ACE_OS::sleep(0);</font></div><br><br>><blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br>
><div><font size="1"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; return 0;<br><br>}</span> </font></div><br>
><div><font size="1">&nbsp;</font></div><br>><div><font size="1">OUTPUT&nbsp;&nbsp;is like this(WITH ACE_RW_Process_Mutex):<br>&nbsp;<br><br><br>Writer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TimeStamp(in millisec)&nbsp;</font><span><br><br><br><font size="1">writer acquired&nbsp;&nbsp;&nbsp; 0 &nbsp;&nbsp; at&nbsp;&nbsp; 88110592&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>
><br>writer released&nbsp;&nbsp;&nbsp; 0 &nbsp;&nbsp; at&nbsp;&nbsp; 88112592<br><br></font><font size="1"><font style="BACKGROUND-COLOR: #ffff00">writer acquired&nbsp;&nbsp;&nbsp; 1&nbsp; &nbsp; at&nbsp;&nbsp; 88112592<br><br>writer released&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; at&nbsp;&nbsp; 88114592<br></font><br>writer acquired&nbsp;&nbsp;&nbsp; 2&nbsp; &nbsp; at&nbsp;&nbsp; 88114592<br><br>
><br>writer released&nbsp;&nbsp;&nbsp; 2&nbsp; &nbsp; at&nbsp;&nbsp; 88116592<br><br>writer acquired&nbsp;&nbsp;&nbsp; 3 &nbsp;&nbsp; at&nbsp;&nbsp; 88116592<br><br>writer released &nbsp;&nbsp;&nbsp;3 &nbsp;&nbsp; at&nbsp;&nbsp; 88118592<br><br>&nbsp;<br><br>Reader<br><br></font><font size="1"><font style="BACKGROUND-COLOR: #33ff33">Reader acquired&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88112872<br><br>
><br>Reader released&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88114872<br></font><br>Reader acquired&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88114872<br><br>Reader released&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88116872<br><br>Reader acquired&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88116872<span></span> <br><br>Reader released&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88118872<br><br>
><br>Reader acquired&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88118872<br><br>&nbsp;<br><br>&nbsp;<br><br></font></span><font size="1">OUTPUT is like this (WITH ACE_Process_Mutex):<br><br>&nbsp;<br><br>Writer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; count&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TimeStamp(in millisec)</font><span><br><br>
><br><font size="1">&nbsp;<br><br></font><font size="1"><font style="BACKGROUND-COLOR: #ffff00">writer acquired&nbsp;&nbsp;&nbsp; 0 &nbsp;&nbsp; at&nbsp;&nbsp;&nbsp; 88560984<br><br>writer released&nbsp;&nbsp;&nbsp; 0 &nbsp;&nbsp; at&nbsp;&nbsp; 88562984<br><br></font>writer acquired&nbsp;&nbsp;&nbsp; 1&nbsp; &nbsp; at&nbsp;&nbsp; 88562984<br><br>
><br>writer released&nbsp;&nbsp;&nbsp; 1&nbsp;&nbsp; at&nbsp;&nbsp; 88564984<br><br>writer acquired&nbsp;&nbsp;&nbsp; 2&nbsp; &nbsp; at&nbsp;&nbsp; 88566984<br><br>writer released&nbsp;&nbsp;&nbsp; 2&nbsp; &nbsp; at &nbsp;&nbsp;88568984<br><br>writer acquired&nbsp;&nbsp;&nbsp; 3 &nbsp;&nbsp; at&nbsp;&nbsp; 88570984<br><br>writer released&nbsp;&nbsp;&nbsp; 3 &nbsp;&nbsp; at&nbsp;&nbsp; 88572984<br><br>
><br>&nbsp;<br><br>Reader<br><br></font><font size="1"><font style="BACKGROUND-COLOR: #33ff33">Reader acquired&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88564984<br><br>Reader released&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88566984<br></font><br>Reader acquired&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88568984<br><br>
><br>Reader released&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88570984<br><br>Reader acquired&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88572984<br><br>Reader released&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88574984<br><br>Reader acquired&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88576984<br><br>Reader released&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88578984<br><br>
><br>&nbsp;<br><br></font></span><font size="1">Thanks<br></font><span><br><font size="1">Kul</font></span><span><br></span></div><br><br><br>
><div><span class="gmail_quote"><font size="1">On 3/4/08, <b class="gmail_sendername">Douglas C. Schmidt</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:<a href="mailto:schmidt@dre.vanderbilt.edu">schmidt@dre.vanderbilt.edu</a>" target="_blank"><a href="mailto:schmidt@dre.vanderbilt.edu">schmidt@dre.vanderbilt.edu</a></a>&gt; wrote:</font></span><br>
><blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><font size="1">Hi,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks for using the PRF.<br><br>&gt;ACE VERSION: 5.5.8<br>&gt;<br>&gt;HOST MACHINE and OPERATING SYSTEM:<br><br>
>&gt;Windows XP Professional and Enterprise Linux 5.0<br>&gt;<br>&gt;Version 2002<br>&gt;<br>&gt;TARGET MACHINE and OPERATING SYSTEM, if different from HOST:NO<br>&gt;<br>&gt;COMPILER NAME AND VERSION (AND PATCHLEVEL):<br><br>
>&gt;<br>&gt;Visual studio 2005<br>&gt;<br>&gt;THE $ACE_ROOT/ace/config.h FILE<br>&gt;<br>&gt;#include &quot;ace/config-win32.h&quot;&nbsp;&nbsp; for windows<br>&gt;<br>&gt;#include &quot;ace/config-linux.h&quot;&nbsp;&nbsp; for linux<br>&gt;<br><br>
>&gt;DOES THE PROBLEM AFFECT:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;COMPILATION?&nbsp;&nbsp; NO<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LINKING?&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NO<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EXECUTION?&nbsp;&nbsp;&nbsp;&nbsp; YES<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OTHER<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;SYNOPSIS:<br>&gt;<br><br>
>&gt;Use of ACE_RW_Process_Mutex.I developed a very simple program which needs to<br>&gt;be extended for Multiple readers and single writer ( shared memory concept<br>&gt;using a Hash Map with allocator)<br>&gt;<br>&gt;Even a single Reader and single writer are not getting<br><br>
>&gt;syncronized.Pleaseprovide with a sample program of<br>&gt;ACE_RW_Process_Mutex.<br>&gt;<br>&gt;<br>&gt;<br>&gt;DESCRIPTION:<br>&gt;<br>&gt;After having a look into ACE_ROOT/examples/Threads ,I implemented the<br>&gt;following code using ACE_RW_Process_Mutex. and run in both Windows and<br><br>
>&gt;linux5.0. But in both the cases the synchronization is not happening .<br>&gt;<br>&gt;Yes I have tried with ACE_Process_Mutex.Its working Fine in Windows<br>&gt;and linux.I m attaching the code of ACE_Process_Mutex along with its<br><br>
>&gt;output&nbsp;&nbsp;and also of ACE_RW_Process_Mutex along with its output<br>&gt;<br>&gt;The Code is written as below&nbsp;&nbsp;(WITH ACE_RW_Process_Mutex)<br>&gt;<br>&gt;int ACE_TMAIN (int argc, ACE_TCHAR *argv[])<br>&gt;<br>&gt;{<br>&gt;<br><br>
>&gt;int count =0;<br>&gt;<br>&gt;float ltime=0;<br><br>BTW, I recommend you use<br><br>&nbsp;&nbsp;&nbsp;&nbsp;ACE_RW_Process_Mutex m_RWMutex;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;if (m_RWMutex.open (ACE_TEXT(&quot;MyMutex&quot;)) == -1)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_DEBUG ((LM_ERROR, &quot;%p\n&quot;, &quot;RWMutex::open&quot;));<br><br>
><br>to make sure that the open isn&#39;t failing.<br><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;ACE_RW_Process_Mutex m_RWMutex(ACE_TEXT(&quot;MyMutex&quot;));<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;if (agrc == 1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// For server which is writing<br>&gt;<br><br>
>&gt;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while (1)<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (m_RWMutex.acquire_write() == 0)<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ltime = ::GetTickCount();<br>&gt;<br><br>
>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ACE_OS::printf(&quot;Writer acquired...%d&nbsp;&nbsp;at:<br>&gt;%f\n&quot;,count++,ltime);<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ACE_OS::sleep(2);<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ltime = ::GetTickCount();<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ACE_OS::printf(&quot;Writer releasing... ...%d&nbsp;&nbsp;at:<br><br>
>&gt;%f\n&quot;,count++,ltime);<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_RWMutex.release();<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;else&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//For Client which is reading<br><br>
>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while (1)<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (m_RWMutex.acquire_read() == 0)<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ltime = ::GetTickCount();<br><br>
>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ACE_OS::printf(&quot;Reader acquired... ...%d&nbsp;&nbsp;at:<br>&gt;%f\n&quot;,count++,ltime);<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ACE_OS::sleep(2);<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ltime = ::GetTickCount();<br><br>
>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ACE_OS::printf(&quot;Reader releasing...%d&nbsp;&nbsp;at:<br>&gt;%f\n&quot;,count++,ltime);<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_RWMutex.release();<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&gt;<br><br>
>&gt;&nbsp;&nbsp;&nbsp;&nbsp;}<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;return 0;<br>&gt;<br>&gt;}<br><br>I can&#39;t figure out what the difference is between the two outputs with<br>a cursory look.&nbsp;&nbsp;Can you please explain why you think the<br>RW_Process_Mutex isn&#39;t working whereas the Process_Mutex is working?<br><br>
><br>Thanks,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Doug<br><br>&gt;output is like this(WITH ACE_RW_Process_Mutex):<br>&gt;<br>&gt;Writer<br>&gt;<br>&gt;writer acquired&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88110592<br>&gt;<br>&gt;writer released&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88112592<br><br>
>&gt;<br>&gt;writer acquired&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88112592<br>&gt;<br>&gt;writer released&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp; at&nbsp;&nbsp; 88114592<br>&gt;<br>&gt;writer acquired&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88114592<br>&gt;<br>&gt;writer released&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88116592<br>&gt;<br>&gt;writer acquired&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88116592<br><br>
>&gt;<br>&gt;writer released&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88118592<br>&gt;<br>&gt;<br>&gt;<br>&gt;Reader<br>&gt;<br>&gt;Reader acquired&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88112872<br>&gt;<br>&gt;Reader released&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88114872<br>&gt;<br>&gt;Reader acquired&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88114872<br><br>
>&gt;<br>&gt;Reader released&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88116872<br>&gt;<br>&gt;Reader acquired&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88116872<br>&gt;<br>&gt;Reader released&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88118872<br>&gt;<br>&gt;Reader acquired&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88118872<br>&gt;<br>&gt;<br><br>
>&gt;<br>&gt;<br>&gt;<br>&gt;output is like this (WITH ACE_Process_Mutex):<br>&gt;<br>&gt;Writer<br>&gt;<br>&gt;writer acquired&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp;&nbsp;&nbsp;88560984<br>&gt;<br>&gt;writer released&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88562984<br>&gt;<br>&gt;writer acquired&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88562984<br><br>
>&gt;<br>&gt;writer released&nbsp;&nbsp;&nbsp;&nbsp;1&nbsp;&nbsp; at&nbsp;&nbsp; 88564984<br>&gt;<br>&gt;writer acquired&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88566984<br>&gt;<br>&gt;writer released&nbsp;&nbsp;&nbsp;&nbsp;2&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88568984<br>&gt;<br>&gt;writer acquired&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88570984<br>&gt;<br>&gt;writer released&nbsp;&nbsp;&nbsp;&nbsp;3&nbsp;&nbsp;&nbsp;&nbsp;at&nbsp;&nbsp; 88572984<br><br>
>&gt;<br>&gt;<br>&gt;<br>&gt;Reader<br>&gt;<br>&gt;Reader acquired&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88564984<br>&gt;<br>&gt;Reader released&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88566984<br>&gt;<br>&gt;Reader acquired&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88568984<br>&gt;<br>&gt;Reader released&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88570984<br><br>
>&gt;<br>&gt;Reader acquired&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88572984<br>&gt;<br>&gt;Reader released&nbsp;&nbsp; 2&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88574984<br>&gt;<br>&gt;Reader acquired&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88576984<br>&gt;<br>&gt;Reader released&nbsp;&nbsp; 3&nbsp;&nbsp;&nbsp;&nbsp; at&nbsp;&nbsp; 88578984<br>&gt;<br>&gt;<br><br>
>&gt;<br>&gt;<br>&gt;On 3/3/08, Matthew Gillen &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:<a href="mailto:mgillen@bbn.com">mgillen@bbn.com</a>" target="_blank"><a href="mailto:mgillen@bbn.com">mgillen@bbn.com</a></a>&gt; wrote:<br>&gt;&gt;<br>&gt;&gt; kul gupta wrote:<br><br>
>&gt;&gt; &gt; After having a look into ACE_ROOT/examples/Threads ,I implemented the<br>&gt;&gt; &gt; following code using ACE_RW_Process_Mutex. and run in both Windows and<br>&gt;&gt; &gt; linux5.0. But in both the cases the synchronization is not happening .<br><br>
>&gt;&gt;<br>&gt;&gt; It would help if were more specific about what actually /is/<br>&gt;&gt; happening.&nbsp;&nbsp;Do<br>&gt;&gt; you see the output messages in the wrong order?&nbsp;&nbsp;Do you never see some<br>&gt;&gt; output messages?<br><br>
>&gt;&gt;<br>&gt;&gt; Matt<br>&gt;&gt;<br>&gt;<br>&gt;------=_Part_37_22204605.1204610511961<br>&gt;Content-Type: text/html; charset=ISO-8859-1<br>&gt;Content-Transfer-Encoding: 7bit<br>&gt;Content-Disposition: inline<br>&gt;<br><br>
>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Arial&quot;&gt;Subject: &lt;/span&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;ACE_RW_Process_Mutex in single writer and multiple readers&lt;/span&gt;&lt;span style=&quot;FONT-SIZE: 9.5pt; FONT-FAMILY: Arial&quot;&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;<br><br>
>&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial&quot;&gt;ACE VERSION&lt;/span&gt;: 5.5.8&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;<br>&gt;&lt;div&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial&quot;&gt;HOST MACHINE and OPERATING SYSTEM&lt;/span&gt;:&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;<br><br>
>&gt;&lt;div&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;Windows XP Professional and Enterprise Linux 5.0&lt;/font&gt;&lt;/div&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;Version 2002&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;TARGET MACHINE and OPERATING SYSTEM, if different from HOST:NO&lt;/font&gt;&lt;/pre&gt;<br><br>
>&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial&quot;&gt;COMPILER NAME AND VERSION&lt;/span&gt; (AND PATCHLEVEL):&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;Visual studio 2005&lt;/font&gt;&lt;/pre&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Arial&quot;&gt;THE $ACE_ROOT/ace/config.h FILE &lt;/span&gt;&lt;span style=&quot;FONT-SIZE: 9.5pt; FONT-FAMILY: Arial&quot;&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;#include &amp;quot;ace/config-win32.h&amp;quot;&amp;nbsp;&amp;nbsp; for windows&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;#include &amp;quot;ace/config-linux.h&amp;quot;&amp;nbsp;&amp;nbsp; for linux&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial&quot;&gt;DOES THE PROBLEM AFFECT&lt;/span&gt;:&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COMPILATION? &amp;nbsp; NO&lt;/font&gt;&lt;/pre&gt;<br><br>
>&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LINKING?&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NO&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EXECUTION?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YES&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; OTHER &amp;nbsp;&lt;/font&gt;&lt;/pre&gt;<br><br>
>&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;FONT-FAMILY: Arial&quot;&gt;SYNOPSIS&lt;/span&gt;:&lt;/font&gt;&lt;/pre&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;Use of ACE_RW_Process_Mutex.I developed a very simple program which needs to be extended for Multiple readers and single writer ( shared memory concept using a Hash Map with allocator)&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;Even a single Reader and single writer are not getting syncronized.Please provide with a sample program of ACE_RW_Process_Mutex.&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: Arial&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;FONT-SIZE: 9.5pt; FONT-FAMILY: Arial&quot;&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;pre&gt;<br><br>
>&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;FONT-FAMILY: Arial&quot;&gt;DESCRIPTION&lt;/span&gt;:&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;After having a look into ACE_ROOT/examples/Threads ,I implemented the following code using ACE_RW_Process_Mutex. and run in both Windows and linux5.0. But in both the cases the synchronization is not happening .&lt;/font&gt;&lt;/pre&gt;<br><br>
>&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;Yes I have tried with ACE_Process_Mutex.Its working Fine in Windows and linux.I m attaching the code of ACE_Process_Mutex along with its output&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/span&gt;and also of ACE_RW_Process_Mutex along with its output&lt;/font&gt;&lt;/pre&gt;<br><br>
>&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;The Code is written as below&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/span&gt;(WITH ACE_RW_Process_Mutex)&lt;/font&gt;&lt;/pre&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;int ACE_TMAIN (int argc, ACE_TCHAR *argv[])&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;{&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;int count =0;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;float ltime=0;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACE_RW_Process_Mutex m_RWMutex(ACE_TEXT(&amp;quot;MyMutex&amp;quot;));&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (agrc == 1)&lt;span style=&quot;mso-tab-count: 3&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;// For server which is writing&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (1)&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (m_RWMutex.acquire_write() == 0)&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;mso-tab-count: 2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ltime = ::GetTickCount();&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACE_OS::printf(&amp;quot;Writer acquired...%d&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/span&gt;at: %f\n&amp;quot;,count++,ltime);&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACE_OS::sleep(2);&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;mso-tab-count: 2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ltime = ::GetTickCount();&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACE_OS::printf(&amp;quot;Writer releasing... ...%d&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/span&gt;at: %f\n&amp;quot;,count++,ltime);&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_RWMutex.release();&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;span style=&quot;mso-tab-count: 4&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;//For Client which is reading &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (1)&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (m_RWMutex.acquire_read() == 0)&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ltime = ::GetTickCount(); &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;mso-tab-count: 2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ACE_OS::printf(&amp;quot;Reader acquired... ...%d&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/span&gt;at: %f\n&amp;quot;,count++,ltime);&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACE_OS::sleep(2);&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&lt;span style=&quot;mso-tab-count: 2&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;ltime = ::GetTickCount();&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACE_OS::printf(&amp;quot;Reader releasing...%d&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/span&gt;at: %f\n&amp;quot;,count++,ltime);&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; m_RWMutex.release();&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;output is like this(WITH ACE_RW_Process_Mutex):&lt;/font&gt;&lt;/pre&gt;<br><br>
>&gt;&lt;pre&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;Writer &lt;/font&gt;&lt;/pre&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer acquired&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;0 &lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88110592&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer released&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;0 &lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88112592&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer acquired&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;1&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88112592&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer released&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;1&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88114592&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer acquired&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;2&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88114592&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer released&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;2&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88116592&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer acquired&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;3 &lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88116592&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer released &lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;3 &lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88118592&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;Reader&lt;/font&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;Reader acquired&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;0&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88112872&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;Reader released&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;0&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88114872&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;Reader acquired&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;1&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88114872&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;Reader released&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;1&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88116872&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;Reader acquired&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;2&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88116872&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;Reader released&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;2&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88118872&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;Reader acquired&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;3&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88118872&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;output is like this (WITH ACE_Process_Mutex):&lt;/font&gt;&lt;/p&gt;<br><br>
>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;font face=&quot;courier new,monospace&quot; size=&quot;1&quot;&gt;Writer &lt;/font&gt;&lt;/p&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer acquired&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;0 &lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88560984&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer released&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;0 &lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88562984&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer acquired&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;1&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88562984&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer released&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;1&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88564984&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer acquired&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;2&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88566984&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer released&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;2&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp; &lt;/span&gt;at &lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;88568984&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer acquired&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;3 &lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88570984&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;span style=&quot;FONT-SIZE: 10pt; FONT-FAMILY: &amp;#39;Courier New&amp;#39;&quot;&gt;&lt;font face=&quot;courier new,monospace&quot;&gt;&lt;font size=&quot;1&quot;&gt;writer released&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;3 &lt;span style=&quot;mso-tab-count: 1&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;at&lt;span style=&quot;mso-spacerun: yes&quot;&gt;&amp;nbsp;&amp;nbsp; &lt;/span&gt;88572984&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;<br><br>
>&gt;<br>&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;MARGIN: 0in 0in 0pt&quot;&gt;&lt;font face=&quot;c...<br><br>[Message clipped] </font></blockquote></div><br>