- Timestamp:
- Nov 16, 2010 5:28:34 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 67840
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/freebsd/mp-freebsd.cpp
r33815 r34128 84 84 RTDECL(bool) RTMpIsCpuOnline(RTCPUID idCpu) 85 85 { 86 int rc = VINF_SUCCESS;87 char szName[32];88 char szDriver[10];89 size_t cbDriver = sizeof(szDriver);90 91 86 /* 92 * FreeBSD doesn't support CPU hotplugging 93 * so every CPU which appearsin the tree is also online.87 * FreeBSD doesn't support CPU hotplugging so every CPU which appears 88 * in the tree is also online. 94 89 */ 95 memset(szDriver, 0, sizeof(szDriver)); 96 memset(szName, 0, sizeof(szName)); 97 98 rc = RTStrPrintf(szName, sizeof(szName), "dev.cpu.%d.%%driver", (int)idCpu); 99 if (RT_SUCCESS(rc)) 100 { 101 int rcBsd = sysctlbyname(szName, szDriver, &cbDriver, NULL, NULL); 102 if (rcBsd == 0) 103 return true; 104 } 90 char szName[40]; 91 RTStrPrintf(szName, sizeof(szName), "dev.cpu.%d.%%driver", (int)idCpu); 92 93 char szDriver[10]; 94 size_t cbDriver = sizeof(szDriver); 95 RT_ZERO(szDevice); /* this shouldn't be necessary. */ 96 int rcBsd = sysctlbyname(szName, szDriver, &cbDriver, NULL, NULL); 97 if (rcBsd == 0) 98 return true; 105 99 106 100 return false;
Note:
See TracChangeset
for help on using the changeset viewer.