A Smackerel of Opinion
Notes and jottings from an ex-Ubuntu Kernel Team Engineer
Friday, 10 February 2023
Integer shift gotcha
›
Left shifting values seems simple, but the following code contains a bug: The literal value 1 is actually a signed int, so the promotio...
Saturday, 24 July 2021
Intel Hardware P-State (HWP) / Intel Speed Shift
›
Intel Hardware P-State (aka Harware Controlled Performance or "Speed Shift") (HWP) is a feature found in more modern x86 Intel CPU...
Friday, 9 July 2021
New features in stress-ng 0.12.12
›
The release of stress-ng 0.12.12 incorporates some useful features and a handful of new stressors. Media devices such as HDDs and SSDs norm...
Friday, 21 May 2021
Adjacent C string concatenation gotcha
›
C has the useful feature of adjacent allowing literal strings to be automatically concatenated. This is described in K&R "The C pro...
Friday, 23 April 2021
C Ternary operator gotcha (type conversions)
›
The C ternary operator expr1 ? expr2 : expr3 has a subtle side note described in K&R 2nd edition, page 52, section 2.11: "If expr2 ...
›
Home
View web version