コード例 #1
0
HRESULT CLRTestHookManager::AddTestHook(ICLRTestHook* hook)
{
    WRAPPER_NO_CONTRACT;
    DWORD newidx=FastInterlockIncrement(&m_nHooks);
    if (newidx>=NumItems(m_pHooks))
    {
        FastInterlockDecrement(&m_nHooks);
        return DISP_E_OVERFLOW;
    }
    m_pHooks[newidx-1].Set(hook);
    return S_OK;
}
コード例 #2
0
ファイル: gcscan.cpp プロジェクト: Spo1ler/mono
void CNameSpace::GcRuntimeStructuresValid (BOOL bValid)
{
    WRAPPER_NO_CONTRACT;
    if (!bValid)
    {
        LONG result;
        result = FastInterlockIncrement (&m_GcStructuresInvalidCnt);
        _ASSERTE (result > 0);
    }
    else
    {
        LONG result;
        result = FastInterlockDecrement (&m_GcStructuresInvalidCnt);
        _ASSERTE (result >= 0);
    }
}
コード例 #3
0
ULONG CLRTestHookManager::Release()
{
    ULONG nRet= FastInterlockDecrement(&m_cRef);
    // never goes away
    return nRet;
}