[libcxx-commits] [PATCH] D94909: [libc++][VE] Support futex system call on VE

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Dec 8 13:01:40 PST 2021


ldionne added a comment.

In D94909#3179803 <https://reviews.llvm.org/D94909#3179803>, @kaz7 wrote:

> Thank you.  I definitely want to do that.  But, it's 1:44 AM here, Japan, and @simoll who are operating our buildbot lives in Europe.  Let's organize meeting soon.

No hurries at all -- sorry if that wasn't clear :-).

Just ping me whenever suits you and we can take a look together.



================
Comment at: libcxx/src/atomic.cpp:49
+    // FUTEX_WAIT_PRIVATE is implemented at 128.
+    syscall(SYS_futex, __ptr, 128, __val, &__timeout, 0, 0);
+#else
----------------
kaz7 wrote:
> ldionne wrote:
> > This is incredibly brittle and not self-documenting. Is there no way that VE can implement `linux/futex.h`? After all, it does provide the `SYS_futex` syscall and it does support `FUTEX_WAIT_PRIVATE`, only not with that macro name. This seems to me like a classic "workaround for something missing on the platform side", and usually it's better to round those rough edges on the platform side instead of working around them in a bunch of places (like here).
> I understand how it looks like, but it is simply difficult to let OS peeople add `linux/futex.h` to their distribution.  I tried, but it won't work.  I can try it again and again...
Can you ask these people to come here to see what they're asking us to do?

I'm sure they would rather provide `linux/futex.h` than have us hardcode magic numbers in our implementation.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D94909/new/

https://reviews.llvm.org/D94909



More information about the libcxx-commits mailing list