Boost logo

Boost :

Subject: [boost] __NR_eventfd syscall
From: Alexey Brodkin (Alexey.Brodkin_at_[hidden])
Date: 2015-07-21 06:47:01


Hi,

When building Boost for ARC architecture we're seeing this failure:
---------------------+AD4-8---------------------
./boost/asio/detail/impl/eventfd+AF8-select+AF8-interrupter.ipp: In member function 'void
boost::asio::detail::eventfd+AF8-select+AF8-interrupter::open+AF8-descriptors()':
./boost/asio/detail/impl/eventfd+AF8-select+AF8-interrupter.ipp:50:50: error: '+AF8AXw-NR+AF8-eventfd' was not declared in this scope
   write+AF8-descriptor+AF8- +AD0- read+AF8-descriptor+AF8- +AD0- syscall(+AF8AXw-NR+AF8-eventfd, 0)+ADs-
---------------------+AD4-8---------------------

This happens clearly because ARC following Linux kernel's UAPI doesn't
define +AF8AXw-NR+AF8-eventfd syscall.

If you look here https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/unistd.h+ACM-L771
you may notice that +ACI-eventfd+ACI- syscall with some others resides in
+ACIAIw-ifdef+AF8AXw-ARCH+AF8-WANT+AF8-SYSCALL+AF8-NO+AF8-FLAGS+ACI-.

And from what I may see only +ACI-score+ACI- architecture has this
+AF8AXw-ARCH+AF8-WANT+AF8-SYSCALL+AF8-NO+AF8-FLAGS defined.

Most of other arches that don't use unistd.h from +ACI-include/uapi/asm-genereic+ACI-
folder have +ACI-eventfd+ACI- syscall defined. For example it's true for ARM (both
32 and 64 versions).

So I'd say it's not the best way to use directly a syscall that's being
obsoleted in +ACI-Boost+ACI-. And so real fix would be to modify Boost's
+ACI-eventfd+AF8-select+AF8-interrupter::open+AF8-descriptors()+ACI- for example with use of
really generic +ACI-eventfd2+ACI- or even better use libc's eventfd() call instead of direct syscall.

Any thoughts what would be the best fix here?

-Alexey


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk