tracesrv/tracecore/btrace_handler/inc/TraceCoreActivationBase.inl
changeset 56 aa2539c91954
equal deleted inserted replaced
54:a151135b0cf9 56:aa2539c91954
       
     1 // Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Base class for activation classes
       
    15 //
       
    16 
       
    17 #ifndef __TRACECOREACTIVATIONBASE_INL__
       
    18 #define __TRACECOREACTIVATIONBASE_INL__
       
    19 
       
    20 #include <kern_priv.h>
       
    21 #include "TraceCoreActivationBase.h"
       
    22 
       
    23 
       
    24 inline TInt DTraceCoreActivationBase::ReadLock()
       
    25     {
       
    26 #if defined(__SMP__)
       
    27    return __SPIN_LOCK_IRQSAVE(iActivationReadLock);
       
    28 #else
       
    29     return NKern::DisableAllInterrupts();
       
    30 #endif
       
    31     }
       
    32 
       
    33 
       
    34 inline void DTraceCoreActivationBase::ReadUnlock(TInt aIrqLevel)
       
    35     {
       
    36 #if defined(__SMP__)
       
    37     __SPIN_UNLOCK_IRQRESTORE(iActivationReadLock, aIrqLevel);
       
    38 #else
       
    39     NKern::RestoreInterrupts(aIrqLevel);
       
    40 #endif
       
    41     }
       
    42 
       
    43 
       
    44 #endif
       
    45