Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: eventfd(2) definition in /usr/include/sys/eventfd.h
> On Sep 20, 2021, at 8:42 PM, Ryo ONODERA <ryo%tetera.org@localhost> wrote:
>
> Hi,
>
> Thanks for your great work!!!
>
> C++ programs, for example pkgsrc/net/zeromq, use eventfd(2)
> however /usr/include/sys/eventfd.h does not support C++ use.
>
> Could you use __BEGIN_DECLS/__END_DECLS?
Oh! Yes, please feel free to add these to the eventfd.h and timerfd.h headers as needed!
Sorry for the oversight!
>
> My idea is as follows:
>
> Index: sys/sys/eventfd.h
> ===================================================================
> RCS file: /cvsroot/src/sys/sys/eventfd.h,v
> retrieving revision 1.2
> diff -u -r1.2 eventfd.h
> --- sys/sys/eventfd.h 19 Sep 2021 15:51:27 -0000 1.2
> +++ sys/sys/eventfd.h 21 Sep 2021 03:33:25 -0000
> @@ -49,9 +49,11 @@
> struct lwp;
> int do_eventfd(struct lwp *, unsigned int, int, register_t *);
> #else /* ! _KERNEL */
> +__BEGIN_DECLS
> int eventfd(unsigned int, int);
> int eventfd_read(int, eventfd_t *);
> int eventfd_write(int, eventfd_t);
> +__END_DECLS
> #endif /* _KERNEL */
>
> #endif /* _SYS_EVENTFD_H_ */
>
> Thank you very much.
>
> --
> Ryo ONODERA // ryo%tetera.org@localhost
> PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB FD1B F404 27FA C7D1 15F3
-- thorpej
Home |
Main Index |
Thread Index |
Old Index