< prev index next >

src/hotspot/os/solaris/os_solaris.inline.hpp

Print this page
rev 50955 : [mq]: readdir


  51   int r = thr_main() ;
  52   guarantee (r == 0 || r == 1, "CR6501650 or CR6493689") ;
  53   return r;
  54 }
  55 
  56 
  57 // On Solaris, 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 
  62 
  63 // Bang the shadow pages if they need to be touched to be mapped.
  64 inline void os::map_stack_shadow_pages(address sp) {
  65 }
  66 
  67 inline void os::dll_unload(void *lib) { ::dlclose(lib); }
  68 
  69 inline const int os::default_file_open_flags() { return 0;}
  70 
  71 inline DIR* os::opendir(const char* dirname) {
  72   assert(dirname != NULL, "just checking");
  73   return ::opendir(dirname);
  74 }
  75 
  76 inline int os::readdir_buf_size(const char *path) {
  77   int size = pathconf(path, _PC_NAME_MAX);
  78   return (size < 0 ? MAXPATHLEN : size) + sizeof(dirent) + 1;
  79 }
  80 
  81 inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf) {
  82   assert(dirp != NULL, "just checking");
  83   dirent* p;
  84   int status;
  85 
  86   if((status = ::readdir_r(dirp, dbuf, &p)) != 0) {
  87     errno = status;
  88     return NULL;
  89   } else {
  90     return p;
  91   }
  92 }
  93 
  94 inline int os::closedir(DIR *dirp) {
  95   assert(dirp != NULL, "argument is NULL");
  96   return ::closedir(dirp);
  97 }
  98 
  99 //////////////////////////////////////////////////////////////////////////////
 100 ////////////////////////////////////////////////////////////////////////////////
 101 
 102 // macros for restartable system calls
 103 
 104 #define RESTARTABLE(_cmd, _result) do { \
 105   do { \
 106     _result = _cmd; \
 107   } while((_result == OS_ERR) && (errno == EINTR)); \
 108 } while(false)
 109 
 110 #define RESTARTABLE_RETURN_INT(_cmd) do { \
 111   int _result; \
 112   RESTARTABLE(_cmd, _result); \
 113   return _result; \
 114 } while(false)
 115 
 116 inline bool os::numa_has_static_binding()   { return false; }
 117 inline bool os::numa_has_group_homing()     { return true;  }
 118 


  51   int r = thr_main() ;
  52   guarantee (r == 0 || r == 1, "CR6501650 or CR6493689") ;
  53   return r;
  54 }
  55 
  56 
  57 // On Solaris, 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 
  62 
  63 // Bang the shadow pages if they need to be touched to be mapped.
  64 inline void os::map_stack_shadow_pages(address sp) {
  65 }
  66 
  67 inline void os::dll_unload(void *lib) { ::dlclose(lib); }
  68 
  69 inline const int os::default_file_open_flags() { return 0;}
  70 




























  71 //////////////////////////////////////////////////////////////////////////////
  72 ////////////////////////////////////////////////////////////////////////////////
  73 
  74 // macros for restartable system calls
  75 
  76 #define RESTARTABLE(_cmd, _result) do { \
  77   do { \
  78     _result = _cmd; \
  79   } while((_result == OS_ERR) && (errno == EINTR)); \
  80 } while(false)
  81 
  82 #define RESTARTABLE_RETURN_INT(_cmd) do { \
  83   int _result; \
  84   RESTARTABLE(_cmd, _result); \
  85   return _result; \
  86 } while(false)
  87 
  88 inline bool os::numa_has_static_binding()   { return false; }
  89 inline bool os::numa_has_group_homing()     { return true;  }
  90 
< prev index next >