Home
last modified time | relevance | path

Searched refs:timeout (Results 1 – 25 of 141) sorted by relevance

123456

/libcore/ojluni/src/main/native/
Dlinux_close.cpp170 int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout) { in NET_Poll() argument
171 BLOCKING_IO_RETURN_INT( ufds[0].fd, poll(ufds, nfds, timeout) ); in NET_Poll()
175 fd_set *exceptfds, struct timeval *timeout) { in NET_Select() argument
177 select(s, readfds, writefds, exceptfds, timeout) ); in NET_Select()
191 int NET_Timeout(int s, long timeout) { in NET_Timeout() argument
208 if (timeout > 0) { in NET_Timeout()
228 rv = poll(&pfd, 1, timeout); in NET_Timeout()
239 if (timeout > 0) { in NET_Timeout()
242 timeout -= newtime - prevtime; in NET_Timeout()
243 if (timeout <= 0) { in NET_Timeout()
DPollArrayWrapper.c42 ipoll(struct pollfd fds[], unsigned int nfds, int timeout) in ipoll() argument
45 int remaining = timeout; in ipoll()
74 jlong timeout) in Java_sun_nio_ch_PollArrayWrapper_poll0() argument
81 if (timeout <= 0) { /* Indefinite or no wait */ in Java_sun_nio_ch_PollArrayWrapper_poll0()
82 RESTARTABLE (poll(a, numfds, timeout), err); in Java_sun_nio_ch_PollArrayWrapper_poll0()
84 err = ipoll(a, numfds, timeout); in Java_sun_nio_ch_PollArrayWrapper_poll0()
Dnet_util_md.h48 extern int NET_Timeout(int s, long timeout);
64 fd_set *exceptfds, struct timeval *timeout);
66 extern int NET_Poll(struct pollfd *ufds, unsigned int nfds, int timeout);
122 extern jint NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout);
/libcore/ojluni/src/main/java/java/util/concurrent/
DBlockingDeque.java324 boolean offerFirst(E e, long timeout, TimeUnit unit) in offerFirst() argument
346 boolean offerLast(E e, long timeout, TimeUnit unit) in offerLast() argument
380 E pollFirst(long timeout, TimeUnit unit) in pollFirst() argument
396 E pollLast(long timeout, TimeUnit unit) in pollLast() argument
513 boolean offer(E e, long timeout, TimeUnit unit) in offer() argument
564 E poll(long timeout, TimeUnit unit) in poll() argument
DTimeUnit.java348 public void timedWait(Object obj, long timeout) in timedWait() argument
350 if (timeout > 0) { in timedWait()
351 long ms = toMillis(timeout); in timedWait()
352 int ns = excessNanos(timeout, ms); in timedWait()
368 public void timedJoin(Thread thread, long timeout) in timedJoin() argument
370 if (timeout > 0) { in timedJoin()
371 long ms = toMillis(timeout); in timedJoin()
372 int ns = excessNanos(timeout, ms); in timedJoin()
387 public void sleep(long timeout) throws InterruptedException { in sleep() argument
388 if (timeout > 0) { in sleep()
[all …]
DExecutorService.java200 boolean awaitTermination(long timeout, TimeUnit unit) in awaitTermination() argument
309 long timeout, TimeUnit unit) in invokeAll() argument
358 long timeout, TimeUnit unit) in invokeAny() argument
DSemaphore.java413 public boolean tryAcquire(long timeout, TimeUnit unit) in tryAcquire() argument
415 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout)); in tryAcquire()
589 public boolean tryAcquire(int permits, long timeout, TimeUnit unit) in tryAcquire() argument
592 return sync.tryAcquireSharedNanos(permits, unit.toNanos(timeout)); in tryAcquire()
/libcore/ojluni/src/main/java/sun/nio/ch/
DSelectorImpl.java78 protected abstract int doSelect(long timeout) throws IOException; in doSelect() argument
80 private int lockAndDoSelect(long timeout) throws IOException { in lockAndDoSelect() argument
86 return doSelect(timeout); in lockAndDoSelect()
92 public int select(long timeout) in select() argument
95 if (timeout < 0) in select()
97 return lockAndDoSelect((timeout == 0) ? -1 : timeout); in select()
DServerSocketAdaptor.java48 private volatile int timeout = 0; field in ServerSocketAdaptor
99 if (timeout == 0) { in accept()
111 long to = timeout; in accept()
152 public void setSoTimeout(int timeout) throws SocketException { in setSoTimeout() argument
153 this.timeout = timeout; in setSoTimeout()
157 return timeout; in getSoTimeout()
DSocketAdaptor.java59 private volatile int timeout = 0; field in SocketAdaptor
85 public void connect(SocketAddress remote, int timeout) throws IOException { in connect() argument
88 if (timeout < 0) in connect()
97 if (timeout == 0) { in connect()
113 long to = timeout; in connect()
208 if (timeout == 0) in read()
216 long to = timeout; in read()
354 public void setSoTimeout(int timeout) throws SocketException { in setSoTimeout() argument
355 if (timeout < 0) in setSoTimeout()
357 this.timeout = timeout; in setSoTimeout()
[all …]
DAsynchronousSocketChannelImpl.java218 long timeout, in implRead() argument
227 long timeout, in read() argument
276 return implRead(isScatteringRead, dst, dsts, timeout, unit, att, handler); in read()
288 long timeout, in read() argument
297 read(false, dst, null, timeout, unit, attachment, handler); in read()
304 long timeout, in read() argument
318 read(true, null, bufs, timeout, unit, attachment, handler); in read()
327 long timeout, in implWrite() argument
336 long timeout, in write() argument
382 return implWrite(isGatheringWrite, src, srcs, timeout, unit, att, handler); in write()
[all …]
DPollArrayWrapper.java114 int poll(int numfds, int offset, long timeout) { in poll() argument
116 numfds, timeout); in poll()
123 private native int poll0(long pollAddress, int numfds, long timeout); in poll0() argument
/libcore/ojluni/src/main/java/java/net/
DAbstractPlainSocketImpl.java52 int timeout; // timeout in millisec field in AbstractPlainSocketImpl
156 connectToAddress(address, port, timeout); in connect()
181 connectToAddress(address, port, timeout); in connect()
200 protected void connect(SocketAddress address, int timeout) in connect() argument
212 connectToAddress(this.address, port, timeout); in connect()
226 private void connectToAddress(InetAddress address, int port, int timeout) throws IOException { in connectToAddress() argument
228 doConnect(InetAddress.getLocalHost(), port, timeout); in connectToAddress() local
230 doConnect(address, port, timeout); in connectToAddress()
306 timeout = (Integer) val; in setOption()
315 return new Integer(timeout); in getOption()
[all …]
DSocketInputStream.java99 int timeout) in socketRead0() argument
117 int timeout) in socketRead() argument
119 return socketRead0(fd, b, off, len, timeout); in socketRead()
147 int read(byte b[], int off, int length, int timeout) throws IOException { in read() argument
176 n = socketRead(fd, b, off, length, timeout); in read()
194 n = socketRead(fd, b, off, length, timeout); in read()
DInetAddress.java479 public boolean isReachable(int timeout) throws IOException { in isReachable() argument
480 return isReachable(null, 0 , timeout); in isReachable()
519 int timeout) throws IOException { in isReachable() argument
522 if (timeout < 0) in isReachable()
525 return impl.isReachable(this, timeout, netif, ttl); in isReachable()
532 public boolean isReachableByICMP(int timeout) throws IOException { in isReachableByICMP() argument
533 return ((Inet6AddressImpl) impl).icmpEcho(this, timeout, null, 0); in isReachableByICMP()
DInet6AddressImpl.java174 …public boolean isReachable(InetAddress addr, int timeout, NetworkInterface netif, int ttl) throws … in isReachable() argument
208 if (icmpEcho(addr, timeout, sourceAddr, ttl)) { in isReachable()
213 return tcpEcho(addr, timeout, sourceAddr, ttl); in isReachable()
217 private boolean tcpEcho(InetAddress addr, int timeout, InetAddress sourceAddr, int ttl) in tcpEcho() argument
228 IoBridge.connect(fd, addr, 7 /* Echo-protocol port */, timeout); in tcpEcho()
241 protected boolean icmpEcho(InetAddress addr, int timeout, InetAddress sourceAddr, int ttl) in icmpEcho() argument
261 for (int to = timeout, seq = 1; to > 0; ++seq) { in icmpEcho()
/libcore/ojluni/src/main/java/sun/net/
DNetworkClient.java235 public void setConnectTimeout(int timeout) {
236 connectTimeout = timeout;
256 public void setReadTimeout(int timeout) {
257 if (timeout == DEFAULT_READ_TIMEOUT)
258 timeout = defaultSoTimeout;
260 if (serverSocket != null && timeout >= 0) {
262 serverSocket.setSoTimeout(timeout);
267 readTimeout = timeout;
/libcore/ojluni/src/main/java/java/lang/ref/
DReferenceQueue.java179 public Reference<? extends T> remove(long timeout) in remove() argument
182 if (timeout < 0) { in remove()
188 long start = (timeout == 0) ? 0 : System.nanoTime(); in remove()
190 lock.wait(timeout); in remove()
193 if (timeout != 0) { in remove()
195 timeout -= (end - start) / 1000_000; in remove()
196 if (timeout <= 0) return null; in remove()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DSelectorTest.java455 private void assert_select_SelectorClosed(SelectType type, int timeout)
460 selectOnce(type, timeout);
467 private void assert_select_OP_ACCEPT(SelectType type, int timeout)
474 int count = blockingSelect(type, timeout);
482 count = selectOnce(type, timeout);
501 private void assert_select_OP_CONNECT(SelectType type, int timeout)
508 int count = blockingSelect(type, timeout);
516 count = selectOnce(type, timeout);
537 private void assert_select_OP_READ(SelectType type, int timeout)
558 int count = blockingSelect(type, timeout);
[all …]
/libcore/luni/src/main/java/java/lang/ref/
DFinalizerReference.java93 public static void finalizeAllEnqueued(long timeout) throws InterruptedException { in finalizeAllEnqueued() argument
102 sentinel.awaitFinalization(timeout); in finalizeAllEnqueued()
161 synchronized void awaitFinalization(long timeout) throws InterruptedException { in awaitFinalization() argument
163 final long endTime = startTime + timeout; // May wrap. in awaitFinalization()
166 if (timeout != 0) { in awaitFinalization()
/libcore/ojluni/src/main/java/java/lang/
DProcess.java186 public boolean waitFor(long timeout, TimeUnit unit) in waitFor() argument
190 long rem = unit.toNanos(timeout); in waitFor()
201 rem = unit.toNanos(timeout) - (System.nanoTime() - startTime); in waitFor()
DObject.java441 public final void wait(long timeout) throws InterruptedException { in wait() argument
442 wait(timeout, 0); in wait()
527 public final native void wait(long timeout, int nanos) throws InterruptedException; in wait() argument
/libcore/ojluni/src/main/java/sun/security/util/
DCache.java111 public abstract void setTimeout(int timeout); in setTimeout() argument
131 public static <K,V> Cache<K,V> newSoftMemoryCache(int size, int timeout) { in newSoftMemoryCache() argument
132 return new MemoryCache<>(true, size, timeout); in newSoftMemoryCache()
156 public static <K,V> Cache<K,V> newHardMemoryCache(int size, int timeout) { in newHardMemoryCache() argument
157 return new MemoryCache<>(false, size, timeout); in newHardMemoryCache()
235 public void setTimeout(int timeout) { in setTimeout() argument
432 public synchronized void setTimeout(int timeout) { in setTimeout() argument
434 lifetime = timeout > 0 ? timeout * 1000L : 0L; in setTimeout()
437 System.out.println("** lifetime reset to " + timeout); in setTimeout()
/libcore/luni/src/test/java/libcore/java/net/
DServerSocketConcurrentCloseTest.java211 public boolean awaitStart(long timeout, TimeUnit timeUnit) throws InterruptedException { in awaitStart() argument
212 return startLatch.await(timeout, timeUnit); in awaitStart()
248 public boolean awaitStart(long timeout, TimeUnit timeUnit) throws InterruptedException { in awaitStart() argument
249 return startLatch.await(timeout, timeUnit); in awaitStart()
252 public boolean awaitShutdown(long timeout, TimeUnit timeUnit) throws InterruptedException { in awaitShutdown() argument
253 return shutdownLatch.await(timeout, timeUnit); in awaitShutdown()
/libcore/ojluni/src/main/java/java/nio/channels/
DAsynchronousSocketChannel.java402 long timeout, in read() argument
512 long timeout, in read() argument
559 long timeout, in write() argument
663 long timeout, in write() argument

123456