windowing/windowserver/test/t_ratelimiter/inc/panics.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     1 // Copyright (c) 2008-2009 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 //
       
    15 
       
    16 #ifndef __PANICS_H__
       
    17 #define __PANICS_H__
       
    18 
       
    19 enum TRateLimiterPanic
       
    20 	{
       
    21 	ERateLimiterPanicRateLimiterMustNotBeFinalRenderStage,
       
    22 	};
       
    23 
       
    24 void Panic(TRateLimiterPanic aPanic);
       
    25 
       
    26 #ifdef _DEBUG
       
    27 #define CHK_ASSERT_DEBUG(c, p) \
       
    28 	do { \
       
    29 		if(!(c)) \
       
    30 			{ \
       
    31 			Panic(p); \
       
    32 			} \
       
    33 		} while (EFalse)
       
    34 #else
       
    35 #define CHK_ASSERT_DEBUG(c, p)
       
    36 #endif //_DEBUG
       
    37 
       
    38 #define CHK_ASSERT_ALWAYS(c, p) \
       
    39 	do { \
       
    40 		if(!(c)) \
       
    41 			{ \
       
    42 			Panic(p); \
       
    43 			} \
       
    44 		} while (EFalse)
       
    45 
       
    46 #endif // __PANICS_H__