|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __GLIBBACKEND_WSD_H__ |
|
22 #define __GLIBBACKEND_WSD_H__ |
|
23 |
|
24 #if (defined(__SYMBIAN32__) && (defined(__WINSCW__) || defined(__WINS__))) |
|
25 #include <pthread.h> |
|
26 #include <e32cmn.h> |
|
27 |
|
28 /* ---------------------- MACRO DEFINATIONS ---------------------------*/ |
|
29 #ifndef EMULATOR |
|
30 #define EMULATOR (defined(__SYMBIAN32__) && (defined(__WINSCW__) || defined(__WINS__))) |
|
31 #endif /* EMULATOR */ |
|
32 |
|
33 #define VARIABLE_NAME(var,filename) s_##filename##_##var |
|
34 |
|
35 #define FUNCTION_NAME(var,filename) _s_##filename##_##var |
|
36 |
|
37 #define VARIABLE_DECL(var,filename,datatype)\ |
|
38 datatype VARIABLE_NAME(var,filename); |
|
39 |
|
40 #define RETURN_VAL(var,filename) (Glibbackend_ImpurePtr()->VARIABLE_NAME(var,filename)) |
|
41 |
|
42 #define PLS(var,filename,type) \ |
|
43 type *FUNCTION_NAME(var,filename)() \ |
|
44 { \ |
|
45 return &RETURN_VAL(var,filename);\ |
|
46 } |
|
47 /* ---------------------- END MACRO DEFINATIONS ---------------------------*/ |
|
48 |
|
49 struct global_struct |
|
50 { |
|
51 VARIABLE_DECL(key,lowmem,pthread_key_t) |
|
52 VARIABLE_DECL(key_once,lowmem,pthread_once_t) |
|
53 RHeap* _iPrivateHeap; |
|
54 }; |
|
55 |
|
56 struct global_struct *Glibbackend_ImpurePtr(); |
|
57 |
|
58 #endif |
|
59 #endif /* __GLIBBACKEND_WSD_H__ */ |