Zero ds, es and ss at the start of a boot sector
Start a boot sector by zeroing ds, es and ss and setting a stack, because the BIOS leaves them undefined.
Short posts that solve one thing: the code, the output we got, and why it works.
Start a boot sector by zeroing ds, es and ss and setting a stack, because the BIOS leaves them undefined.
Make printf with %f print numbers under newlib-nano on Arm GNU Toolchain 13 by forcing the float formatter into the link with -Wl,-u,_printf_float.
Define a file-scope kernel mutex with DEFINE_MUTEX(name), which needs no mutex_init() call and is ready before module init runs, on Linux 6.x.
Read the Language Environment traceback in a CEEDUMP to find the failing program, its entry offset and the statement number, on z/OS 3.1.
HAL_DMA_Abort stops an STM32 DMA stream in a blocking call that polls for 5 ms, returns HAL_OK, and does not run the abort callback.
pipe fills a two-element array with a read end and a write end, and one process can write and read both ends because the kernel buffers the data.
Stop speculative reads after a bounds check with _mm_lfence from immintrin.h, the barrier Intel recommends against Spectre variant 1.
Split a 16-bit CHIP-8 opcode into X, Y, N, NN and NNN with shifts and masks, after fetching it big-endian from two memory bytes.
Cut a long combinational path by putting one register stage in a valid/ready stream, without losing a transfer or reordering data.
Count trailing zeros in C with __builtin_ctz on GCC and Clang, and guard the zero case, because the builtin is undefined for an input of 0.
An XDP program ends with a verdict: XDP_PASS hands the frame to the stack, XDP_DROP discards it, XDP_TX bounces it out the same port. Linux 5.x, libbpf.
Log numbers and strings from firmware over SEGGER RTT with SEGGER_RTT_printf, which takes %d, %u, %x, %s and %c but no floating-point formats.
We send one email when a new post is published. No spam.