Re: SRC Contributions: Advice and Objections

From: Jake Freeland <jake_at_technologyfriends.net>
Date: Tue, 30 Aug 2022 16:24:55 UTC
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
>