From ec52f8c4f162af727af97cee1e79477b6d90bd64 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 17 Jan 2025 09:09:20 -0800 Subject: [PATCH] QThread/FreeBSD: remove the unnecessary Linux compat layer It's now in the FreeBSD headers themselves, so we don't need our own. Change-Id: I136aa8018a2c02f70ab8fffd484f07f287ca0305 Reviewed-by: Ahmad Samir --- src/corelib/thread/qthread_unix.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index 9d8d500dbcd..3de6acf3831 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -502,15 +502,6 @@ int QThread::idealThreadCount() noexcept cores = (int)psd.psd_proc_cnt; } #elif (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || defined(Q_OS_FREEBSD) -# if defined(Q_OS_FREEBSD) && !defined(CPU_COUNT_S) -# define CPU_COUNT_S(setsize, cpusetp) ((int)BIT_COUNT(setsize, cpusetp)) - // match the Linux API for simplicity - using cpu_set_t = cpuset_t; - auto sched_getaffinity = [](pid_t, size_t cpusetsize, cpu_set_t *mask) { - return cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, cpusetsize, mask); - }; -# endif - // get the number of threads we're assigned, not the total in the system QVarLengthArray cpuset(1); int size = 1;