Add PlatformDependent* methods that are needed by io_uring (#10744)
Motivation:
ddebc10
added a few adjustments that are needed by io_uring that we will add as an incubator repository. Unfortunally we missed the changed in PlatformDependent*.
Modifications:
Add missing methods
Result:
Be able to compile io_uring code against core netty
This commit is contained in:
parent
ddebc1027d
commit
d4defc30b8
@ -503,6 +503,14 @@ public final class PlatformDependent {
|
||||
return PlatformDependent0.getInt(object, fieldOffset);
|
||||
}
|
||||
|
||||
public static int getIntVolatile(long address) {
|
||||
return PlatformDependent0.getIntVolatile(address);
|
||||
}
|
||||
|
||||
public static void putIntOrdered(long adddress, int newValue) {
|
||||
PlatformDependent0.putIntOrdered(adddress, newValue);
|
||||
}
|
||||
|
||||
public static byte getByte(long address) {
|
||||
return PlatformDependent0.getByte(address);
|
||||
}
|
||||
|
@ -562,6 +562,14 @@ final class PlatformDependent0 {
|
||||
return UNSAFE.getInt(data, INT_ARRAY_BASE_OFFSET + INT_ARRAY_INDEX_SCALE * index);
|
||||
}
|
||||
|
||||
static int getIntVolatile(long address) {
|
||||
return UNSAFE.getIntVolatile(null, address);
|
||||
}
|
||||
|
||||
static void putIntOrdered(long adddress, int newValue) {
|
||||
UNSAFE.putOrderedInt(null, adddress, newValue);
|
||||
}
|
||||
|
||||
static long getLong(byte[] data, int index) {
|
||||
return UNSAFE.getLong(data, BYTE_ARRAY_BASE_OFFSET + index);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user