Skip to content
systemcoding.dev

Library

Everything you need to level up your coding skills.

Flat illustration of user space above the system call boundary, the kernel and the hardware, with the C, Rust and Linux logos.
Systems Programming

Parse Command-Line Options with getopt

Learn how getopt walks argv in C, what optind, optarg and opterr mean, how a colon marks an option value, and how to handle errors and bundled flags.

8 min read
Flat illustration of user space above the system call boundary, the kernel and the hardware, with the Linux, C and FreeBSD logos.
Kernels

Use a PWM Channel From a Consumer Driver

Drive a PWM channel from a Linux 6.12 consumer driver with devm_pwm_get, struct pwm_state and pwm_apply_might_sleep, plus the device tree binding.

7 min read
Flat illustration of user space above the system call boundary, the kernel and the hardware, with the C, FreeBSD and Rust logos.
Systems Programming

Limit a Process's Resources with setrlimit

Cap open files, CPU time, memory and core dumps for a Linux process with setrlimit, understand soft and hard limits, and read the results in /proc.

7 min read

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.