This past summer I spent a month in Ethiopia in the capital Addis Ababa volunteering to teach coding to high school students from all over Ethiopia 🇪🇹.
- How to make my own keyboard?! @cassidoo makes a lot of her own keyboards and they look v cool, I would love to make my own!
A small cheat sheet for figuring out Open Source Licenses!
Things used to work, now they don’t anymore. Somebody pushed a rogue commit, and you want to find the culprit. The solution to this problem is easier than you’d imagine.
My project involves replacing bitmap implementation of PID allocation with IDR implementation. In an effort to do this, I made an exhaustive list of all the functions inside pid.c which will need replacement/deletion because they use bitmap (or are no longer needed). While this is not an ideal way to go about this problem, it helps me isolate what needs to be changed. In a while I will also have to figure out how to break my patches logically so that every patch in the series ensures that the kernel will not break. For now, here is the list:
In this post, I’ll be explaining the functions used for PID lookup in the Linux kernel. The first function is next_pidmap(), which finds the first set bit in the current pidmap or the successor pidmaps corresponding to a namespace ns. Initially, there is a sanity check on the range to see if we have not exceeded the PID_MAX_LIMIT. Inside the for loop, we traverse from the current pidmap till the end of the pidmaps.
The IDR API is charged with the allocation of integer ID numbers used with device names, POSIX timers, and more.
Allocating a free PID is essentially looking for the first bit in the bitmap whose value is 0; this bit is then set to 1. Conversely, freeing a PID can be implemented by ‘toggling’ the corresponding bit from 1 to 0.