Read the TSC in C with asm volatile and =a, =d outputs
Read the x86 time-stamp counter from C with asm volatile and the =a, =d output constraints that map EDX:EAX.
Short posts that solve one thing: the code, the output we got, and why it works.
Read the x86 time-stamp counter from C with asm volatile and the =a, =d output constraints that map EDX:EAX.
Add a print-% pattern rule to a GNU Makefile so make print-CFLAGS shows the final value of any variable, after all includes and overrides.
Use kzalloc(sizeof(*p), GFP_KERNEL) instead of kmalloc plus memset so new kernel structures never leak stale heap bytes to user space on Linux 6.x.
Read one Db2 row into COBOL host variables with EXEC SQL SELECT INTO, then branch on SQLCODE, in Enterprise COBOL 6.4 with Db2 13 for z/OS.
Set USART2 to 115200 baud on an STM32F411 by writing 417 into BRR from a 48 MHz APB1 clock, then enable TE, RE and UE in CR1.
Check whether a path is a directory with stat and the S_ISDIR macro on Linux 6.12, and know when lstat gives a different answer for a symlink.
Read whether UEFI Secure Boot is active on a running Linux system with mokutil --sb-state, and see when shim has turned validation off.
Open /dev/kvm and call ioctl(fd, KVM_GET_API_VERSION, 0). It returns 12, and the docs tell programs to refuse any other value.
Drive a 100 MHz testbench clock with a one-line always block, and see why the initial value and the timescale decide whether it works.
Run ldd ./app to see which shared libraries a Linux ELF binary needs and where the loader resolves them, and never run it on a binary you do not trust.
Create an io_uring instance with io_uring_queue_init in liburing 2.5 on Linux 6.8, check the negative errno return, and release it with io_uring_queue_exit.
Trace a whole group of syscalls with strace 6.x by naming a class such as -e trace=%file or %network instead of listing every call.
We send one email when a new post is published. No spam.