epoc32/include/assp/omap3530_assp/locks.h
branchSymbian3
changeset 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/assp/omap3530_assp/locks.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -0,0 +1,140 @@
     1.4 +// Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __95_locks_h__
    1.20 +#define __95_locks_h__
    1.21 +
    1.22 +/**
    1.23 +@publishedPartner
    1.24 +@prototype
    1.25 +*/
    1.26 +#define __SPIN_LOCK_IRQ_R(lock)					((void)NKern::DisableAllInterrupts())
    1.27 +
    1.28 +/**
    1.29 +@publishedPartner
    1.30 +@prototype
    1.31 +*/
    1.32 +#define __SPIN_UNLOCK_IRQ_R(lock)				(NKern::EnableAllInterrupts())
    1.33 +
    1.34 +/**
    1.35 +@publishedPartner
    1.36 +@prototype
    1.37 +*/
    1.38 +#define __SPIN_FLASH_IRQ_R(lock)				(NKern::EnableAllInterrupts(),(void)NKern::DisableAllInterrupts(),((TBool)TRUE))
    1.39 +
    1.40 +/**
    1.41 +@publishedPartner
    1.42 +@prototype
    1.43 +*/
    1.44 +#define __SPIN_LOCK_IRQ_W(lock)					((void)NKern::DisableAllInterrupts())
    1.45 +
    1.46 +/**
    1.47 +@publishedPartner
    1.48 +@prototype
    1.49 +*/
    1.50 +#define __SPIN_UNLOCK_IRQ_W(lock)				(NKern::EnableAllInterrupts())
    1.51 +
    1.52 +/**
    1.53 +@publishedPartner
    1.54 +@prototype
    1.55 +*/
    1.56 +#define __SPIN_FLASH_IRQ_W(lock)				(NKern::EnableAllInterrupts(),(void)NKern::DisableAllInterrupts(),((TBool)TRUE))
    1.57 +
    1.58 +
    1.59 +/**
    1.60 +@publishedPartner
    1.61 +@prototype
    1.62 +*/
    1.63 +#define __SPIN_LOCK_R(lock)						
    1.64 +
    1.65 +/**
    1.66 +@publishedPartner
    1.67 +@prototype
    1.68 +*/
    1.69 +#define __SPIN_UNLOCK_R(lock)					
    1.70 +
    1.71 +/**
    1.72 +@internalComponent
    1.73 +*/
    1.74 +#define __SPIN_FLASH_R(lock)					((TBool)FALSE)
    1.75 +
    1.76 +/**
    1.77 +@publishedPartner
    1.78 +@prototype
    1.79 +*/
    1.80 +#define __SPIN_LOCK_W(lock)						
    1.81 +
    1.82 +/**
    1.83 +@publishedPartner
    1.84 +@prototype
    1.85 +*/
    1.86 +#define __SPIN_UNLOCK_W(lock)					
    1.87 +
    1.88 +/**
    1.89 +@internalComponent
    1.90 +*/
    1.91 +#define __SPIN_FLASH_W(lock)					((TBool)FALSE)
    1.92 +
    1.93 +
    1.94 +/**
    1.95 +@publishedPartner
    1.96 +@prototype
    1.97 +*/
    1.98 +#define __SPIN_LOCK_IRQSAVE_R(lock)				(NKern::DisableAllInterrupts())
    1.99 +
   1.100 +/**
   1.101 +@publishedPartner
   1.102 +@prototype
   1.103 +*/
   1.104 +#define __SPIN_UNLOCK_IRQRESTORE_R(lock,irq)	(NKern::RestoreInterrupts(irq))
   1.105 +
   1.106 +/**
   1.107 +@publishedPartner
   1.108 +@prototype
   1.109 +*/
   1.110 +#define __SPIN_FLASH_IRQRESTORE_R(lock,irq)		(NKern::RestoreInterrupts(irq),((void)NKern::DisableAllInterrupts()),((TBool)TRUE))
   1.111 +
   1.112 +/**
   1.113 +@publishedPartner
   1.114 +@prototype
   1.115 +*/
   1.116 +#define __SPIN_LOCK_IRQSAVE_W(lock)				(NKern::DisableAllInterrupts())
   1.117 +
   1.118 +/**
   1.119 +@publishedPartner
   1.120 +@prototype
   1.121 +*/
   1.122 +#define __SPIN_UNLOCK_IRQRESTORE_W(lock,irq)	(NKern::RestoreInterrupts(irq))
   1.123 +
   1.124 +/**
   1.125 +@publishedPartner
   1.126 +@prototype
   1.127 +*/
   1.128 +#define __SPIN_FLASH_IRQRESTORE_W(lock,irq)		(NKern::RestoreInterrupts(irq),((void)NKern::DisableAllInterrupts()),((TBool)TRUE))
   1.129 +
   1.130 +
   1.131 +/**
   1.132 +@publishedPartner
   1.133 +@prototype
   1.134 +*/
   1.135 +#define __SPIN_FLASH_PREEMPT_R(lock)			((TBool)NKern::PreemptionPoint())
   1.136 +
   1.137 +/**
   1.138 +@publishedPartner
   1.139 +@prototype
   1.140 +*/
   1.141 +#define __SPIN_FLASH_PREEMPT_W(lock)			((TBool)NKern::PreemptionPoint())
   1.142 +
   1.143 +#endif
   1.144 \ No newline at end of file