本文整理汇总了C++中PRTMPARGS类的典型用法代码示例。如果您正苦于以下问题:C++ PRTMPARGS类的具体用法?C++ PRTMPARGS怎么用?C++ PRTMPARGS使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PRTMPARGS类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rtmpOnOthersFreeBSDWrapper
/**
* Wrapper between the native FreeBSD per-cpu callback and PFNRTWORKER
* for the RTMpOnOthers API.
*
* @param pvArg Pointer to the RTMPARGS package.
*/
static void rtmpOnOthersFreeBSDWrapper(void *pvArg)
{
PRTMPARGS pArgs = (PRTMPARGS)pvArg;
RTCPUID idCpu = curcpu;
if (pArgs->idCpu != idCpu)
pArgs->pfnWorker(idCpu, pArgs->pvUser1, pArgs->pvUser2);
}
示例2: rtmpNtOnAllBroadcastIpiWrapper
/**
* Wrapper between the native KIPI_BROADCAST_WORKER and IPRT's PFNRTMPWORKER for
* the RTMpOnAll case.
*
* @param uUserCtx The user context argument (PRTMPARGS).
*/
static ULONG_PTR __stdcall rtmpNtOnAllBroadcastIpiWrapper(ULONG_PTR uUserCtx)
{
PRTMPARGS pArgs = (PRTMPARGS)uUserCtx;
/*ASMAtomicIncU32(&pArgs->cHits); - not needed */
pArgs->pfnWorker(KeGetCurrentProcessorNumber(), pArgs->pvUser1, pArgs->pvUser2);
return 0;
}
示例3: rtmpOnOthersHaikuWrapper
/**
* Wrapper between the native Haiku per-cpu callback and PFNRTWORKER
* for the RTMpOnOthers API.
*
* @param pvArg Pointer to the RTMPARGS package.
*/
static void rtmpOnOthersHaikuWrapper(void *pvArg, int current)
{
PRTMPARGS pArgs = (PRTMPARGS)pvArg;
RTCPUID idCpu = current;
if (pArgs->idCpu != idCpu)
pArgs->pfnWorker(idCpu, pArgs->pvUser1, pArgs->pvUser2);
}
示例4: rtmpOnAllDarwinWrapper
/**
* Wrapper between the native darwin per-cpu callback and PFNRTWORKER
* for the RTMpOnAll API.
*
* @param pvArg Pointer to the RTMPARGS package.
*/
static void rtmpOnAllDarwinWrapper(void *pvArg)
{
PRTMPARGS pArgs = (PRTMPARGS)pvArg;
IPRT_DARWIN_SAVE_EFL_AC();
pArgs->pfnWorker(cpu_number(), pArgs->pvUser1, pArgs->pvUser2);
IPRT_DARWIN_RESTORE_EFL_AC();
}
示例5: rtmpOnSpecificHaikuWrapper
/**
* Wrapper between the native Haiku per-cpu callback and PFNRTWORKER
* for the RTMpOnSpecific API.
*
* @param pvArg Pointer to the RTMPARGS package.
*/
static void rtmpOnSpecificHaikuWrapper(void *pvArg, int current)
{
PRTMPARGS pArgs = (PRTMPARGS)pvArg;
RTCPUID idCpu = current;
if (pArgs->idCpu == idCpu)
{
pArgs->pfnWorker(idCpu, pArgs->pvUser1, pArgs->pvUser2);
ASMAtomicIncU32(&pArgs->cHits);
}
}
示例6: rtmpNtOnSpecificBroadcastIpiWrapper
/**
* Wrapper between the native KIPI_BROADCAST_WORKER and IPRT's PFNRTMPWORKER for
* the RTMpOnSpecific case.
*
* @param uUserCtx The user context argument (PRTMPARGS).
*/
static ULONG_PTR __stdcall rtmpNtOnSpecificBroadcastIpiWrapper(ULONG_PTR uUserCtx)
{
PRTMPARGS pArgs = (PRTMPARGS)uUserCtx;
RTCPUID idCpu = KeGetCurrentProcessorNumber();
if (pArgs->idCpu == idCpu)
{
ASMAtomicIncU32(&pArgs->cHits);
pArgs->pfnWorker(idCpu, pArgs->pvUser1, pArgs->pvUser2);
}
return 0;
}
示例7: rtmpOnOthersDarwinWrapper
/**
* Wrapper between the native darwin per-cpu callback and PFNRTWORKER
* for the RTMpOnOthers API.
*
* @param pvArg Pointer to the RTMPARGS package.
*/
static void rtmpOnOthersDarwinWrapper(void *pvArg)
{
PRTMPARGS pArgs = (PRTMPARGS)pvArg;
RTCPUID idCpu = cpu_number();
if (pArgs->idCpu != idCpu)
{
IPRT_DARWIN_SAVE_EFL_AC();
pArgs->pfnWorker(idCpu, pArgs->pvUser1, pArgs->pvUser2);
IPRT_DARWIN_RESTORE_EFL_AC();
}
}
示例8: rtmpOnSpecificLinuxWrapper
/**
* Wrapper between the native linux per-cpu callbacks and PFNRTWORKER
* employed by RTMpOnSpecific on older kernels that lacks smp_call_function_single.
*
* @param pvInfo Pointer to the RTMPARGS package.
*/
static void rtmpOnSpecificLinuxWrapper(void *pvInfo)
{
PRTMPARGS pArgs = (PRTMPARGS)pvInfo;
RTCPUID idCpu = RTMpCpuId();
if (idCpu == pArgs->idCpu)
{
pArgs->pfnWorker(idCpu, pArgs->pvUser1, pArgs->pvUser2);
ASMAtomicIncU32(&pArgs->cHits);
}
}
示例9: rtMpLinuxOnPairWrapper
/**
* Wrapper between the native linux per-cpu callbacks and PFNRTWORKER
* employed by RTMpOnPair on older kernels that lacks smp_call_function_many.
*
* @param pvInfo Pointer to the RTMPARGS package.
*/
static void rtMpLinuxOnPairWrapper(void *pvInfo)
{
PRTMPARGS pArgs = (PRTMPARGS)pvInfo;
RTCPUID idCpu = RTMpCpuId();
if ( idCpu == pArgs->idCpu
|| idCpu == pArgs->idCpu2)
{
pArgs->pfnWorker(idCpu, pArgs->pvUser1, pArgs->pvUser2);
ASMAtomicIncU32(&pArgs->cHits);
}
}
示例10: rtMpSolOnOtherCpusWrapper
/**
* Wrapper between the native solaris per-cpu callback and PFNRTWORKER
* for the RTMpOnOthers API.
*
* @param uArgs Pointer to the RTMPARGS package.
* @param uIgnored1 Ignored.
* @param uIgnored2 Ignored.
*/
static int rtMpSolOnOtherCpusWrapper(void *uArg, void *uIgnored1, void *uIgnored2)
{
PRTMPARGS pArgs = (PRTMPARGS)(uArg);
RTCPUID idCpu = RTMpCpuId();
Assert(idCpu != pArgs->idCpu);
pArgs->pfnWorker(idCpu, pArgs->pvUser1, pArgs->pvUser2);
NOREF(uIgnored1);
NOREF(uIgnored2);
return 0;
}
示例11: rtMpSolOnSpecificCpuWrapper
/**
* Wrapper between the native solaris per-cpu callback and PFNRTWORKER
* for the RTMpOnSpecific API.
*
* @param uArgs Pointer to the RTMPARGS package.
* @param uIgnored1 Ignored.
* @param uIgnored2 Ignored.
*
* @returns Solaris error code.
*/
static int rtMpSolOnSpecificCpuWrapper(void *uArg, void *uIgnored1, void *uIgnored2)
{
PRTMPARGS pArgs = (PRTMPARGS)(uArg);
RTCPUID idCpu = RTMpCpuId();
Assert(idCpu == pArgs->idCpu);
pArgs->pfnWorker(idCpu, pArgs->pvUser1, pArgs->pvUser2);
ASMAtomicIncU32(&pArgs->cHits);
NOREF(uIgnored1);
NOREF(uIgnored2);
return 0;
}
示例12: rtmpLinuxAllWrapper
/**
* Wrapper between the native linux all-cpu callbacks and PFNRTWORKER.
*
* @param pvInfo Pointer to the RTMPARGS package.
*/
static void rtmpLinuxAllWrapper(void *pvInfo)
{
PRTMPARGS pArgs = (PRTMPARGS)pvInfo;
PRTCPUSET pWorkerSet = pArgs->pWorkerSet;
RTCPUID idCpu = RTMpCpuId();
Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD));
if (RTCpuSetIsMember(pWorkerSet, idCpu))
{
pArgs->pfnWorker(idCpu, pArgs->pvUser1, pArgs->pvUser2);
RTCpuSetDel(pWorkerSet, idCpu);
}
}
示例13: rtmpNtDPCWrapper
/**
* Wrapper between the native nt per-cpu callbacks and PFNRTWORKER
*
* @param Dpc DPC object
* @param DeferredContext Context argument specified by KeInitializeDpc
* @param SystemArgument1 Argument specified by KeInsertQueueDpc
* @param SystemArgument2 Argument specified by KeInsertQueueDpc
*/
static VOID __stdcall rtmpNtDPCWrapper(IN PKDPC Dpc, IN PVOID DeferredContext, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
{
PRTMPARGS pArgs = (PRTMPARGS)DeferredContext;
ASMAtomicIncU32(&pArgs->cHits);
pArgs->pfnWorker(KeGetCurrentProcessorNumber(), pArgs->pvUser1, pArgs->pvUser2);
/* Dereference the argument structure. */
int32_t cRefs = ASMAtomicDecS32(&pArgs->cRefs);
Assert(cRefs >= 0);
if (cRefs == 0)
ExFreePool(pArgs);
}
示例14: rtMpSolOnAllCpuWrapper
/**
* Wrapper between the native solaris per-cpu callback and PFNRTWORKER
* for the RTMpOnAll API.
*
* @param uArgs Pointer to the RTMPARGS package.
* @param uIgnored1 Ignored.
* @param uIgnored2 Ignored.
*/
static int rtMpSolOnAllCpuWrapper(void *uArg, void *uIgnored1, void *uIgnored2)
{
PRTMPARGS pArgs = (PRTMPARGS)(uArg);
/*
* Solaris CPU cross calls execute on offline CPUs too. Check our CPU cache
* set and ignore if it's offline.
*/
if (!RTMpIsCpuOnline(RTMpCpuId()))
return 0;
pArgs->pfnWorker(RTMpCpuId(), pArgs->pvUser1, pArgs->pvUser2);
NOREF(uIgnored1);
NOREF(uIgnored2);
return 0;
}
示例15: rtmpLinuxWrapper
/**
* Wrapper between the native linux per-cpu callbacks and PFNRTWORKER
*
* @param pvInfo Pointer to the RTMPARGS package.
*/
static void rtmpLinuxWrapper(void *pvInfo)
{
PRTMPARGS pArgs = (PRTMPARGS)pvInfo;
ASMAtomicIncU32(&pArgs->cHits);
pArgs->pfnWorker(RTMpCpuId(), pArgs->pvUser1, pArgs->pvUser2);
}