public class Sched extends Object
Thread.| Modifier and Type | Method and Description |
|---|---|
static long |
getAffinity()
Gets the CPU affinity mask of the current thread as a
long. |
static BitSet |
getAffinityBitSet()
Gets the CPU affinity mask of the current thread as a
long. |
static void |
setAffinity(long mask)
Sets the CPU affinity mask of the current thread to
mask. |
static void |
setAffinityBitSet(BitSet mask)
Sets the CPU affinity mask of the current thread to
mask. |
public static void setAffinity(long mask)
mask.
Only works on machines with at most 64 processors. For larger ranges of CPUs use setAffinityBitSet.mask - The CPU affinity maskUnsupportedOperationException - If the operating system is not supported by this library.IllegalArgumentException - If the mask contains no processors that are currently physically on the system and permitted to the current thread.public static void setAffinityBitSet(BitSet mask)
mask.mask - The CPU affinity maskUnsupportedOperationException - If the operating system is not supported by this library.IllegalArgumentException - If the mask contains no processors that are currently physically on the system and permitted to the current thread.public static long getAffinity()
long.
Only works on machines with at most 64 processors. For larger ranges of CPUs use getAffinityBitSet.UnsupportedOperationException - If the operating system is not supported by this library.public static BitSet getAffinityBitSet()
long.UnsupportedOperationException - If the operating system is not supported by this library.Copyright © 2021. All rights reserved.