Workaround for JDK-8312065 on JDK 8: replace poll() implementation with ppoll() which is restartable
| 36 | // Workaround for JDK-8312065 on JDK 8: |
| 37 | // replace poll() implementation with ppoll() which is restartable |
| 38 | static int poll_hook(struct pollfd* fds, nfds_t nfds, int timeout) { |
| 39 | if (timeout >= 0) { |
| 40 | struct timespec ts; |
| 41 | ts.tv_sec = timeout / 1000; |
| 42 | ts.tv_nsec = (timeout % 1000) * 1000000; |
| 43 | return ppoll(fds, nfds, &ts, NULL); |
| 44 | } else { |
| 45 | return ppoll(fds, nfds, NULL, NULL); |
| 46 | } |
| 47 | } |
| 48 | |
| 49 | static void applyPatch(CodeCache* cc) { |
| 50 | static bool patch_libnet = VM::hotspot_version() == 8; |
nothing calls this directly
no outgoing calls
no test coverage detected