aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-09-13 23:33:14 +0200
committerEugen Wissner <belka@caraus.de>2026-09-13 23:33:14 +0200
commit8cc075c6a736fdde56ca2da03a868821695765f4 (patch)
tree2dd14d3bc47e5bf00e612a0d792f5e33f2c7a81b /include
parent38a24d57067b657cde572f92210c5719091c88ff (diff)
downloadelna-8cc075c6a736fdde56ca2da03a868821695765f4.tar.gz
Add threadvar section for thread-local variables
Diffstat (limited to 'include')
-rw-r--r--include/elna/boot/ast.h3
-rw-r--r--include/elna/boot/symbol.h3
2 files changed, 6 insertions, 0 deletions
diff --git a/include/elna/boot/ast.h b/include/elna/boot/ast.h
index 5d5bdce..ffc57de 100644
--- a/include/elna/boot/ast.h
+++ b/include/elna/boot/ast.h
@@ -606,6 +606,9 @@ namespace elna::boot
type_expression& variable_type();
expression *initializer{ nullptr };
const bool is_extern{ false };
+
+ /// Whether the variable was declared in a \c threadvar section.
+ bool is_thread_local{ false };
};
/**
diff --git a/include/elna/boot/symbol.h b/include/elna/boot/symbol.h
index 1ca5deb..08292bc 100644
--- a/include/elna/boot/symbol.h
+++ b/include/elna/boot/symbol.h
@@ -487,6 +487,9 @@ namespace elna::boot
/// its type's own alignment.
std::optional<std::size_t> alignment;
+ /// Whether the variable has thread storage duration.
+ bool is_thread_local{ false };
+
/**
* Constructs a variable symbol information.
*