mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
Merge
This commit is contained in:
commit
1b618f6415
796 changed files with 41804 additions and 17029 deletions
|
@ -115,6 +115,7 @@
|
|||
# include <link.h>
|
||||
# include <stdint.h>
|
||||
# include <inttypes.h>
|
||||
# include <sys/ioctl.h>
|
||||
|
||||
#define MAX_PATH (2 * K)
|
||||
|
||||
|
@ -4433,6 +4434,15 @@ int os::available(int fd, jlong *bytes) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
int os::socket_available(int fd, jint *pbytes) {
|
||||
// Linux doc says EINTR not returned, unlike Solaris
|
||||
int ret = ::ioctl(fd, FIONREAD, pbytes);
|
||||
|
||||
//%% note ioctl can return 0 when successful, JVM_SocketAvailable
|
||||
// is expected to return 0 on failure and 1 on success to the jdk.
|
||||
return (ret < 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
// Map a block of memory.
|
||||
char* os::map_memory(int fd, const char* file_name, size_t file_offset,
|
||||
char *addr, size_t bytes, bool read_only,
|
||||
|
|
|
@ -45,7 +45,6 @@
|
|||
#include <unistd.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/poll.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <netdb.h>
|
||||
|
||||
inline void* os::thread_local_storage_at(int index) {
|
||||
|
@ -268,16 +267,6 @@ inline int os::sendto(int fd, char *buf, int len, int flags,
|
|||
RESTARTABLE_RETURN_INT(::sendto(fd, buf, len, (unsigned int) flags, to, tolen));
|
||||
}
|
||||
|
||||
inline int os::socket_available(int fd, jint *pbytes) {
|
||||
// Linux doc says EINTR not returned, unlike Solaris
|
||||
int ret = ::ioctl(fd, FIONREAD, pbytes);
|
||||
|
||||
//%% note ioctl can return 0 when successful, JVM_SocketAvailable
|
||||
// is expected to return 0 on failure and 1 on success to the jdk.
|
||||
return (ret < 0) ? 0 : 1;
|
||||
}
|
||||
|
||||
|
||||
inline int os::socket_shutdown(int fd, int howto){
|
||||
return ::shutdown(fd, howto);
|
||||
}
|
||||
|
|
|
@ -44,11 +44,11 @@ void VMError::show_message_box(char *buf, int buflen) {
|
|||
jio_snprintf(p, buflen - len,
|
||||
"\n\n"
|
||||
"Do you want to debug the problem?\n\n"
|
||||
"To debug, run 'gdb /proc/%d/exe %d'; then switch to thread " INTX_FORMAT "\n"
|
||||
"To debug, run 'gdb /proc/%d/exe %d'; then switch to thread " INTX_FORMAT " (" INTPTR_FORMAT ")\n"
|
||||
"Enter 'yes' to launch gdb automatically (PATH must include gdb)\n"
|
||||
"Otherwise, press RETURN to abort...",
|
||||
os::current_process_id(), os::current_process_id(),
|
||||
os::current_thread_id());
|
||||
os::current_thread_id(), os::current_thread_id());
|
||||
|
||||
yes = os::message_box("Unexpected Error", buf);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue