cpu_family(3)
π cpu_family(3) π
okay bestie, so this is a page from the Allegro manual β the Allegro game programming library, no cap β and today we're talking about cpu_family(3), aka the little variable that knows what kinda brain your processor has. it's giving "who am I" but for silicon. let's go π¦
β¨ NAME β¨
cpu_family β contains the CPU type. part of the Allegro game programming library, obviously π
πΈ SYNOPSIS πΈ
#include <allegro.h>
extern int cpu_family;
literally that's it. one #include, one extern int. iconic behaviour.
π DESCRIPTION π
so cpu_family holds the Intel type, where applicable. and Allegro has these whole CPU family types defined for you, bestie, here's the full roster β every single one, don't skip:
CPU_FAMILY_UNKNOWNβ the type of processor is unknown (mystery machine energy, we don't know her π)CPU_FAMILY_I386β the processor is an Intel-compatible 386CPU_FAMILY_I486β the processor is an Intel-compatible 486CPU_FAMILY_I586β the processor is a Pentium or equivalentCPU_FAMILY_I686β the processor is a Pentium Pro, II, III or equivalentCPU_FAMILY_ITANIUMβ the processor is an Itanium processorCPU_FAMILY_POWERPCβ the processor is a PowerPC processorCPU_FAMILY_EXTENDEDβ the processor type needs to be read from thecpu_modelπ
β οΈ important queen: you can only read this variable after you've calledcheck_cpu(). and good news βcheck_cpu()is automatically called byallegro_init(), so if you did the init thing you're already covered. don't read it before, it will not have your back fr fr π
π SEE ALSO π
and that's the whole page, bestie, you ate it π
this was Allegro, version 4.4.3 β cpu_family(3), the CPU-type lore, delivered with love from the Allegro manual. go read your cpu's mind, but only after check_cpu(). periodt π«Άβ¨πΈπ
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms