<meta http-equiv="Content-Type" content="text/html; charset=GB18030"><p class="MsoNormal" style="font-size: medium;"><span lang="EN-US">Hi</span>£º</p><p class="MsoNormal" style="font-size: medium;"><span lang="EN-US">See lock_hash in h_table.c:</span></p><p class="MsoNormal" style="font-size: medium;"><span lang="EN-US">Flowing lines of code do not guarantee atomicity and I think it is not safe:<o:p></o:p></span></p><p class="MsoListParagraph" style="font-size: medium; margin-left: 18pt; text-indent: -18pt;"><span lang="EN-US">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">      </span></span><span lang="EN-US">atomic_get(&_tm_table->entries[i].locker_pid) != mypid<o:p></o:p></span></p><p class="MsoListParagraph" style="font-size: medium; margin-left: 18pt; text-indent: -18pt;"><span lang="EN-US">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">      </span></span><span lang="EN-US">lock(&_tm_table->entries[i].mutex)<o:p></o:p></span></p><p class="MsoListParagraph" style="font-size: medium; margin-left: 18pt; text-indent: -18pt;"><span lang="EN-US">-<span style="font-variant-numeric: normal; font-variant-east-asian: normal; font-stretch: normal; font-size: 7pt; line-height: normal; font-family: "Times New Roman";">      </span></span><span lang="EN-US">atomic_set(&_tm_table->entries[i].locker_pid, mypid)</span></p><p class="MsoNormal" style="font-size: medium;"><span lang="EN-US">Would you mind solving my confusion?<o:p></o:p></span></p><p class="MsoNormal" style="font-size: medium;"><br></p>