Get the calling thread's handle with pthread_self
Use pthread_self() in glibc 2.39 to name the calling thread or detach it, and never print the opaque pthread_t as if it were an integer.
Short posts that solve one thing: the code, the output we got, and why it works.
Use pthread_self() in glibc 2.39 to name the calling thread or detach it, and never print the opaque pthread_t as if it were an integer.
Decode H.264 on an NVIDIA GPU with ffmpeg -hwaccel cuda, which uses NVDEC but copies frames back to system memory unless you also set an output format.
Add eight floats at once with _mm256_add_ps from AVX in C, loading two vectors with loadu, adding them and storing the result back to memory.
Setting bootdelay to -2 makes U-Boot boot at once without even checking for a key, which removes the console, on U-Boot 2025.01.
xEventGroupWaitBits with xClearOnExit set to pdTRUE clears every awaited bit on return, including ones that did not trigger the wake-up.
Request an OpenGL 4.1 core context with glfwWindowHint before glfwCreateWindow so the profile and version are fixed at creation in GLFW 3.4.
Clear the C64 text screen from machine code with jsr $e544, which fills screen RAM with spaces and homes the cursor; know the portable alternative.
Read the program header table with readelf -l from GNU binutils 2.43 to see what the loader maps, which sections share a segment, and the interpreter path.
Create a tiny in-kernel filesystem for internal files with init_pseudo and kern_mount on Linux 6.12, the way sockfs and pipefs are built.
Define a key-sequenced VSAM cluster with IDCAMS DEFINE CLUSTER, INDEXED and KEYS, on z/OS 3.1.
Build the Cortex-M vector table as a const array of function pointers in C, placed in its own section, with the stack top in slot 0 and Reset in slot 1.
Read your own process ID and your parent's with getpid and getppid on Linux 6.12 and glibc 2.40. Neither call can fail, so there is nothing to check.
We send one email when a new post is published. No spam.