mirror of
https://github.com/owntone/owntone-server.git
synced 2024-12-25 22:55:56 -05:00
Add condition for FreeBSD, ignore SCHED_BATCH in filescanner.c
This commit is contained in:
parent
8c9793d9ef
commit
2fc681a971
@ -1079,8 +1079,9 @@ bulk_scan(int flags)
|
|||||||
static void *
|
static void *
|
||||||
filescanner(void *arg)
|
filescanner(void *arg)
|
||||||
{
|
{
|
||||||
struct sched_param param;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
#if defined(__linux__)
|
||||||
|
struct sched_param param;
|
||||||
|
|
||||||
/* Lower the priority of the thread so forked-daapd may still respond
|
/* Lower the priority of the thread so forked-daapd may still respond
|
||||||
* during file scan on low power devices. Param must be 0 for the SCHED_BATCH
|
* during file scan on low power devices. Param must be 0 for the SCHED_BATCH
|
||||||
@ -1092,6 +1093,7 @@ filescanner(void *arg)
|
|||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_SCAN, "Warning: Could not set thread priority to SCHED_BATCH\n");
|
DPRINTF(E_LOG, L_SCAN, "Warning: Could not set thread priority to SCHED_BATCH\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
ret = db_perthread_init();
|
ret = db_perthread_init();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user