tags:

views:

30

answers:

0

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.

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.

Or is there a syscall?

Update:

I'm currently using syscall(__NR_futex, ...) to run do_futex(). But

  1. I have to include to get __NR_futex, which is ugly
  2. 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

Is there a coherent wrapper?