public abstract class PosixJavaNetClose extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
PosixJavaNetClose.FdEntry
An FdEntry is created for each file descriptor that is used in a blocking operation, to hold
a list of threads that are blocked on the file descriptor.
|
protected static class |
PosixJavaNetClose.ThreadEntry
A ThreadEntry is created for each blocking operation, to record the thread that is blocking,
and whether the operation has been interrupted.
|
Constructor and Description |
---|
PosixJavaNetClose() |
Modifier and Type | Method and Description |
---|---|
protected int |
BLOCKING_IO_RETURN_INT(int FD,
IntSupplier FUNC)
The differences from the above macro:
(1) Passing an IntSupplier instead of the text of a function application.
|
protected abstract int |
closefd(int fd1,
int fd2) |
protected static void |
endOp(PosixJavaNetClose.FdEntry fdEntry,
PosixJavaNetClose.ThreadEntry self)
{ @formatter:off
End a blocking operation :-
Remove thread from thread list for the fd.
|
protected static PosixJavaNetClose.FdEntry |
getFdEntry(int fd)
Many threads will be looking up entries in the map.
|
protected void |
interruptThread(Pthread.pthread_t pThread)
Interrupt the given thread.
|
abstract int |
NET_Accept(int s,
Socket.sockaddr addr,
org.graalvm.nativeimage.c.type.CIntPointer addrlen) |
int |
NET_Connect(int s,
Socket.sockaddr addr,
int addrlen) |
int |
NET_Dup2(int fd,
int fd2) |
int |
NET_NonBlockingRead(int s,
org.graalvm.word.PointerBase buf,
long len) |
int |
NET_Poll(Poll.pollfd ufds,
int nfds,
int timeout) |
int |
NET_Read(int s,
org.graalvm.word.PointerBase buf,
long len) |
int |
NET_ReadV(int s,
Uio.iovec vector,
int count) |
int |
NET_RecvFrom(int s,
org.graalvm.word.PointerBase buf,
int len,
int flags,
Socket.sockaddr from,
org.graalvm.nativeimage.c.type.CIntPointer fromlen) |
int |
NET_Send(int s,
org.graalvm.word.PointerBase msg,
int len,
int flags) |
int |
NET_SendTo(int s,
org.graalvm.word.PointerBase msg,
int len,
int flags,
Socket.sockaddr to,
int tolen) |
int |
NET_SocketClose(int fd) |
abstract int |
NET_Timeout0(int s,
long timeout,
long currentTime) |
int |
NET_WriteV(int s,
Uio.iovec vector,
int count) |
protected static void |
startOp(PosixJavaNetClose.FdEntry fdEntry,
PosixJavaNetClose.ThreadEntry self)
{ @formatter:off
Start a blocking operation :-
Insert thread onto thread list for the fd.
|
protected static PosixJavaNetClose.FdEntry getFdEntry(int fd)
protected static void startOp(PosixJavaNetClose.FdEntry fdEntry, PosixJavaNetClose.ThreadEntry self)
protected static void endOp(PosixJavaNetClose.FdEntry fdEntry, PosixJavaNetClose.ThreadEntry self)
protected abstract int closefd(int fd1, int fd2)
protected void interruptThread(Pthread.pthread_t pThread)
protected int BLOCKING_IO_RETURN_INT(int FD, IntSupplier FUNC)
public int NET_Dup2(int fd, int fd2)
public int NET_SocketClose(int fd)
public int NET_Read(int s, org.graalvm.word.PointerBase buf, long len)
public int NET_NonBlockingRead(int s, org.graalvm.word.PointerBase buf, long len)
public int NET_ReadV(int s, Uio.iovec vector, int count)
public int NET_RecvFrom(int s, org.graalvm.word.PointerBase buf, int len, int flags, Socket.sockaddr from, org.graalvm.nativeimage.c.type.CIntPointer fromlen)
public int NET_Send(int s, org.graalvm.word.PointerBase msg, int len, int flags)
public int NET_WriteV(int s, Uio.iovec vector, int count)
public int NET_SendTo(int s, org.graalvm.word.PointerBase msg, int len, int flags, Socket.sockaddr to, int tolen)
public int NET_Connect(int s, Socket.sockaddr addr, int addrlen)
public int NET_Poll(Poll.pollfd ufds, int nfds, int timeout)
public abstract int NET_Timeout0(int s, long timeout, long currentTime)
public abstract int NET_Accept(int s, Socket.sockaddr addr, org.graalvm.nativeimage.c.type.CIntPointer addrlen)