cpu_family(3alleg4)
β¨ cpu_family β¨
okay bestie, buckle up, this is a page from the Allegro manual (that's the Allegro game programming library, the one and only π) and it's about a little global called cpu_family β the variable that knows what kind of CPU you're running on. it's giving β¨hardware detectiveβ¨.
πΈ SYNOPSIS πΈ
#include <allegro.h>
extern int cpu_family;
like, that's it. one extern int. she's simple, she's iconic, she's global π
π DESCRIPTION π
so cpu_family contains the Intel type, where applicable β meaning: if your processor is an Intel-ish one, this is where Allegro tells you which flavor. Allegro defines these CPU family types:
CPU_FAMILY_UNKNOWNβ we literally have no idea what processor this is π the type of processor is unknownCPU_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 processor π¦CPU_FAMILY_EXTENDEDβ the processor type needs to be read from thecpu_model(so like, this one's a plot twist, go checkcpu_modelfor the real answer)
π«Ά important lil note bestie: you can only read this variable after you've calledcheck_cpu()β and good news,allegro_init()calls it for you automatically, so you don't even have to think about it. she's got you covered, no cap.
π SEE ALSO π
check_cpu(3alleg4)cpu_vendor(3alleg4)cpu_model(3alleg4)cpu_capabilities(3alleg4)allegro_init(3alleg4)
and that's the whole page, bestie π this was Allegro version 4.4.3, dated way back, and the page itself is cpu_family(3alleg4) β k bye, go read check_cpu(3alleg4) next, mwah πβ¨
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms