6028 // is expected to return 0 on failure and 1 on success to the jdk. 6029 return (ret == OS_ERR) ? 0 : 1; 6030 } 6031 6032 int os::bind(int fd, struct sockaddr* him, socklen_t len) { 6033 assert(((JavaThread*)Thread::current())->thread_state() == _thread_in_native, 6034 "Assumed _thread_in_native"); 6035 return ::bind(fd, him, len); 6036 } 6037 6038 // Get the default path to the core file 6039 // Returns the length of the string 6040 int os::get_core_path(char* buffer, size_t bufferSize) { 6041 const char* p = get_current_directory(buffer, bufferSize); 6042 6043 if (p == NULL) { 6044 assert(p != NULL, "failed to get current directory"); 6045 return 0; 6046 } 6047 6048 return strlen(buffer); 6049 } 6050 6051 #ifndef PRODUCT 6052 void TestReserveMemorySpecial_test() { 6053 // No tests available for this platform 6054 } 6055 #endif | 6028 // is expected to return 0 on failure and 1 on success to the jdk. 6029 return (ret == OS_ERR) ? 0 : 1; 6030 } 6031 6032 int os::bind(int fd, struct sockaddr* him, socklen_t len) { 6033 assert(((JavaThread*)Thread::current())->thread_state() == _thread_in_native, 6034 "Assumed _thread_in_native"); 6035 return ::bind(fd, him, len); 6036 } 6037 6038 // Get the default path to the core file 6039 // Returns the length of the string 6040 int os::get_core_path(char* buffer, size_t bufferSize) { 6041 const char* p = get_current_directory(buffer, bufferSize); 6042 6043 if (p == NULL) { 6044 assert(p != NULL, "failed to get current directory"); 6045 return 0; 6046 } 6047 6048 jio_snprintf(buffer, bufferSize, "%s/core or core.%d", current_process_id()); 6049 6050 return strlen(buffer); 6051 } 6052 6053 #ifndef PRODUCT 6054 void TestReserveMemorySpecial_test() { 6055 // No tests available for this platform 6056 } 6057 #endif |