/[pcsx2_0.9.7]/trunk/common/src/x86emitter/LnxCpuDetect.cpp
ViewVC logotype

Contents of /trunk/common/src/x86emitter/LnxCpuDetect.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 280 - (show annotations) (download)
Thu Dec 23 12:02:12 2010 UTC (9 years, 1 month ago) by william
File size: 1800 byte(s)
re-commit (had local access denied errors when committing)
1 /* Cpudetection lib
2 * Copyright (C) 2002-2010 PCSX2 Dev Team
3 *
4 * PCSX2 is free software: you can redistribute it and/or modify it under the terms
5 * of the GNU Lesser General Public License as published by the Free Software Found-
6 * ation, either version 3 of the License, or (at your option) any later version.
7 *
8 * PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10 * PURPOSE. See the GNU General Public License for more details.
11 *
12 * You should have received a copy of the GNU General Public License along with PCSX2.
13 * If not, see <http://www.gnu.org/licenses/>.
14 */
15
16
17 #include "PrecompiledHeader.h"
18 #include "cpudetect_internal.h"
19 #include <wx/thread.h>
20
21 // Note: Apparently this solution is Linux/Solaris only.
22 // FreeBSD/OsX need something far more complicated (apparently)
23 void x86capabilities::CountLogicalCores()
24 {
25 // Note : GetCPUCount uses sysconf( _SC_NPROCESSORS_ONLN ) internally, which can return 1
26 // if sysconf info isn't available (a long standing linux bug). There are no fallbacks or
27 // alternatives, apparently.
28 LogicalCores = wxThread::GetCPUCount();
29 }
30
31 bool CanEmitShit()
32 {
33 // In Linux I'm pretty sure TLS always works, none of the funny business that Windows
34 // has involving DLLs. >_<
35 return true;
36 }
37
38 bool CanTestInstructionSets()
39 {
40 // Not implemented yet for linux. (see cpudetect_internal.h for details)
41 return false;
42 }
43
44 bool _test_instruction( void* pfnCall )
45 {
46 // Not implemented yet for linux. (see cpudetect_internal.h for details)
47 return false;
48 }
49
50 // Not implemented yet for linux (see cpudetect_internal.h for details)
51 SingleCoreAffinity::SingleCoreAffinity() {}
52 SingleCoreAffinity::~SingleCoreAffinity() throw() {}

  ViewVC Help
Powered by ViewVC 1.1.22