2,7 → 2,7 |
<chapter id="sync"> |
<?dbhtml filename="sync.html"?> |
|
<title>Mutual exclusion and synchronization</title> |
<title>Synchronization</title> |
|
<section> |
<title>Introduction</title> |
511,7 → 511,7 |
<para>A futex should be initialized by setting its userspace counter to |
one before it is used. When locking the futex via userspace library |
function <code>futex_down_timeout</code>, the library code atomically |
decrements the futex counter and tests if it droped below zero. If it |
decrements the futex counter and tests if it dropped below zero. If it |
did, then the futex is locked by another thread and the library uses the |
<constant>SYS_FUTEX_SLEEP</constant> syscall to put the thread asleep. |
If the counter decreased to 0, then there was no contention and the |