Back to index

glibc  2.9
Functions
lowlevellock.c File Reference
#include <errno.h>
#include <sysdep.h>
#include <lowlevellock.h>
#include <sys/time.h>

Go to the source code of this file.

Functions

void __lll_lock_wait_private (int *futex)

Function Documentation

void __lll_lock_wait_private ( int futex)

Definition at line 26 of file lowlevellock.c.

{
  do
    {
      int oldval = atomic_compare_and_exchange_val_acq (futex, 2, 1);
      if (oldval != 0)
       lll_futex_wait (futex, 2, LLL_PRIVATE);
    }
  while (atomic_compare_and_exchange_bool_acq (futex, 2, 0) != 0);
}