COVESA / capicxx-someip-runtime

Common API C++ SOMEIP runtime
Mozilla Public License 2.0
111 stars 81 forks source link

eventfd() is a Linux specific system call #4

Closed devendranaga closed 3 years ago

devendranaga commented 5 years ago

https://github.com/GENIVI/capicxx-someip-runtime/blob/92ece2f78f5e71ba3dbe4a27e9ba61d3565bd72f/src/CommonAPI/SomeIP/Watch.cpp#L157

I understand using eventfd is less overhead than using pipe. However, the eventfd is more linux specific and is not POSIX compliant.

Could we not fallback to pipe on POSIX variants ? What overhead is being seen on using eventfd as to the pipe ? I see that in the past pipe2 is used for O_NONBLOCK. Unfortunately pipe2 is non POSIX as well.

So the question is, if we use a POSIX OS (be it Linux, BSD, or any other POSIX compliant), does the capicxx-someip-runtime and the core-runtime compile ? I am not sure if it would, given that parts of the code is Linux specific. And are there any plans in moving to use more POSIX friendly calls ?

Thanks

lutzbichler commented 3 years ago

We currently do have no plans to support anything different from Linux.