diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2019-05-21 20:33:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-21 20:33:05 -0700 |
commit | 2a175563b5c1b04083da6841f84a991ac576446a (patch) | |
tree | 6cd1c5ea7ebe44e932df23708057babd19932466 /src/gc | |
parent | 2b6614c242c317267442792d14f001d687fa8ccd (diff) | |
download | coreclr-2a175563b5c1b04083da6841f84a991ac576446a.tar.gz coreclr-2a175563b5c1b04083da6841f84a991ac576446a.tar.bz2 coreclr-2a175563b5c1b04083da6841f84a991ac576446a.zip |
Fix GCToOSInterface::SetCurrentThreadIdealAffinity on Unix (#24706)
The code was using GCToOSInterface::SetThreadAffinity, which
effectively pinned the current thread to a specific processor. On
Windows, it calls SetThreadIdealProcessor which is basically just a
scheduler hint, but the thread can stil run on other threads.
Since there is no way to set ideal affinity on Unix, the fix is to do
nothing in the GCToOSInterface::SetCurrentThreadIdealAffinity.
Diffstat (limited to 'src/gc')
-rw-r--r-- | src/gc/unix/gcenv.unix.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gc/unix/gcenv.unix.cpp b/src/gc/unix/gcenv.unix.cpp index f08021706f..2828c949c4 100644 --- a/src/gc/unix/gcenv.unix.cpp +++ b/src/gc/unix/gcenv.unix.cpp @@ -379,7 +379,8 @@ uint32_t GCToOSInterface::GetCurrentProcessId() // true if it has succeeded, false if it has failed bool GCToOSInterface::SetCurrentThreadIdealAffinity(uint16_t srcProcNo, uint16_t dstProcNo) { - return GCToOSInterface::SetThreadAffinity(dstProcNo); + // There is no way to set a thread ideal processor on Unix, so do nothing. + return true; } // Get the number of the current processor |