From 7a7b3527932d4ef5ff7d1676f8af022ae28cbdf5 Mon Sep 17 00:00:00 2001 From: blingu <36486731+blingu@users.noreply.github.com> Date: Wed, 5 Aug 2020 14:32:37 +0200 Subject: added FreeBSD support --- src/core/CdStreamPosix.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/core/CdStreamPosix.cpp') 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) -- cgit v1.2.3 From 4b6cc0188bcbfa0469d2d1d7ed674945e243b5cb Mon Sep 17 00:00:00 2001 From: blingu <36486731+blingu@users.noreply.github.com> Date: Fri, 7 Aug 2020 17:51:15 +0200 Subject: Update CdStreamPosix.cpp --- src/core/CdStreamPosix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/CdStreamPosix.cpp') diff --git a/src/core/CdStreamPosix.cpp b/src/core/CdStreamPosix.cpp index ff36c18f..e114a29a 100644 --- a/src/core/CdStreamPosix.cpp +++ b/src/core/CdStreamPosix.cpp @@ -152,7 +152,7 @@ CdStreamInit(int32 numChannels) } #ifdef __linux__ _gdwCdStreamFlags = O_RDONLY | O_NOATIME; -#elif __FreeBSD__ +#else _gdwCdStreamFlags = O_RDONLY; #endif // People say it's slower -- cgit v1.2.3