From 230557ec28cef864017f70af909e25875ef01908 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 7 Sep 2010 17:53:54 +0200 Subject: [PATCH] Removed legacy threading macros. --- lib/x11/platform.h | 47 ---------------------------------------------- 1 file changed, 47 deletions(-) diff --git a/lib/x11/platform.h b/lib/x11/platform.h index b73aaf37..39a90fc6 100644 --- a/lib/x11/platform.h +++ b/lib/x11/platform.h @@ -72,53 +72,6 @@ #include #endif -// We support two different ways for getting the number of processors in -// the system: sysconf (POSIX) and sysctl (BSD?) -#if defined( _GLFW_HAS_SYSCONF ) - - // Use a single constant for querying number of online processors using - // the sysconf function (e.g. SGI defines _SC_NPROC_ONLN instead of - // _SC_NPROCESSORS_ONLN) - #ifndef _SC_NPROCESSORS_ONLN - #ifdef _SC_NPROC_ONLN - #define _SC_NPROCESSORS_ONLN _SC_NPROC_ONLN - #else - #error POSIX constant _SC_NPROCESSORS_ONLN not defined! - #endif - #endif - - // Macro for querying the number of processors - #define _glfw_numprocessors(n) n=(int)sysconf(_SC_NPROCESSORS_ONLN) - -#elif defined( _GLFW_HAS_SYSCTL ) - - #include - #include - - // Macro for querying the number of processors - #define _glfw_numprocessors(n) { \ - int mib[2], ncpu; \ - size_t len = 1; \ - mib[0] = CTL_HW; \ - mib[1] = HW_NCPU; \ - n = 1; \ - if( sysctl( mib, 2, &ncpu, &len, NULL, 0 ) != -1 ) \ - { \ - if( len > 0 ) \ - { \ - n = ncpu; \ - } \ - } \ - } - -#else - - // If neither sysconf nor sysctl is supported, assume single processor - // system - #define _glfw_numprocessors(n) n=1 - -#endif - // Pointer length integer // One day, this will most likely move into glfw.h typedef intptr_t GLFWintptr;