< prev index next >

src/hotspot/os/linux/os_linux.inline.hpp

Print this page
rev 52814 : 8214773: Replace use of thread unsafe strtok
Reviewed-by:


  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef OS_LINUX_VM_OS_LINUX_INLINE_HPP
  26 #define OS_LINUX_VM_OS_LINUX_INLINE_HPP
  27 
  28 #include "runtime/os.hpp"
  29 
  30 // System includes
  31 
  32 #include <unistd.h>
  33 #include <sys/socket.h>
  34 #include <poll.h>
  35 #include <netdb.h>
  36 





  37 // File names are case-insensitive on windows only
  38 inline int os::file_name_strncmp(const char* s1, const char* s2, size_t num) {
  39   return strncmp(s1, s2, num);
  40 }
  41 
  42 inline bool os::uses_stack_guard_pages() {
  43   return true;
  44 }
  45 
  46 inline bool os::must_commit_stack_guard_pages() {
  47   assert(uses_stack_guard_pages(), "sanity check");
  48   return true;
  49 }
  50 
  51 
  52 // On Linux, reservations are made on a page by page basis, nothing to do.
  53 inline void os::pd_split_reserved_memory(char *base, size_t size,
  54                                       size_t split, bool realloc) {
  55 }
  56 




  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef OS_LINUX_VM_OS_LINUX_INLINE_HPP
  26 #define OS_LINUX_VM_OS_LINUX_INLINE_HPP
  27 
  28 #include "runtime/os.hpp"
  29 
  30 // System includes
  31 
  32 #include <unistd.h>
  33 #include <sys/socket.h>
  34 #include <poll.h>
  35 #include <netdb.h>
  36 
  37 // Use threadsafe version of strtok
  38 inline char* os::strtok(char *str, const char *delim, char **saveptr) {
  39   return strtok_r(str, delim, saveptr);
  40 }
  41 
  42 // File names are case-insensitive on windows only
  43 inline int os::file_name_strncmp(const char* s1, const char* s2, size_t num) {
  44   return strncmp(s1, s2, num);
  45 }
  46 
  47 inline bool os::uses_stack_guard_pages() {
  48   return true;
  49 }
  50 
  51 inline bool os::must_commit_stack_guard_pages() {
  52   assert(uses_stack_guard_pages(), "sanity check");
  53   return true;
  54 }
  55 
  56 
  57 // On Linux, reservations are made on a page by page basis, nothing to do.
  58 inline void os::pd_split_reserved_memory(char *base, size_t size,
  59                                       size_t split, bool realloc) {
  60 }
  61 


< prev index next >