<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div><span id="zwchr" data-marker="__DIVIDER__">----- On Feb 27, 2016, at 8:42 AM, masoud hematpour <mashemat@gmail.com> wrote:<br></span></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Excuse me , </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">C.S1 = abbreviation of Critical Section 1 and the same for C.S2. I mean using rcu for two different Critical Sections.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">men_C.S1= I mean the memory that Critical Section1 was reading.</div></div></blockquote><div>Please keep the list in CC.<br></div><div><br data-mce-bogus="1"></div><div>The answer is that synchronize_rcu() will only return<br data-mce-bogus="1"></div><div>after the second critical section has completed,<br data-mce-bogus="1"></div><div>because in your sequence below, the second critical<br data-mce-bogus="1"></div><div>section was running when synchronize_rcu() was<br data-mce-bogus="1"></div><div>invoked.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thanks,<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Mathieu<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 27, 2016 at 2:32 PM, Mathieu Desnoyers <span dir="ltr"><<a href="mailto:mathieu.desnoyers@efficios.com" target="_blank">mathieu.desnoyers@efficios.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:arial,helvetica,sans-serif;font-size:12pt;color:#000000"><span class=""><div><span>----- On Feb 27, 2016, at 8:24 AM, masoud hematpour <<a href="mailto:mashemat@gmail.com" target="_blank">mashemat@gmail.com</a>> wrote:<br></span></div></span><div><span class=""><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hello to all,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Can you please help me? I confused in the following situation:</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> CPU0 CPU1</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> ----------- -----------</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> rcu_read_lock() .</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> C.S1 .</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> rcu_read_unlock() .</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> .</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> . </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> rcu_read_lock() </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> Update (C.S1)</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> C.S2 Synchronise_rcu()</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> free(men_C.S1)</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><span style="color:#ff0000">rcu_read_unlock() </span></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"> synchronize_rcu() wait till end of C.S2?</div></div></blockquote></span><div>You might want to clarify what "C", "S1", "S2", and<br></div><div>"men_C" mean, as well as the meaning of the dot ".".<br></div><br><div>Without context, answering your question would be<br></div><div>more guesswork than anything reliable.<br></div><br><div>Thanks,<br></div><br><div>Mathieu<br></div><br><blockquote style="border-left:2px solid #1010ff;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thank you very much</div></div><br>_______________________________________________<br>lttng-dev mailing list<br><a href="mailto:lttng-dev@lists.lttng.org" target="_blank">lttng-dev@lists.lttng.org</a><br><a href="http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev" target="_blank">http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev</a><span class="HOEnZb"><span style="color: #888888;" data-mce-style="color: #888888;" color="#888888"><br></span></span></blockquote></div><span class="HOEnZb"><span style="color: #888888;" data-mce-style="color: #888888;" color="#888888"><br><div>-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br><a href="http://www.efficios.com" target="_blank">http://www.efficios.com</a><br data-mce-bogus="1"></div></span></span></div></div></blockquote></div></div><br></blockquote></div><div><br></div><div data-marker="__SIG_POST__">-- <br></div><div>Mathieu Desnoyers<br>EfficiOS Inc.<br>http://www.efficios.com</div></div></body></html>