summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorblingu <36486731+blingu@users.noreply.github.com>2020-08-05 14:32:37 +0200
committerGitHub <noreply@github.com>2020-08-05 14:32:37 +0200
commit7a7b3527932d4ef5ff7d1676f8af022ae28cbdf5 (patch)
treea0a79c5287c5c038c66842c629464722b2c17382 /src/core
parentadded partial bsd support (FreeBSD) (diff)
downloadre3-7a7b3527932d4ef5ff7d1676f8af022ae28cbdf5.tar
re3-7a7b3527932d4ef5ff7d1676f8af022ae28cbdf5.tar.gz
re3-7a7b3527932d4ef5ff7d1676f8af022ae28cbdf5.tar.bz2
re3-7a7b3527932d4ef5ff7d1676f8af022ae28cbdf5.tar.lz
re3-7a7b3527932d4ef5ff7d1676f8af022ae28cbdf5.tar.xz
re3-7a7b3527932d4ef5ff7d1676f8af022ae28cbdf5.tar.zst
re3-7a7b3527932d4ef5ff7d1676f8af022ae28cbdf5.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/CdStreamPosix.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/CdStreamPosix.cpp b/src/core/CdStreamPosix.cpp
index 45fd9832..ff36c18f 100644
--- a/src/core/CdStreamPosix.cpp
+++ b/src/core/CdStreamPosix.cpp
@@ -150,9 +150,11 @@ CdStreamInit(int32 numChannels)
ASSERT(0);
return;
}
-
+#ifdef __linux__
_gdwCdStreamFlags = O_RDONLY | O_NOATIME;
-
+#elif __FreeBSD__
+ _gdwCdStreamFlags = O_RDONLY;
+#endif
// People say it's slower
/*
if ( fsInfo.f_bsize <= CDSTREAM_SECTOR_SIZE )
@@ -400,9 +402,12 @@ void *CdStreamThread(void *param)
if (gCdStreamThreadStatus == 0){
gCdStreamThreadStatus = 1;
#endif
+
+#ifdef __linux__
pid_t tid = syscall(SYS_gettid);
int ret = setpriority(PRIO_PROCESS, tid, getpriority(PRIO_PROCESS, getpid()) + 1);
- }
+#endif
+ }
// spurious wakeup or we sent interrupt signal for flushing
if(pChannel->nSectorsToRead == 0)