o <code>F_UNLCK</code>.|</p>
<p>In our above example, we call <code>fcntl()</code> with <code>F_SETLKW</code> as the argument, so it blocks until it can set the lock, then sets it and continues.</p>
<h2 data-number="6.2" id="clearing-a-lock"><span class="header-section-number">6.2</span> Clearing a lock</h2>
<p>Whew! After all the locking stuff up there, it’s time for something easy: unlocking! Actually, this is a piece of cake in comparison. I’ll just reuse that first example and add the code to unlock