diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2026-02-02 11:37:19 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-02 11:37:19 +0000 |
| commit | adf56ced22de0ef84100c70b394641c272231c3f (patch) | |
| tree | ee049d3ffa61d7ce1de1b774b4844a0ea7bfcc00 /src/types.cpp | |
| parent | b9e4007cb190c1a5d96e7786e726dcbcac1d08c9 (diff) | |
| parent | b183b1219c3b336988e53235a0671958b5079c09 (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.cpp | 24 |
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 { |