Re: eventfd(2) and timerfd(2) APIs

2021-09-19 Thread David Holland
On Sun, Sep 19, 2021 at 07:43:32AM -0700, Jason Thorpe wrote: > >> | else plumbs it through either, but I'll go ahead and do so. > >> > >> Please do. What other things don't permit fcntl() to work? We > >> should fix any of those. > > > > Well, I?ll fix these 2 anyway. > > ?and

Re: eventfd(2) and timerfd(2) APIs

2021-09-19 Thread Jason Thorpe
> On Sep 18, 2021, at 4:59 PM, John Nemeth wrote: > > Nice. timerfd(2) is Asterisk's preferred timing source. This > should improve our support for Asterisk. As you might guess, I'm > all for the addition of these. Yes, I remember you mentioning that before, and I just double-checked

Re: eventfd(2) and timerfd(2) APIs

2021-09-19 Thread Jason Thorpe
> On Sep 18, 2021, at 3:54 PM, Jason Thorpe wrote: > >> >> | else plumbs it through either, but I'll go ahead and do so. >> >> Please do. What other things don't permit fcntl() to work? We >> should fix any of those. > > Well, I’ll fix these 2 anyway. …and I just double-checked

Re: eventfd(2) and timerfd(2) APIs

2021-09-19 Thread Jason Thorpe
> On Sep 18, 2021, at 6:26 PM, Jason Thorpe wrote: > >> On Sep 18, 2021, at 5:51 PM, Robert Elz wrote: >> >> | You'll get EBADF if you try it on anything else >> >> and that's definitely wrong, on a pipe the system is allowed to return >> EINVAL, >> and that's what ought to be returned

Re: eventfd(2) and timerfd(2) APIs

2021-09-18 Thread Jason Thorpe
> On Sep 18, 2021, at 5:51 PM, Robert Elz wrote: > > | You'll get EBADF if you try it on anything else > > and that's definitely wrong, on a pipe the system is allowed to return EINVAL, > and that's what ought to be returned whenever the fd is not something that > supports chmod (etc).

Re: eventfd(2) and timerfd(2) APIs

2021-09-18 Thread Christos Zoulas
In article <986563ad-88c2-41b9-bf69-51b26240b...@me.com>, Jason Thorpe wrote: >Last year, I wrote implementations of the Linux eventfd(2) and >timerfd(2) interfaces for NetBSD, with the goal of improving our Linux >emulation. In order to be able to test them with ATF tests, I went >ahead and

Re: eventfd(2) and timerfd(2) APIs

2021-09-18 Thread Robert Elz
Date:Sat, 18 Sep 2021 15:54:06 -0700 From:Jason Thorpe Message-ID: <63bf9e95-498a-4389-9a14-2f3c87a51...@me.com> | I've changed the man pages to state "set for non-blocking I/O". That should be much better. | Yes, they're file descriptors, so close(2) gets rid

Re: eventfd(2) and timerfd(2) APIs

2021-09-18 Thread John Nemeth
On Sep 18, 10:26, Jason Thorpe wrote: } } Last year, I wrote implementations of the Linux eventfd(2) and } timerfd(2) interfaces for NetBSD, with the goal of improving our } Linux emulation. In order to be able to test them with ATF tests, } I went ahead and made them native calls as well. } }

Re: eventfd(2) and timerfd(2) APIs

2021-09-18 Thread Jason Thorpe
> On Sep 18, 2021, at 3:35 PM, Robert Elz wrote: > >Date:Sat, 18 Sep 2021 13:21:27 -0700 >From:Jason Thorpe >Message-ID: <5e7b8a22-14c2-4dce-ace2-31552f412...@me.com> > > > | > unless the > | > .Nm > | > object was created with > | > .Dv TFD_NONBLOCK . >

Re: eventfd(2) and timerfd(2) APIs

2021-09-18 Thread Robert Elz
Date:Sat, 18 Sep 2021 13:21:27 -0700 From:Jason Thorpe Message-ID: <5e7b8a22-14c2-4dce-ace2-31552f412...@me.com> | > unless the | > .Nm | > object was created with | > .Dv TFD_NONBLOCK . | | I'm using those names, because those are the names used in

Re: eventfd(2) and timerfd(2) APIs

2021-09-18 Thread Jason Thorpe
> On Sep 18, 2021, at 12:17 PM, Robert Elz wrote: > >Date:Sat, 18 Sep 2021 10:26:29 -0700 >From:Jason Thorpe >Message-ID: <986563ad-88c2-41b9-bf69-51b26240b...@me.com> > > > |https://www.netbsd.org/~thorpej/timerfd.2 > > This one contains duplicated

Re: eventfd(2) and timerfd(2) APIs

2021-09-18 Thread Robert Elz
Date:Sat, 18 Sep 2021 10:26:29 -0700 From:Jason Thorpe Message-ID: <986563ad-88c2-41b9-bf69-51b26240b...@me.com> | https://www.netbsd.org/~thorpej/timerfd.2 This one contains duplicated text... Because they are associated with a file descriptor, they may

Re: eventfd(2) and timerfd(2) APIs

2021-09-18 Thread Jason Thorpe
(Yes, this is a re-run … but I’m ready to merge it if there are no objections, so…) > On Sep 18, 2021, at 10:26 AM, Jason Thorpe wrote: > > Last year, I wrote implementations of the Linux eventfd(2) and timerfd(2) > interfaces for NetBSD, with the goal of improving our Linux emulation. In >

eventfd(2) and timerfd(2) APIs

2021-09-18 Thread Jason Thorpe
Last year, I wrote implementations of the Linux eventfd(2) and timerfd(2) interfaces for NetBSD, with the goal of improving our Linux emulation. In order to be able to test them with ATF tests, I went ahead and made them native calls as well. Here are the man pages describing the interfaces: