[x264-devel] [Git][videolan/x264][master] Use sysctlbyname(3) hw.logicalcpu on macOS

Anton Mitrofanov (@BugMaster) gitlab at videolan.org
Sun Dec 29 15:59:11 UTC 2024



Anton Mitrofanov pushed to branch master at VideoLAN / x264


Commits:
938601b9 by Brad Smith at 2024-12-29T15:52:24+00:00
Use sysctlbyname(3) hw.logicalcpu on macOS

Use of hw.ncpu has long been deprecated.

- - - - -


1 changed file:

- common/cpu.c


Changes:

=====================================
common/cpu.c
=====================================
@@ -571,7 +571,7 @@ int x264_cpu_num_processors( void )
 #elif SYS_MACOSX
     int ncpu;
     size_t length = sizeof( ncpu );
-    if( sysctlbyname("hw.ncpu", &ncpu, &length, NULL, 0) )
+    if( sysctlbyname("hw.logicalcpu", &ncpu, &length, NULL, 0) )
     {
         ncpu = 1;
     }



View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/938601b9069eba63c09406776c2186b78d773660

-- 
View it on GitLab: https://code.videolan.org/videolan/x264/-/commit/938601b9069eba63c09406776c2186b78d773660
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the x264-devel mailing list