public enum PosixJNAAffinity extends Enum<PosixJNAAffinity> implements IAffinity
IAffinity based on JNA call of
sched_setaffinity(3)/sched_getaffinity(3) from 'c' library. Applicable for most
linux/unix platforms
TODO Support assignment to core 64 and above
| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
LOADED |
| Modifier and Type | Method and Description |
|---|---|
BitSet |
getAffinity() |
int |
getCpu() |
int |
getProcessId() |
int |
getThreadId() |
void |
setAffinity(BitSet affinity) |
static PosixJNAAffinity |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static PosixJNAAffinity[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final PosixJNAAffinity INSTANCE
public static PosixJNAAffinity[] values()
for (PosixJNAAffinity c : PosixJNAAffinity.values()) System.out.println(c);
public static PosixJNAAffinity valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic BitSet getAffinity()
getAffinity in interface IAffinitypublic void setAffinity(BitSet affinity)
setAffinity in interface IAffinityaffinity - sets affinity mask of current thread to specified valuepublic int getCpu()
public int getProcessId()
getProcessId in interface IAffinitypublic int getThreadId()
getThreadId in interface IAffinityCopyright © 2022. All rights reserved.