File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -3370,6 +3370,8 @@ int jl_has_concrete_subtype(jl_value_t *typ)
3370
3370
return ((jl_datatype_t * )typ )-> has_concrete_subtype ;
3371
3371
}
3372
3372
3373
+ #define typeinf_lock jl_codegen_lock
3374
+
3373
3375
static jl_mutex_t inference_timing_mutex ;
3374
3376
static uint64_t inference_start_time = 0 ;
3375
3377
static uint8_t inference_is_measuring_compile_time = 0 ;
@@ -3394,6 +3396,16 @@ JL_DLLEXPORT void jl_typeinf_timing_end(void)
3394
3396
JL_UNLOCK_NOGC (& inference_timing_mutex );
3395
3397
}
3396
3398
3399
+ JL_DLLEXPORT void jl_typeinf_lock_begin (void )
3400
+ {
3401
+ JL_LOCK (& typeinf_lock );
3402
+ }
3403
+
3404
+ JL_DLLEXPORT void jl_typeinf_lock_end (void )
3405
+ {
3406
+ JL_UNLOCK (& typeinf_lock );
3407
+ }
3408
+
3397
3409
#ifdef __cplusplus
3398
3410
}
3399
3411
#endif
Original file line number Diff line number Diff line change 478
478
XX(jl_tty_set_mode) \
479
479
XX(jl_tupletype_fill) \
480
480
XX(jl_typeassert) \
481
+ XX(jl_typeinf_lock_begin) \
482
+ XX(jl_typeinf_lock_end) \
481
483
XX(jl_typeinf_timing_begin) \
482
484
XX(jl_typeinf_timing_end) \
483
485
XX(jl_typename_str) \
You can’t perform that action at this time.
0 commit comments