Date: Tue, 30 Aug 2022 11:24:55 -0500 From: Jake Freeland <jake@technologyfriends.net> To: Brooks Davis <brooks@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: SRC Contributions: Advice and Objections Message-ID: <CAOgZAGb=6%2BQ1o2mR73K_08atm%2BsHuAjvk1iNgt7DWy3Yb66pdA@mail.gmail.com> In-Reply-To: <20220829203947.GB89898@spindle.one-eyed-alien.net> References: <CAOgZAGaiBbuXhBwF=fyTUH%2Bb38fAQVeW%2B0Zivh5fDFD2JXJdjA@mail.gmail.com> <20220829203947.GB89898@spindle.one-eyed-alien.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000009876e705e777d2aa Content-Type: text/plain; charset="UTF-8" Brooks, Thank you for the response. I did not know there was a pre-existing LinuxKPI timerfd implementation. I will surely use that as reference for building the native FreeBSD version. The %m format specifier is not incredibly important for my work, but I thought it would be nice to have in FreeBSD's libc. Has there been discussion about deprecating %m from POSIX in the past? Jake Freeland On Mon, Aug 29, 2022 at 3:39 PM Brooks Davis <brooks@freebsd.org> wrote: > On Mon, Aug 29, 2022 at 03:17:51PM -0500, Jake Freeland wrote: > > * Implementing timerfd: > > https://man7.org/linux/man-pages/man2/timerfd_gettime.2.html > > I am unsure whether it would be beneficial to upstream POSIX timer > > patches for igt-gpu-tools or to implement timerfd for FreeBSD. I am > > erring on the side of implementing timerfd if other applications need > > to use it in the future. > > This might be a good place to start on kernel work because we already > have an implementation for linux compat. You'd need to move the > implementation into sys/kern and add manpages, syscall, and libc > wrappers. IMO this is a good idea vs using a wrapper epoll-shim because > it allows better support for timers in capability mode. > > > * Adding %m format specifier to scanf: > > The %m format specifier is a POSIX extension to the ISO C standard that > can > > precede > > %c, %s, and %[. The %m allocates a memory buffer to hold the string > > including a > > terminating null character. > > This seems reasonable (unless there's a move afoot to deprecate this in > a future POSIX, but I don't think I've seen traffic to that effect.) > > -- Brooks > --0000000000009876e705e777d2aa Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Brooks,<div><br></div><div>Thank you for the response. I d= id not know there was a pre-existing LinuxKPI</div><div>timerfd implementat= ion. I will surely use that as reference for building the native</div><div>= FreeBSD version. The %m format specifier is not incredibly important for my= work,</div><div>but I thought it would be nice to have in FreeBSD's li= bc. Has there been discussion</div><div>about deprecating %m from POSIX in = the past?</div><div><br></div><div>Jake Freeland</div></div><br><div class= =3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Mon, Aug 29, 2022= at 3:39 PM Brooks Davis <<a href=3D"mailto:brooks@freebsd.org">brooks@f= reebsd.org</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style= =3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding= -left:1ex">On Mon, Aug 29, 2022 at 03:17:51PM -0500, Jake Freeland wrote:<b= r> > * Implementing timerfd:<br> > <a href=3D"https://man7.org/linux/man-pages/man2/timerfd_gettime.2.htm= l" rel=3D"noreferrer" target=3D"_blank">https://man7.org/linux/man-pages/ma= n2/timerfd_gettime.2.html</a><br> > I am unsure whether it would be beneficial to upstream POSIX timer<br> > patches for igt-gpu-tools or to implement timerfd for FreeBSD. I am<br= > > erring on the side of implementing timerfd if other applications need<= br> > to use it in the future.<br> <br> This might be a good place to start on kernel work because we already<br> have an implementation for linux compat.=C2=A0 You'd need to move the<b= r> implementation into sys/kern and add manpages, syscall, and libc<br> wrappers.=C2=A0 IMO this is a good idea vs using a wrapper epoll-shim becau= se<br> it allows better support for timers in capability mode.<br> <br> > * Adding %m format specifier to scanf:<br> > The %m format specifier is a POSIX extension to the ISO C standard tha= t can<br> > precede<br> > %c, %s, and %[. The %m allocates a memory buffer to hold the string<br= > > including a<br> > terminating null character.<br> <br> This seems reasonable (unless there's a move afoot to deprecate this in= <br> a future POSIX, but I don't think I've seen traffic to that effect.= )<br> <br> -- Brooks<br> </blockquote></div> --0000000000009876e705e777d2aa--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOgZAGb=6%2BQ1o2mR73K_08atm%2BsHuAjvk1iNgt7DWy3Yb66pdA>