rte_per_lcore.h(3)
π rte_per_lcore.h π
okay bestie, gather round, because this one is per-lcore variables in RTE and it's lowkey iconic πΈ β it's a page from the Library Functions Manual and fr fr it's short but every line eats.
β¨ NAME β¨
rte_per_lcore.h β the header that lets you have "global variables" that are actually per-lcore π
π SYNOPSIS π
π Macros π
#define RTE_DEFINE_PER_LCORE(type, name)
#define RTE_DECLARE_PER_LCORE(type, name)
#define RTE_PER_LCORE(name)
π¦ Detailed Description π¦
so basically, this file defines an API for instantiating per-lcore "globalvariables" that are environment-specific. no cap.
β οΈ important note bestie: in all environments, a "shared variable" is the default when you use a global variable. like, that's the baseline behavior, periodt.
parts of this are execution environment specific. iykyk π
definition lives in the file rte_per_lcore.h.
π₯ Macro Definition Documentation π₯
π #define RTE_DEFINE_PER_LCORE( type, name)
Value:
__thread type per_lcore_##name
this macro defines a per lcore variable named "var" of type "type". and listen β do NOT use keywords like "static" or "volatile" in type π, just prefix the whole macro instead. trust.
π Definition at line 33 of file rte_per_lcore.h.
π«Ά #define RTE_DECLARE_PER_LCORE( type, name)
Value:
extern __thread type per_lcore_##name
this one declares an extern per lcore variable named "var" of type "type" β¨. the extern glow-up, if you will.
π Definition at line 39 of file rte_per_lcore.h.
β #define RTE_PER_LCORE( name)
Value:
(per_lcore_##name)
read/write the per-lcore variable value π« like, get it and set it, main character energy.
π Definition at line 46 of file rte_per_lcore.h.
π Author π
generated automatically by Doxygen for DPDK from the source code. not a human author bestie, it's the machine doing its little thing π€π
aaaand that's the whole page, bestie π thanks for reading, you slayed. this cutie was brought to you by DPDK, Version 25.11.3 π¦β¨ mwah, bye π π
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms