Changeset 54408 in vbox
- Timestamp:
- Feb 24, 2015 2:06:56 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/err.h
r53615 r54408 926 926 /** The requested allocation is too big. */ 927 927 #define VERR_ALLOCATION_TOO_BIG (-22407) 928 /** Mismatch. */ 929 #define VERR_MISMATCH (-22408) 930 /** Wrong type. */ 931 #define VERR_WRONG_TYPE (-22409) 928 932 /** @} */ 929 933 … … 1602 1606 /** The specified cpu was not found. */ 1603 1607 #define VERR_CPU_NOT_FOUND (-801) 1608 /** Not all of the requested CPUs showed up in the PFNRTMPWORKER. */ 1609 #define VERR_NOT_ALL_CPUS_SHOWED (-802) 1610 /** Internal processing error in the RTMp code.*/ 1611 #define VERR_CPU_IPE_1 (-803) 1604 1612 /** @} */ 1605 1613 -
trunk/include/iprt/mp.h
r54382 r54408 246 246 typedef FNRTMPWORKER *PFNRTMPWORKER; 247 247 248 /** @name RTMPON_F_XXX - RTMpOn flags. 249 * @{ */ 250 /** Caller doesn't care if pfnWorker is executed at the same time on the 251 * specified CPUs or not, as long as it gets executed. */ 252 #define RTMPON_F_WHATEVER_EXEC 0 253 /** The caller insists on pfnWorker being executed more or less concurrently 254 * on the specified CPUs. */ 255 #define RTMPON_F_CONCURRENT_EXEC RT_BIT_32(1) 256 /** Mask of valid bits. */ 257 #define RTMPON_F_VALID_MASK UINT32_C(0x00000001) 258 /** @}*/ 259 248 260 /** 249 261 * Checks if the RTMpOnAll() is safe with regards to all threads executing … … 308 320 */ 309 321 RTDECL(int) RTMpOnSpecific(RTCPUID idCpu, PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2); 322 323 /** 324 * Executes a function on two specific CPUs in the system. 325 * 326 * @returns IPRT status code. 327 * @retval VINF_SUCCESS on success. 328 * @retval VERR_NOT_SUPPORTED if this kind of operation isn't supported by the 329 * system or if the specified modifier flag isn't supported. 330 * @retval VERR_CPU_OFFLINE if one or more of the CPUs are offline (see 331 * remarks). 332 * @retval VERR_CPU_NOT_FOUND if on or both of the CPUs weren't found. 333 * @retval VERR_NOT_ALL_CPUS_SHOWED if one of the CPUs didn't show. 334 * 335 * @param idCpu1 The id of the first CPU. 336 * @param idCpu2 The id of the second CPU. 337 * @param fFlags Combination of RTMPON_F_XXX flags. 338 * @param pfnWorker The worker function. 339 * @param pvUser1 The first user argument for the worker. 340 * @param pvUser2 The second user argument for the worker. 341 * 342 * @remarks There is a possible race between one (or both) of the CPUs going 343 * offline while setting up the call. The worker function must take 344 * this into account. 345 */ 346 RTDECL(int) RTMpOnPair(RTCPUID idCpu1, RTCPUID idCpu2, uint32_t fFlags, PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2); 347 348 /** 349 * Indicates whether RTMpOnPair supports running the pfnWorker concurrently on 350 * both CPUs using RTMPON_F_CONCURRENT_EXEC. 351 * 352 * @returns true if supported, false if not. 353 */ 354 RTDECL(bool) RTMpOnPairIsConcurrentExecSupported(void); 355 310 356 311 357 /** -
trunk/src/VBox/Runtime/Makefile.kmk
r54319 r54408 1870 1870 generic/RTMpGetCoreCount-generic.cpp \ 1871 1871 generic/mppresent-generic.cpp \ 1872 generic/RTMpOnPair-generic.cpp \ 1872 1873 r0drv/linux/alloc-r0drv-linux.c \ 1873 1874 r0drv/linux/assert-r0drv-linux.c \ … … 2001 2002 generic/mppresent-generic.cpp \ 2002 2003 generic/RTMpGetCoreCount-generic.cpp \ 2004 generic/RTMpOnPair-generic.cpp \ 2003 2005 nt/RTErrConvertFromNtStatus.cpp \ 2004 2006 r0drv/generic/threadctxhooks-r0drv-generic.cpp \ … … 2040 2042 generic/RTTimerCreate-generic.cpp \ 2041 2043 generic/RTMpGetCoreCount-generic.cpp \ 2044 generic/RTMpOnPair-generic.cpp \ 2042 2045 generic/mppresent-generic.cpp \ 2043 2046 generic/timer-generic.cpp \ … … 2137 2140 generic/RTLogWriteDebugger-generic.cpp \ 2138 2141 generic/RTLogWriteStdOut-stub-generic.cpp \ 2142 generic/RTMpOnPair-generic.cpp \ 2139 2143 generic/RTTimerCreate-generic.cpp \ 2140 2144 generic/mppresent-generic.cpp \ … … 2167 2171 generic/RTLogWriteStdOut-stub-generic.cpp \ 2168 2172 generic/RTMpGetCoreCount-generic.cpp \ 2173 generic/RTMpOnPair-generic.cpp \ 2169 2174 generic/RTTimerCreate-generic.cpp \ 2170 2175 generic/mppresent-generic.cpp \ … … 2202 2207 common/string/strchr.asm \ 2203 2208 generic/RTAssertShouldPanic-generic.cpp \ 2209 generic/RTMpOnPair-generic.cpp \ 2204 2210 generic/RTTimerCreate-generic.cpp \ 2205 2211 generic/mppresent-generic.cpp \ -
trunk/src/VBox/Runtime/r0drv/generic/RTMpOn-r0drv-generic.cpp
r44529 r54408 5 5 6 6 /* 7 * Copyright (C) 2008-201 0Oracle Corporation7 * Copyright (C) 2008-2015 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 45 45 46 46 47 RTDECL(bool) RTMpOnAllIsConcurrentSafe(void) 48 { 49 return false; 50 } 51 RT_EXPORT_SYMBOL(RTMpOnAllIsConcurrentSafe); 52 53 47 54 RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2) 48 55 { … … 65 72 RT_EXPORT_SYMBOL(RTMpOnSpecific); 66 73 74 75 RTDECL(int) RTMpOnPair(RTCPUID idCpu1, RTCPUID idCpu2, PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2) 76 { 77 NOREF(idCpu1); 78 NOREF(idCpu2); 79 NOREF(pfnWorker); 80 NOREF(pvUser1); 81 NOREF(pvUser2); 82 return VERR_NOT_SUP_IN_RAW_MODE; 83 } 84 RT_EXPORT_SYMBOL(RTMpOnPair); 85 86 87 88 RTDECL(bool) RTMpOnPairIsConcurrentExecSupported(void) 89 { 90 return false; 91 } 92 RT_EXPORT_SYMBOL(RTMpOnPairIsConcurrentExecSupported); 93
Note:
See TracChangeset
for help on using the changeset viewer.