Skip to content

Commit

Permalink
Fix the QCall contract for GC suppression. (#108344)
Browse files Browse the repository at this point in the history
* Fix the QCall contract for GC suppression.

* Remove QCALL_BEGIN/END from method
  • Loading branch information
AaronRobinsonMSFT authored Sep 28, 2024
1 parent 3fd7b0f commit 7c69e7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
10 changes: 1 addition & 9 deletions src/coreclr/vm/comsynchronizable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,15 +724,7 @@ extern "C" BOOL QCALLTYPE ThreadNative_GetIsBackground(QCall::ThreadHandle threa
}
CONTRACTL_END;

BOOL res = FALSE;

BEGIN_QCALL;

res = thread->IsBackground();

END_QCALL;

return res;
return thread->IsBackground();
}

// Set whether or not this is a background thread.
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/vm/qcall.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@
MODE_PREEMPTIVE; \

#define QCALL_CHECK_NO_GC_TRANSITION \
THROWS; \
GC_TRIGGERS; \
NOTHROW; \
GC_NOTRIGGER; \
MODE_COOPERATIVE; \

#define QCALL_CONTRACT CONTRACTL { QCALL_CHECK; } CONTRACTL_END;
Expand Down

0 comments on commit 7c69e7d

Please sign in to comment.