mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 01:54:47 +02:00
8202353: os::readdir should use readdir instead of readdir_r
8202835: jfr/event/os/TestSystemProcess.java fails on missing events Os::readdir uses POSIX readdir, drop buffer arg, fix JFR uses. Reviewed-by: coleenp, tschatzl, bsrbnd
This commit is contained in:
parent
f4723253b6
commit
9a9c824ece
22 changed files with 54 additions and 238 deletions
|
@ -69,17 +69,6 @@ inline void os::dll_unload(void *lib) {
|
|||
|
||||
inline const int os::default_file_open_flags() { return 0;}
|
||||
|
||||
inline DIR* os::opendir(const char* dirname)
|
||||
{
|
||||
assert(dirname != NULL, "just checking");
|
||||
return ::opendir(dirname);
|
||||
}
|
||||
|
||||
inline int os::readdir_buf_size(const char *path)
|
||||
{
|
||||
return NAME_MAX + sizeof(dirent) + 1;
|
||||
}
|
||||
|
||||
inline jlong os::lseek(int fd, jlong offset, int whence) {
|
||||
return (jlong) ::lseek64(fd, offset, whence);
|
||||
}
|
||||
|
@ -92,17 +81,6 @@ inline int os::ftruncate(int fd, jlong length) {
|
|||
return ::ftruncate64(fd, length);
|
||||
}
|
||||
|
||||
inline struct dirent* os::readdir(DIR* dirp, dirent *dbuf)
|
||||
{
|
||||
assert(dirp != NULL, "just checking");
|
||||
return ::readdir(dirp);
|
||||
}
|
||||
|
||||
inline int os::closedir(DIR *dirp) {
|
||||
assert(dirp != NULL, "argument is NULL");
|
||||
return ::closedir(dirp);
|
||||
}
|
||||
|
||||
// macros for restartable system calls
|
||||
|
||||
#define RESTARTABLE(_cmd, _result) do { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue