<p>Hi,</p>

<p>We are encountering locking issues during call to nh_reload MI command. The MI process seems to be stuck in call to lock_start_write. So, I was checking the rw_locking.h code and I wonder if statement (_lock)-&gt;w_flag = 0; should be executed under lock?</p>

<p>I know w_flag is of type int but after some research on the web, the assignment is not guaranteed to be atomic and even if it was atomic, there are some other issues to take care of.</p>

<p>Thanks,<br>
Mickael</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br>Reply to this email directly or <a href="https://github.com/OpenSIPS/opensips/issues/396">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFOciYY8KE2xXjDeFbAxNfmbfOGbgnMIks5nYYZ4gaJpZM4DJhfJ.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/OpenSIPS/opensips/issues/396"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>