Skip to content

Commit

Permalink
Merge branch 'master' into upstream/1339_suppressed_types_paths
Browse files Browse the repository at this point in the history
  • Loading branch information
dbwiddis committed Oct 15, 2020
2 parents d4aa31e + 4b4c269 commit a7c836d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
5.3.1 (in progress)
================
* Your contribution here
* [#1359](https://github.com/oshi/oshi/pull/1359): Set suppressed network filesystem types and pseudo filesystem types via config - [@J-Jimmy](https://github.com/J-Jimmy).
* [#1362](https://github.com/oshi/oshi/pull/1362): Correct invalid Windows processor bitmask logic on 64th core - [@J-Jimmy](https://github.com/J-Jimmy).
* Your contribution here

5.3.0 (2020-10-11)
================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static List<LogicalProcessor> getLogicalProcessorInformationEx() {
int lowBit = Long.numberOfTrailingZeros(mask);
int hiBit = 63 - Long.numberOfLeadingZeros(mask);
for (int lp = lowBit; lp <= hiBit; lp++) {
if ((mask & (1L << lp)) > 0) {
if ((mask & (1L << lp)) != 0) {
LogicalProcessor logProc = new LogicalProcessor(lp, getMatchingCore(cores, group, lp),
getMatchingPackage(packages, group, lp), getMatchingNumaNode(numaNodes, group, lp), group);
logProcs.add(logProc);
Expand All @@ -112,7 +112,7 @@ public static List<LogicalProcessor> getLogicalProcessorInformationEx() {
private static int getMatchingPackage(List<GROUP_AFFINITY[]> packages, int g, int lp) {
for (int i = 0; i < packages.size(); i++) {
for (int j = 0; j < packages.get(i).length; j++) {
if ((packages.get(i)[j].mask.longValue() & (1L << lp)) > 0 && packages.get(i)[j].group == g) {
if ((packages.get(i)[j].mask.longValue() & (1L << lp)) != 0 && packages.get(i)[j].group == g) {
return i;
}
}
Expand All @@ -122,7 +122,7 @@ private static int getMatchingPackage(List<GROUP_AFFINITY[]> packages, int g, in

private static int getMatchingNumaNode(List<NUMA_NODE_RELATIONSHIP> numaNodes, int g, int lp) {
for (int j = 0; j < numaNodes.size(); j++) {
if ((numaNodes.get(j).groupMask.mask.longValue() & (1L << lp)) > 0
if ((numaNodes.get(j).groupMask.mask.longValue() & (1L << lp)) != 0
&& numaNodes.get(j).groupMask.group == g) {
return numaNodes.get(j).nodeNumber;
}
Expand All @@ -132,7 +132,7 @@ private static int getMatchingNumaNode(List<NUMA_NODE_RELATIONSHIP> numaNodes, i

private static int getMatchingCore(List<GROUP_AFFINITY> cores, int g, int lp) {
for (int j = 0; j < cores.size(); j++) {
if ((cores.get(j).mask.longValue() & (1L << lp)) > 0 && cores.get(j).group == g) {
if ((cores.get(j).mask.longValue() & (1L << lp)) != 0 && cores.get(j).group == g) {
return j;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ private static List<LogicalProcessor> matchBitmasks(long group1, List<Long> grou

private static int getMatchingBitmask(List<Long> bitmasks, int lp) {
for (int j = 0; j < bitmasks.size(); j++) {
if ((bitmasks.get(j).longValue() & (1L << lp)) > 0) {
if ((bitmasks.get(j).longValue() & (1L << lp)) != 0) {
return j;
}
}
Expand Down

0 comments on commit a7c836d

Please sign in to comment.