Skip to content

Commit 171f2ec

Browse files
committed
Fix build
1 parent f8c22b6 commit 171f2ec

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mono/metadata/threads.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,10 +562,12 @@ create_internal_thread_object (void)
562562

563563
thread->apartment_state = ThreadApartmentState_Unknown;
564564
thread->managed_id = get_next_managed_thread_id ();
565-
if (mono_gc_is_moving () && !defined(HAVE_BOEHM_GC)) {
565+
#if !defined(HAVE_BOEHM_GC)
566+
if (mono_gc_is_moving ()) {
566567
thread->thread_pinning_ref = thread;
567568
MONO_GC_REGISTER_ROOT_PINNING (thread->thread_pinning_ref, MONO_ROOT_SOURCE_THREADING, NULL, "Thread Pinning Reference");
568569
}
570+
#endif
569571

570572
thread->priority = MONO_THREAD_PRIORITY_NORMAL;
571573

@@ -884,10 +886,12 @@ mono_thread_detach_internal (MonoInternalThread *thread)
884886

885887
mono_memory_barrier ();
886888

887-
if (mono_gc_is_moving () && !defined(HAVE_BOEHM_GC)) {
889+
#if !defined(HAVE_BOEHM_GC)
890+
if (mono_gc_is_moving ()) {
888891
MONO_GC_UNREGISTER_ROOT (thread->thread_pinning_ref);
889892
thread->thread_pinning_ref = NULL;
890893
}
894+
#endif
891895

892896
done:
893897
SET_CURRENT_OBJECT (NULL);

0 commit comments

Comments
 (0)