title: use futex in user space?
body: <p>I need functionality of do_futex() call in user space outside of lock/unlock context. I.e., I do not need a mutex, but the exact semantics of the kernel call do_futex.</p>
  
  <p>It would seem it should be available in user space, since the intent was to minimize the number of system calls, but I can't link with it.</p>
  
  <p>Or is there a syscall?</p>
  
  <p>Update:</p>
  
  <p>I'm currently using syscall(__NR_futex, ...) to run do_futex(). But </p>
  
  <ol>
  <li>I have to include  to get __NR_futex, which is ugly</li>
  <li>I have to include  to get FUTEX_WAIT and FUTEX_WAKE, but I still don't get EWOULDBLOCK, or the maximum number of threads for WAKE</li>
  </ol>
  
  <p>Is there a coherent wrapper?</p>