src/jdk.net/linux/native/libextnet/rdma_util_md.c
branchrsocket-branch
changeset 57129 1e1db86ea836
parent 57115 512e7cc6ccce
child 57134 096bba76efd1
equal deleted inserted replaced
57123:919516f93dcf 57129:1e1db86ea836
     1 /*
     1 /*
     2  * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2018, 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
   223 int rdma_supported() {
   223 int rdma_supported() {
   224     int one = 1;
   224     int one = 1;
   225     int rv, s;
   225     int rv, s;
   226     s = rs_socket(PF_INET, SOCK_STREAM, 0);
   226     s = rs_socket(PF_INET, SOCK_STREAM, 0);
   227     if (s < 0) {
   227     if (s < 0) {
       
   228         rs_close(s);
   228         return JNI_FALSE;
   229         return JNI_FALSE;
   229     }
   230     }
   230     return JNI_TRUE;
   231     return JNI_TRUE;
   231 }
   232 }
   232 
   233 
   329         prevNanoTime = newNanoTime;
   330         prevNanoTime = newNanoTime;
   330 
   331 
   331         if (read_rv > 0) {
   332         if (read_rv > 0) {
   332           break;
   333           break;
   333         }
   334         }
   334       } 
   335       }
   335     return (nanoTimeout / NET_NSEC_PER_MSEC);
   336     return (nanoTimeout / NET_NSEC_PER_MSEC);
   336 }
   337 }
   337 
   338 
   338 static int rdma_closefd(int fd2) {
   339 static int rdma_closefd(int fd2) {
   339     int rv, orig_errno;
   340     int rv, orig_errno;