diff options
Diffstat (limited to 'src/types.cpp')
| -rw-r--r-- | src/types.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/types.cpp b/src/types.cpp index dac2632a9..085bf67b7 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -661,7 +661,7 @@ gb_global Type *t_map_header = nullptr; gb_global Type *t_equal_proc = nullptr; gb_global Type *t_hasher_proc = nullptr; -gb_global gbMutex g_type_mutex; +gb_global RecursiveMutex g_type_mutex; i64 type_size_of (Type *t); @@ -677,7 +677,7 @@ bool is_type_slice(Type *t); bool is_type_integer(Type *t); void init_type_mutex(void) { - gb_mutex_init(&g_type_mutex); + mutex_init(&g_type_mutex); } bool type_ptr_set_exists(PtrSet<Type *> *s, Type *t) { @@ -2850,8 +2850,8 @@ i64 type_align_of_internal(Type *t, TypePath *path) { if (t->failure) { return FAILURE_ALIGNMENT; } - gb_mutex_lock(&g_type_mutex); - defer (gb_mutex_unlock(&g_type_mutex)); + mutex_lock(&g_type_mutex); + defer (mutex_unlock(&g_type_mutex)); t = base_type(t); @@ -3046,8 +3046,8 @@ Array<i64> type_set_offsets_of(Array<Entity *> const &fields, bool is_packed, bo } bool type_set_offsets(Type *t) { - gb_mutex_lock(&g_type_mutex); - defer (gb_mutex_unlock(&g_type_mutex)); + mutex_lock(&g_type_mutex); + defer (mutex_unlock(&g_type_mutex)); t = base_type(t); if (t->kind == Type_Struct) { @@ -3077,8 +3077,8 @@ i64 type_size_of_internal(Type *t, TypePath *path) { if (t->failure) { return FAILURE_SIZE; } - gb_mutex_lock(&g_type_mutex); - defer (gb_mutex_unlock(&g_type_mutex)); + mutex_lock(&g_type_mutex); + defer (mutex_unlock(&g_type_mutex)); switch (t->kind) { |