aboutsummaryrefslogtreecommitdiff
path: root/src/types.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2026-02-02 11:37:19 +0000
committerGitHub <noreply@github.com>2026-02-02 11:37:19 +0000
commitadf56ced22de0ef84100c70b394641c272231c3f (patch)
treeee049d3ffa61d7ce1de1b774b4844a0ea7bfcc00 /src/types.cpp
parentb9e4007cb190c1a5d96e7786e726dcbcac1d08c9 (diff)
parentb183b1219c3b336988e53235a0671958b5079c09 (diff)
Merge pull request #6215 from odin-lang/bill/fix-data-races-2026-02
Fix numerous data races
Diffstat (limited to 'src/types.cpp')
-rw-r--r--src/types.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/types.cpp b/src/types.cpp
index a7f2bfda2..9ecdf5cdd 100644
--- a/src/types.cpp
+++ b/src/types.cpp
@@ -170,21 +170,21 @@ struct TypeStruct {
};
struct TypeUnion {
- Slice<Type *> variants;
+ Slice<Type *> variants;
- Ast * node;
- Scope * scope;
+ Ast * node;
+ Scope * scope;
- i64 variant_block_size;
- i64 custom_align;
- Type * polymorphic_params; // Type_Tuple
- Type * polymorphic_parent;
- Wait_Signal polymorphic_wait_signal;
+ std::atomic<i64> variant_block_size;
+ i64 custom_align;
+ Type * polymorphic_params; // Type_Tuple
+ Type * polymorphic_parent;
+ Wait_Signal polymorphic_wait_signal;
- i16 tag_size;
- bool is_polymorphic;
- bool is_poly_specialized;
- UnionTypeKind kind;
+ std::atomic<i16> tag_size;
+ bool is_polymorphic;
+ bool is_poly_specialized;
+ UnionTypeKind kind;
};
struct TypeProc {