SRC Contributions: Advice and Objections

From: Jake Freeland <>
Date: Mon, 29 Aug 2022 20:17:51 UTC
Hi there,

I've been hard at work over the last few months contributing to FreeBSD
the Google Summer of Code program and learning about the operating system.
Now that I am almost finished with porting Intel's igt-gpu-tools to
FreeBSD, I am
thinking about other potential SRC contributions that I can get started on.

I ran into a few OS-related problems during my project that I would like to
I thought I would share those issues here for advice and potential

* Implementing signalfd:
This is a huge one. I needed to comment a lot of important code inside
of igt-gpu-tools to compensate for signalfd's absence. I am reading The
Design and Implementation of the FreeBSD Operating System by McKusick,
Neville-Neil, and Watson (excellent read by the way) to get a comprehensive
grasp on how FreeBSD handles signals and file descriptors internally.
I plan to finish the book and get started on this first.

* Implementing timerfd:
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.

* Implementing userfaultfd:
Page fault handling and processing from the userspace.

* Adding %m format specifier to scanf:
The %m format specifier is a POSIX extension to the ISO C standard that can
%c, %s, and %[. The %m allocates a memory buffer to hold the string
including a
terminating null character.

* Adding the gettid() funtion:
This function grabs the thread identifier for the currently running process.
I am not yet informed about FreeBSD's thread scheduling so I don't know
if adding this function is even necessary.

* Adding ETIME errno:
I am not sure how necessary this one is because ETIMEDOUT exists, but I
understand the distinction between the two. I would think that ETIME
would already be present if it were necessary.

Any input would be appreciated.

Thank you,
Jake Freeland