Mercurial > hg > graal-compiler
diff src/share/vm/prims/jvm.cpp @ 4970:33df1aeaebbf
Merge with http://hg.openjdk.java.net/hsx/hsx24/hotspot/
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Mon, 27 Feb 2012 13:10:13 +0100 |
parents | aa3d708d67c4 |
children | f7c4174b33ba |
line wrap: on
line diff
--- a/src/share/vm/prims/jvm.cpp Fri Feb 24 18:30:42 2012 -0800 +++ b/src/share/vm/prims/jvm.cpp Mon Feb 27 13:10:13 2012 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2716,7 +2716,9 @@ } oop java_thread = JNIHandles::resolve_non_null(jthread); JavaThread* receiver = java_lang_Thread::thread(java_thread); - Events::log("JVM_StopThread thread JavaThread " INTPTR_FORMAT " as oop " INTPTR_FORMAT " [exception " INTPTR_FORMAT "]", receiver, (address)java_thread, throwable); + Events::log_exception(JavaThread::current(), + "JVM_StopThread thread JavaThread " INTPTR_FORMAT " as oop " INTPTR_FORMAT " [exception " INTPTR_FORMAT "]", + receiver, (address)java_thread, throwable); // First check if thread is alive if (receiver != NULL) { // Check if exception is getting thrown at self (use oop equality, since the @@ -3515,14 +3517,14 @@ JVM_LEAF(jint, JVM_Recv(jint fd, char *buf, jint nBytes, jint flags)) JVMWrapper2("JVM_Recv (0x%x)", fd); //%note jvm_r6 - return os::recv(fd, buf, nBytes, flags); + return os::recv(fd, buf, (size_t)nBytes, (uint)flags); JVM_END JVM_LEAF(jint, JVM_Send(jint fd, char *buf, jint nBytes, jint flags)) JVMWrapper2("JVM_Send (0x%x)", fd); //%note jvm_r6 - return os::send(fd, buf, nBytes, flags); + return os::send(fd, buf, (size_t)nBytes, (uint)flags); JVM_END @@ -3543,42 +3545,51 @@ JVM_LEAF(jint, JVM_Connect(jint fd, struct sockaddr *him, jint len)) JVMWrapper2("JVM_Connect (0x%x)", fd); //%note jvm_r6 - return os::connect(fd, him, len); + return os::connect(fd, him, (socklen_t)len); JVM_END JVM_LEAF(jint, JVM_Bind(jint fd, struct sockaddr *him, jint len)) JVMWrapper2("JVM_Bind (0x%x)", fd); //%note jvm_r6 - return os::bind(fd, him, len); + return os::bind(fd, him, (socklen_t)len); JVM_END JVM_LEAF(jint, JVM_Accept(jint fd, struct sockaddr *him, jint *len)) JVMWrapper2("JVM_Accept (0x%x)", fd); //%note jvm_r6 - return os::accept(fd, him, (int *)len); + socklen_t socklen = (socklen_t)(*len); + jint result = os::accept(fd, him, &socklen); + *len = (jint)socklen; + return result; JVM_END JVM_LEAF(jint, JVM_RecvFrom(jint fd, char *buf, int nBytes, int flags, struct sockaddr *from, int *fromlen)) JVMWrapper2("JVM_RecvFrom (0x%x)", fd); //%note jvm_r6 - return os::recvfrom(fd, buf, nBytes, flags, from, fromlen); + socklen_t socklen = (socklen_t)(*fromlen); + jint result = os::recvfrom(fd, buf, (size_t)nBytes, (uint)flags, from, &socklen); + *fromlen = (int)socklen; + return result; JVM_END JVM_LEAF(jint, JVM_GetSockName(jint fd, struct sockaddr *him, int *len)) JVMWrapper2("JVM_GetSockName (0x%x)", fd); //%note jvm_r6 - return os::get_sock_name(fd, him, len); + socklen_t socklen = (socklen_t)(*len); + jint result = os::get_sock_name(fd, him, &socklen); + *len = (int)socklen; + return result; JVM_END JVM_LEAF(jint, JVM_SendTo(jint fd, char *buf, int len, int flags, struct sockaddr *to, int tolen)) JVMWrapper2("JVM_SendTo (0x%x)", fd); //%note jvm_r6 - return os::sendto(fd, buf, len, flags, to, tolen); + return os::sendto(fd, buf, (size_t)len, (uint)flags, to, (socklen_t)tolen); JVM_END @@ -3592,21 +3603,26 @@ JVM_LEAF(jint, JVM_GetSockOpt(jint fd, int level, int optname, char *optval, int *optlen)) JVMWrapper2("JVM_GetSockOpt (0x%x)", fd); //%note jvm_r6 - return os::get_sock_opt(fd, level, optname, optval, optlen); + socklen_t socklen = (socklen_t)(*optlen); + jint result = os::get_sock_opt(fd, level, optname, optval, &socklen); + *optlen = (int)socklen; + return result; JVM_END JVM_LEAF(jint, JVM_SetSockOpt(jint fd, int level, int optname, const char *optval, int optlen)) JVMWrapper2("JVM_GetSockOpt (0x%x)", fd); //%note jvm_r6 - return os::set_sock_opt(fd, level, optname, optval, optlen); + return os::set_sock_opt(fd, level, optname, optval, (socklen_t)optlen); JVM_END + JVM_LEAF(int, JVM_GetHostName(char* name, int namelen)) JVMWrapper("JVM_GetHostName"); return os::get_host_name(name, namelen); JVM_END + // Library support /////////////////////////////////////////////////////////////////////////// JVM_ENTRY_NO_ENV(void*, JVM_LoadLibrary(const char* name)) @@ -3647,6 +3663,7 @@ return os::dll_lookup(handle, name); JVM_END + // Floating point support //////////////////////////////////////////////////////////////////// JVM_LEAF(jboolean, JVM_IsNaN(jdouble a)) @@ -3655,7 +3672,6 @@ JVM_END - // JNI version /////////////////////////////////////////////////////////////////////////////// JVM_LEAF(jboolean, JVM_IsSupportedJNIVersion(jint version))