equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2008, 2019, 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 |
24 */ |
24 */ |
25 |
25 |
26 package sun.nio.fs; |
26 package sun.nio.fs; |
27 |
27 |
28 import java.nio.file.*; |
28 import java.nio.file.*; |
29 import java.security.AccessController; |
|
30 import java.security.PrivilegedAction; |
|
31 import java.util.*; |
29 import java.util.*; |
32 import java.io.IOException; |
30 import java.io.IOException; |
33 import jdk.internal.misc.Unsafe; |
31 import jdk.internal.misc.Unsafe; |
34 |
32 |
35 import static sun.nio.fs.UnixNativeDispatcher.*; |
33 import static sun.nio.fs.UnixNativeDispatcher.*; |
457 private static native void socketpair(int[] sv) throws UnixException; |
455 private static native void socketpair(int[] sv) throws UnixException; |
458 |
456 |
459 private static native int poll(int fd1, int fd2) throws UnixException; |
457 private static native int poll(int fd1, int fd2) throws UnixException; |
460 |
458 |
461 static { |
459 static { |
462 AccessController.doPrivileged(new PrivilegedAction<>() { |
460 jdk.internal.loader.BootLoader.loadLibrary("nio"); |
463 public Void run() { |
|
464 System.loadLibrary("nio"); |
|
465 return null; |
|
466 }}); |
|
467 } |
461 } |
468 } |
462 } |