Wasabi ExpressPlay SDK for Embedded Systems  1.10
ShiUtil.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | Wasabi - Helper macros
4 |
5 | $Id: ShiUtil.h 7869 2014-03-12 20:34:27Z pkhambete $
6 | Original author: Edin Hodzic (dino@concisoft.com)
7 |
8 | This software is provided to you pursuant to your agreement
9 | with Intertrust Technologies Corporation ("Intertrust").
10 | This software may be used only in accordance with the terms
11 | of the agreement.
12 |
13 | Copyright (c) 2014 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
16 
17 #ifndef _SHI_UTIL_H_
18 #define _SHI_UTIL_H_
19 
20 #if !defined(_SHI_JB)
21 #ifdef __APPLE__
22 #include <TargetConditionals.h>
23 #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE && \
24  (!defined(TARGET_IPHONE_SIMULATOR) || !TARGET_IPHONE_SIMULATOR)
25 #define _SHI_JB 1
26 #else // iOS
27 #define _SHI_JB 0
28 #endif // iOS
29 #else // __APPLE__
30 #ifdef ANDROID
31 #define _SHI_JB 1
32 #else // ANDROID
33 #define _SHI_JB 0
34 #endif // ANDROID
35 #endif // __APPLE__
36 #endif // !defined(_SHI_JB)
37 
38 #if _SHI_JB
39 
40 #define SHI_ENTRY_VAR(N) __shi_performance_counter_##N
41 
42 #define SHI_DECLARE_ENTRY_VAR(N) extern int SHI_ENTRY_VAR(N)
43 
44 #define SHI_DEFINE_ENTRY_VAR(N) int SHI_ENTRY_VAR(N) = 0
45 
46 #define SHI_SET_ENTRY_VAR(N) SHI_ENTRY_VAR(N) = 1
47 
48 #define SHI_CLEAR_ENTRY_VAR(N) SHI_ENTRY_VAR(N) = 0
49 
50 #define SHI_IS_SET_ENTRY_VAR(N) SHI_ENTRY_VAR(N)
51 
52 #else // _SHI_JB
53 
54 #define SHI_ENTRY_VAR(N) __shi_performance_counter_##N
55 
56 #define SHI_DECLARE_ENTRY_VAR(N) extern char SHI_ENTRY_VAR(N)
57 
58 #define SHI_DEFINE_ENTRY_VAR(N) char SHI_ENTRY_VAR(N)
59 
60 #define SHI_SET_ENTRY_VAR(N) ((void)0)
61 
62 #define SHI_CLEAR_ENTRY_VAR(N) ((void)0)
63 
64 #define SHI_IS_SET_ENTRY_VAR(N) 0
65 
66 #endif // _SHI_JB
67 
68 #endif // _SHI_UTIL_H_