equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
162 |
162 |
163 // wait for I/O completion event |
163 // wait for I/O completion event |
164 // A error here is fatal (thread will not be replaced) |
164 // A error here is fatal (thread will not be replaced) |
165 replaceMe = false; |
165 replaceMe = false; |
166 try { |
166 try { |
167 port_get(port, address); |
167 int n; |
|
168 do { |
|
169 n = port_get(port, address); |
|
170 } while (n == IOStatus.INTERRUPTED); |
168 } catch (IOException x) { |
171 } catch (IOException x) { |
169 x.printStackTrace(); |
172 x.printStackTrace(); |
170 return; |
173 return; |
171 } |
174 } |
172 |
175 |
238 throws IOException; |
241 throws IOException; |
239 |
242 |
240 /** |
243 /** |
241 * Retrieves a single event from a port |
244 * Retrieves a single event from a port |
242 */ |
245 */ |
243 static native void port_get(int port, long pe) throws IOException; |
246 static native int port_get(int port, long address) throws IOException; |
244 |
247 |
245 /** |
248 /** |
246 * Retrieves at most {@code max} events from a port. |
249 * Retrieves at most {@code max} events from a port. |
247 */ |
250 */ |
248 static native int port_getn(int port, long address, int max, long timeout) |
251 static native int port_getn(int port, long address, int max, long timeout) |