< prev index next >
src/java.base/aix/native/libnet/aix_close.c
Print this page
*** 408,417 ****
--- 408,421 ----
int NET_Read(int s, void* buf, size_t len) {
BLOCKING_IO_RETURN_INT( s, recv(s, buf, len, 0) );
}
+ int NET_NonBlockingRead(int s, void* buf, size_t len) {
+ BLOCKING_IO_RETURN_INT(s, recv(s, buf, len, MSG_NONBLOCK));
+ }
+
int NET_ReadV(int s, const struct iovec * vector, int count) {
BLOCKING_IO_RETURN_INT( s, readv(s, vector, count) );
}
int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
*** 501,512 ****
/*
* Wrapper for poll(s, timeout).
* Auto restarts with adjusted timeout if interrupted by
* signal other than our wakeup signal.
*/
! int NET_Timeout(int s, long timeout) {
! long prevtime = 0, newtime;
struct timeval t;
fdEntry_t *fdEntry = getFdEntry(s);
/*
* Check that fd hasn't been closed.
--- 505,516 ----
/*
* Wrapper for poll(s, timeout).
* Auto restarts with adjusted timeout if interrupted by
* signal other than our wakeup signal.
*/
! int NET_Timeout0(int s, long timeout,long currentTime) {
! long prevtime = currentTime, newtime;
struct timeval t;
fdEntry_t *fdEntry = getFdEntry(s);
/*
* Check that fd hasn't been closed.
*** 514,531 ****
if (fdEntry == NULL) {
errno = EBADF;
return -1;
}
- /*
- * Pick up current time as may need to adjust timeout
- */
- if (timeout > 0) {
- gettimeofday(&t, NULL);
- prevtime = t.tv_sec * 1000 + t.tv_usec / 1000;
- }
-
for(;;) {
struct pollfd pfd;
int rv;
threadEntry_t self;
--- 518,527 ----
< prev index next >