Skip to content

Instantly share code, notes, and snippets.

@vegard
vegard / kernel-dev.md
Last active April 29, 2026 03:13
Getting started with Linux kernel development

Getting started with Linux kernel development

Prerequisites

The Linux kernel is written in C, so you should have at least a basic understanding of C before diving into kernel work. You don't need expert level C knowledge, since you can always pick some things up underway, but it certainly helps to know the language and to have written some userspace C programs already.

It will also help to be a Linux user. If you have never used Linux before, it's probably a good idea to download a distro and get comfortable with it before you start doing kernel work.

Lastly, knowing git is not actually required, but can really help you (since you can dig through changelogs and search for information you'll need). At a minimum you should probably be able to clone the git repository to a local directory.

@charterchap
charterchap / atomic_writes.cpp
Created September 16, 2015 03:30
atomic writes linux c++, QT, Boost, GNU
// Practical snippets for loosely atomic writes on linux
// Important, even more so on allocate on flush file systems such as xfs and ext4.
// You can learn more here: https://www.flamingspork.com/talks/
// https://www.kernel.org/doc/Documentation/filesystems/ext4.txt
// These snippets are not perfect, if writing cross platform applications - marco guards
// Just trying to convey the gist
// The basic routine is:
// 1. Write data as file.new