From 389545dd767eb9ed15abacc604016c6da4159e62 Mon Sep 17 00:00:00 2001 From: "yevgen.pavlenko" Date: Tue, 9 Apr 2024 17:25:10 +0300 Subject: [PATCH 1/2] Make "make-c" profile active on Linux only. --- affinity/pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/affinity/pom.xml b/affinity/pom.xml index d63ec73fa..d41ec4de7 100644 --- a/affinity/pom.xml +++ b/affinity/pom.xml @@ -110,6 +110,10 @@ make-c + + linux + !arm + !dontMake From acdd01cf7bcc602a4190992ab79ffe70dbfa442d Mon Sep 17 00:00:00 2001 From: "yevgen.pavlenko" Date: Tue, 9 Apr 2024 14:22:38 +0300 Subject: [PATCH 2/2] Modify warning logic in WindowsJNAAffinity.setAffinity --- .../main/java/net/openhft/affinity/impl/WindowsJNAAffinity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/affinity/src/main/java/net/openhft/affinity/impl/WindowsJNAAffinity.java b/affinity/src/main/java/net/openhft/affinity/impl/WindowsJNAAffinity.java index 2c0fc2d7c..071e95d59 100644 --- a/affinity/src/main/java/net/openhft/affinity/impl/WindowsJNAAffinity.java +++ b/affinity/src/main/java/net/openhft/affinity/impl/WindowsJNAAffinity.java @@ -89,7 +89,7 @@ public void setAffinity(final BitSet affinity) { throw new IllegalStateException("SetThreadAffinityMask((" + pid + ") , &(" + affinity + ") ) errorNo=" + e.getErrorCode(), e); } BitSet affinity2 = getAffinity0(); - if (!affinity2.equals(affinity)) { + if (!affinity2.intersects(affinity)) { LoggerFactory.getLogger(WindowsJNAAffinity.class).warn("Tried to set affinity to " + affinity + " but was " + affinity2 + " you may have insufficient access rights"); } currentAffinity.set((BitSet) affinity.clone());