author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Tue, 26 Jan 2010 13:13:38 +0200 | |
changeset 13 | 46fffbe7b5a7 |
parent 9 | 96e5fb8b040d |
child 43 | c1f20ce4abcf |
permissions | -rw-r--r-- |
9
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
* e32/include/e32atomics.h |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
* |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
* |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
*/ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
#ifndef __E32ATOMICS_H__ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#define __E32ATOMICS_H__ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
24 |
#include <e32def.h> |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
/** @file e32atomics.h |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
@publishedAll |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
@prototype |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
*/ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
/* |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
Versions needed: |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
WINS/WINSCW Use X86 locked operations. Assume Pentium or above CPU (CMPXCHG8B available) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
X86 For Pentium and above use locked operations |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
For 486 use locked operations for 8, 16, 32 bit. For 64 bit must disable interrupts. |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
NOTE: 486 not supported at the moment |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
ARMv4/ARMv5 Must disable interrupts. |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
ARMv6 LDREX/STREX for 8, 16, 32 bit. For 64 bit must disable interrupts (maybe). |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
ARMv6K/ARMv7 LDREXB/LDREXH/LDREX/LDREXD |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
*/ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
#ifdef __cplusplus |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
extern "C" { |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
#endif |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
IMPORT_C void __e32_memory_barrier(); /* Barrier guaranteeing ordering of memory accesses */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
IMPORT_C void __e32_io_completion_barrier(); /* Barrier guaranteeing ordering and completion of memory accesses */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
/* Atomic operations on 8 bit quantities */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
IMPORT_C TUint8 __e32_atomic_load_acq8(const volatile TAny* a); /* read 8 bit acquire semantics */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
52 |
IMPORT_C TUint8 __e32_atomic_store_rel8(volatile TAny* a, TUint8 v); /* write 8 bit, return v, release semantics */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
53 |
IMPORT_C TUint8 __e32_atomic_store_ord8(volatile TAny* a, TUint8 v); /* write 8 bit, return v, full fence */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
54 |
IMPORT_C TUint8 __e32_atomic_swp_rlx8(volatile TAny* a, TUint8 v); /* write 8 bit, return original, relaxed */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
IMPORT_C TUint8 __e32_atomic_swp_acq8(volatile TAny* a, TUint8 v); /* write 8 bit, return original, acquire */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
IMPORT_C TUint8 __e32_atomic_swp_rel8(volatile TAny* a, TUint8 v); /* write 8 bit, return original, release */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
57 |
IMPORT_C TUint8 __e32_atomic_swp_ord8(volatile TAny* a, TUint8 v); /* write 8 bit, return original, full fence */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
58 |
IMPORT_C TBool __e32_atomic_cas_rlx8(volatile TAny* a, TUint8* q, TUint8 v); /* if (*a==*q) {*a=v; return TRUE;} else {*q=*a; return FALSE;} */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
59 |
IMPORT_C TBool __e32_atomic_cas_acq8(volatile TAny* a, TUint8* q, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
60 |
IMPORT_C TBool __e32_atomic_cas_rel8(volatile TAny* a, TUint8* q, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
61 |
IMPORT_C TBool __e32_atomic_cas_ord8(volatile TAny* a, TUint8* q, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
62 |
IMPORT_C TUint8 __e32_atomic_add_rlx8(volatile TAny* a, TUint8 v); /* *a += v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
63 |
IMPORT_C TUint8 __e32_atomic_add_acq8(volatile TAny* a, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
64 |
IMPORT_C TUint8 __e32_atomic_add_rel8(volatile TAny* a, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
65 |
IMPORT_C TUint8 __e32_atomic_add_ord8(volatile TAny* a, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
66 |
IMPORT_C TUint8 __e32_atomic_and_rlx8(volatile TAny* a, TUint8 v); /* *a &= v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
67 |
IMPORT_C TUint8 __e32_atomic_and_acq8(volatile TAny* a, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
68 |
IMPORT_C TUint8 __e32_atomic_and_rel8(volatile TAny* a, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
69 |
IMPORT_C TUint8 __e32_atomic_and_ord8(volatile TAny* a, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
70 |
IMPORT_C TUint8 __e32_atomic_ior_rlx8(volatile TAny* a, TUint8 v); /* *a |= v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
71 |
IMPORT_C TUint8 __e32_atomic_ior_acq8(volatile TAny* a, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
72 |
IMPORT_C TUint8 __e32_atomic_ior_rel8(volatile TAny* a, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
73 |
IMPORT_C TUint8 __e32_atomic_ior_ord8(volatile TAny* a, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
74 |
IMPORT_C TUint8 __e32_atomic_xor_rlx8(volatile TAny* a, TUint8 v); /* *a ^= v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
75 |
IMPORT_C TUint8 __e32_atomic_xor_acq8(volatile TAny* a, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
76 |
IMPORT_C TUint8 __e32_atomic_xor_rel8(volatile TAny* a, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
77 |
IMPORT_C TUint8 __e32_atomic_xor_ord8(volatile TAny* a, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
78 |
IMPORT_C TUint8 __e32_atomic_axo_rlx8(volatile TAny* a, TUint8 u, TUint8 v); /* *a = (*a & u) ^ v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
79 |
IMPORT_C TUint8 __e32_atomic_axo_acq8(volatile TAny* a, TUint8 u, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
80 |
IMPORT_C TUint8 __e32_atomic_axo_rel8(volatile TAny* a, TUint8 u, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
81 |
IMPORT_C TUint8 __e32_atomic_axo_ord8(volatile TAny* a, TUint8 u, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
82 |
IMPORT_C TUint8 __e32_atomic_tau_rlx8(volatile TAny* a, TUint8 t, TUint8 u, TUint8 v); /* if (*a>=t) *a+=u else *a+=v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
83 |
IMPORT_C TUint8 __e32_atomic_tau_acq8(volatile TAny* a, TUint8 t, TUint8 u, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
84 |
IMPORT_C TUint8 __e32_atomic_tau_rel8(volatile TAny* a, TUint8 t, TUint8 u, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
85 |
IMPORT_C TUint8 __e32_atomic_tau_ord8(volatile TAny* a, TUint8 t, TUint8 u, TUint8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
86 |
IMPORT_C TInt8 __e32_atomic_tas_rlx8(volatile TAny* a, TInt8 t, TInt8 u, TInt8 v); /* if (*a>=t) *a+=u else *a+=v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
87 |
IMPORT_C TInt8 __e32_atomic_tas_acq8(volatile TAny* a, TInt8 t, TInt8 u, TInt8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
88 |
IMPORT_C TInt8 __e32_atomic_tas_rel8(volatile TAny* a, TInt8 t, TInt8 u, TInt8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
89 |
IMPORT_C TInt8 __e32_atomic_tas_ord8(volatile TAny* a, TInt8 t, TInt8 u, TInt8 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
90 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
91 |
/* Atomic operations on 16 bit quantities */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
92 |
IMPORT_C TUint16 __e32_atomic_load_acq16(const volatile TAny* a); /* read 16 bit acquire semantics */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
93 |
IMPORT_C TUint16 __e32_atomic_store_rel16(volatile TAny* a, TUint16 v); /* write 16 bit, return v, release semantics */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
94 |
IMPORT_C TUint16 __e32_atomic_store_ord16(volatile TAny* a, TUint16 v); /* write 16 bit, return v, full fence */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
95 |
IMPORT_C TUint16 __e32_atomic_swp_rlx16(volatile TAny* a, TUint16 v); /* write 16 bit, return original, relaxed */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
96 |
IMPORT_C TUint16 __e32_atomic_swp_acq16(volatile TAny* a, TUint16 v); /* write 16 bit, return original, acquire */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
97 |
IMPORT_C TUint16 __e32_atomic_swp_rel16(volatile TAny* a, TUint16 v); /* write 16 bit, return original, release */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
98 |
IMPORT_C TUint16 __e32_atomic_swp_ord16(volatile TAny* a, TUint16 v); /* write 16 bit, return original, full fence */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
99 |
IMPORT_C TBool __e32_atomic_cas_rlx16(volatile TAny* a, TUint16* q, TUint16 v); /* if (*a==*q) {*a=v; return TRUE;} else {*q=*a; return FALSE;} */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
100 |
IMPORT_C TBool __e32_atomic_cas_acq16(volatile TAny* a, TUint16* q, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
101 |
IMPORT_C TBool __e32_atomic_cas_rel16(volatile TAny* a, TUint16* q, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
102 |
IMPORT_C TBool __e32_atomic_cas_ord16(volatile TAny* a, TUint16* q, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
103 |
IMPORT_C TUint16 __e32_atomic_add_rlx16(volatile TAny* a, TUint16 v); /* *a += v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
104 |
IMPORT_C TUint16 __e32_atomic_add_acq16(volatile TAny* a, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
105 |
IMPORT_C TUint16 __e32_atomic_add_rel16(volatile TAny* a, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
106 |
IMPORT_C TUint16 __e32_atomic_add_ord16(volatile TAny* a, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
107 |
IMPORT_C TUint16 __e32_atomic_and_rlx16(volatile TAny* a, TUint16 v); /* *a &= v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
IMPORT_C TUint16 __e32_atomic_and_acq16(volatile TAny* a, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
109 |
IMPORT_C TUint16 __e32_atomic_and_rel16(volatile TAny* a, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
110 |
IMPORT_C TUint16 __e32_atomic_and_ord16(volatile TAny* a, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
IMPORT_C TUint16 __e32_atomic_ior_rlx16(volatile TAny* a, TUint16 v); /* *a |= v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
112 |
IMPORT_C TUint16 __e32_atomic_ior_acq16(volatile TAny* a, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
113 |
IMPORT_C TUint16 __e32_atomic_ior_rel16(volatile TAny* a, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
IMPORT_C TUint16 __e32_atomic_ior_ord16(volatile TAny* a, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
115 |
IMPORT_C TUint16 __e32_atomic_xor_rlx16(volatile TAny* a, TUint16 v); /* *a ^= v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
116 |
IMPORT_C TUint16 __e32_atomic_xor_acq16(volatile TAny* a, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
IMPORT_C TUint16 __e32_atomic_xor_rel16(volatile TAny* a, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
IMPORT_C TUint16 __e32_atomic_xor_ord16(volatile TAny* a, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
119 |
IMPORT_C TUint16 __e32_atomic_axo_rlx16(volatile TAny* a, TUint16 u, TUint16 v); /* *a = (*a & u) ^ v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
120 |
IMPORT_C TUint16 __e32_atomic_axo_acq16(volatile TAny* a, TUint16 u, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
IMPORT_C TUint16 __e32_atomic_axo_rel16(volatile TAny* a, TUint16 u, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
IMPORT_C TUint16 __e32_atomic_axo_ord16(volatile TAny* a, TUint16 u, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
IMPORT_C TUint16 __e32_atomic_tau_rlx16(volatile TAny* a, TUint16 t, TUint16 u, TUint16 v); /* if (*a>=t) *a+=u else *a+=v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
IMPORT_C TUint16 __e32_atomic_tau_acq16(volatile TAny* a, TUint16 t, TUint16 u, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
IMPORT_C TUint16 __e32_atomic_tau_rel16(volatile TAny* a, TUint16 t, TUint16 u, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
IMPORT_C TUint16 __e32_atomic_tau_ord16(volatile TAny* a, TUint16 t, TUint16 u, TUint16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
127 |
IMPORT_C TInt16 __e32_atomic_tas_rlx16(volatile TAny* a, TInt16 t, TInt16 u, TInt16 v); /* if (*a>=t) *a+=u else *a+=v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
128 |
IMPORT_C TInt16 __e32_atomic_tas_acq16(volatile TAny* a, TInt16 t, TInt16 u, TInt16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
129 |
IMPORT_C TInt16 __e32_atomic_tas_rel16(volatile TAny* a, TInt16 t, TInt16 u, TInt16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
130 |
IMPORT_C TInt16 __e32_atomic_tas_ord16(volatile TAny* a, TInt16 t, TInt16 u, TInt16 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
131 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
132 |
/* Atomic operations on 32 bit quantities */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
133 |
IMPORT_C TUint32 __e32_atomic_load_acq32(const volatile TAny* a); /* read 32 bit acquire semantics */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
IMPORT_C TUint32 __e32_atomic_store_rel32(volatile TAny* a, TUint32 v); /* write 32 bit, return v, release semantics */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
IMPORT_C TUint32 __e32_atomic_store_ord32(volatile TAny* a, TUint32 v); /* write 32 bit, return v, full fence */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
IMPORT_C TUint32 __e32_atomic_swp_rlx32(volatile TAny* a, TUint32 v); /* write 32 bit, return original, relaxed */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
137 |
IMPORT_C TUint32 __e32_atomic_swp_acq32(volatile TAny* a, TUint32 v); /* write 32 bit, return original, acquire */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
IMPORT_C TUint32 __e32_atomic_swp_rel32(volatile TAny* a, TUint32 v); /* write 32 bit, return original, release */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
139 |
IMPORT_C TUint32 __e32_atomic_swp_ord32(volatile TAny* a, TUint32 v); /* write 32 bit, return original, full fence */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
IMPORT_C TBool __e32_atomic_cas_rlx32(volatile TAny* a, TUint32* q, TUint32 v); /* if (*a==*q) {*a=v; return TRUE;} else {*q=*a; return FALSE;} */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
141 |
IMPORT_C TBool __e32_atomic_cas_acq32(volatile TAny* a, TUint32* q, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
142 |
IMPORT_C TBool __e32_atomic_cas_rel32(volatile TAny* a, TUint32* q, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
143 |
IMPORT_C TBool __e32_atomic_cas_ord32(volatile TAny* a, TUint32* q, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
IMPORT_C TUint32 __e32_atomic_add_rlx32(volatile TAny* a, TUint32 v); /* *a += v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
145 |
IMPORT_C TUint32 __e32_atomic_add_acq32(volatile TAny* a, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
IMPORT_C TUint32 __e32_atomic_add_rel32(volatile TAny* a, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
147 |
IMPORT_C TUint32 __e32_atomic_add_ord32(volatile TAny* a, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
148 |
IMPORT_C TUint32 __e32_atomic_and_rlx32(volatile TAny* a, TUint32 v); /* *a &= v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
149 |
IMPORT_C TUint32 __e32_atomic_and_acq32(volatile TAny* a, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
IMPORT_C TUint32 __e32_atomic_and_rel32(volatile TAny* a, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
151 |
IMPORT_C TUint32 __e32_atomic_and_ord32(volatile TAny* a, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
152 |
IMPORT_C TUint32 __e32_atomic_ior_rlx32(volatile TAny* a, TUint32 v); /* *a |= v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
153 |
IMPORT_C TUint32 __e32_atomic_ior_acq32(volatile TAny* a, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
154 |
IMPORT_C TUint32 __e32_atomic_ior_rel32(volatile TAny* a, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
155 |
IMPORT_C TUint32 __e32_atomic_ior_ord32(volatile TAny* a, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
156 |
IMPORT_C TUint32 __e32_atomic_xor_rlx32(volatile TAny* a, TUint32 v); /* *a ^= v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
157 |
IMPORT_C TUint32 __e32_atomic_xor_acq32(volatile TAny* a, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
158 |
IMPORT_C TUint32 __e32_atomic_xor_rel32(volatile TAny* a, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
159 |
IMPORT_C TUint32 __e32_atomic_xor_ord32(volatile TAny* a, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
160 |
IMPORT_C TUint32 __e32_atomic_axo_rlx32(volatile TAny* a, TUint32 u, TUint32 v); /* *a = (*a & u) ^ v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
161 |
IMPORT_C TUint32 __e32_atomic_axo_acq32(volatile TAny* a, TUint32 u, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
162 |
IMPORT_C TUint32 __e32_atomic_axo_rel32(volatile TAny* a, TUint32 u, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
163 |
IMPORT_C TUint32 __e32_atomic_axo_ord32(volatile TAny* a, TUint32 u, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
164 |
IMPORT_C TUint32 __e32_atomic_tau_rlx32(volatile TAny* a, TUint32 t, TUint32 u, TUint32 v); /* if (*a>=t) *a+=u else *a+=v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
165 |
IMPORT_C TUint32 __e32_atomic_tau_acq32(volatile TAny* a, TUint32 t, TUint32 u, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
166 |
IMPORT_C TUint32 __e32_atomic_tau_rel32(volatile TAny* a, TUint32 t, TUint32 u, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
167 |
IMPORT_C TUint32 __e32_atomic_tau_ord32(volatile TAny* a, TUint32 t, TUint32 u, TUint32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
168 |
IMPORT_C TInt32 __e32_atomic_tas_rlx32(volatile TAny* a, TInt32 t, TInt32 u, TInt32 v); /* if (*a>=t) *a+=u else *a+=v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
169 |
IMPORT_C TInt32 __e32_atomic_tas_acq32(volatile TAny* a, TInt32 t, TInt32 u, TInt32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
170 |
IMPORT_C TInt32 __e32_atomic_tas_rel32(volatile TAny* a, TInt32 t, TInt32 u, TInt32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
171 |
IMPORT_C TInt32 __e32_atomic_tas_ord32(volatile TAny* a, TInt32 t, TInt32 u, TInt32 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
172 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
173 |
/* Atomic operations on 64 bit quantities */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
IMPORT_C TUint64 __e32_atomic_load_acq64(const volatile TAny* a); /* read 64 bit acquire semantics */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |
IMPORT_C TUint64 __e32_atomic_store_rel64(volatile TAny* a, TUint64 v); /* write 64 bit, return v, release semantics */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
176 |
IMPORT_C TUint64 __e32_atomic_store_ord64(volatile TAny* a, TUint64 v); /* write 64 bit, return v, full fence */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
177 |
IMPORT_C TUint64 __e32_atomic_swp_rlx64(volatile TAny* a, TUint64 v); /* write 64 bit, return original, relaxed */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
IMPORT_C TUint64 __e32_atomic_swp_acq64(volatile TAny* a, TUint64 v); /* write 64 bit, return original, acquire */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
179 |
IMPORT_C TUint64 __e32_atomic_swp_rel64(volatile TAny* a, TUint64 v); /* write 64 bit, return original, release */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
180 |
IMPORT_C TUint64 __e32_atomic_swp_ord64(volatile TAny* a, TUint64 v); /* write 64 bit, return original, full fence */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
181 |
IMPORT_C TBool __e32_atomic_cas_rlx64(volatile TAny* a, TUint64* q, TUint64 v); /* if (*a==*q) {*a=v; return TRUE;} else {*q=*a; return FALSE;} */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
182 |
IMPORT_C TBool __e32_atomic_cas_acq64(volatile TAny* a, TUint64* q, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
183 |
IMPORT_C TBool __e32_atomic_cas_rel64(volatile TAny* a, TUint64* q, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
184 |
IMPORT_C TBool __e32_atomic_cas_ord64(volatile TAny* a, TUint64* q, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
185 |
IMPORT_C TUint64 __e32_atomic_add_rlx64(volatile TAny* a, TUint64 v); /* *a += v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
186 |
IMPORT_C TUint64 __e32_atomic_add_acq64(volatile TAny* a, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
187 |
IMPORT_C TUint64 __e32_atomic_add_rel64(volatile TAny* a, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
188 |
IMPORT_C TUint64 __e32_atomic_add_ord64(volatile TAny* a, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
189 |
IMPORT_C TUint64 __e32_atomic_and_rlx64(volatile TAny* a, TUint64 v); /* *a &= v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
190 |
IMPORT_C TUint64 __e32_atomic_and_acq64(volatile TAny* a, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
191 |
IMPORT_C TUint64 __e32_atomic_and_rel64(volatile TAny* a, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
192 |
IMPORT_C TUint64 __e32_atomic_and_ord64(volatile TAny* a, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
193 |
IMPORT_C TUint64 __e32_atomic_ior_rlx64(volatile TAny* a, TUint64 v); /* *a |= v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
194 |
IMPORT_C TUint64 __e32_atomic_ior_acq64(volatile TAny* a, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
195 |
IMPORT_C TUint64 __e32_atomic_ior_rel64(volatile TAny* a, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
IMPORT_C TUint64 __e32_atomic_ior_ord64(volatile TAny* a, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
197 |
IMPORT_C TUint64 __e32_atomic_xor_rlx64(volatile TAny* a, TUint64 v); /* *a ^= v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
198 |
IMPORT_C TUint64 __e32_atomic_xor_acq64(volatile TAny* a, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
199 |
IMPORT_C TUint64 __e32_atomic_xor_rel64(volatile TAny* a, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
200 |
IMPORT_C TUint64 __e32_atomic_xor_ord64(volatile TAny* a, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
201 |
IMPORT_C TUint64 __e32_atomic_axo_rlx64(volatile TAny* a, TUint64 u, TUint64 v); /* *a = (*a & u) ^ v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
202 |
IMPORT_C TUint64 __e32_atomic_axo_acq64(volatile TAny* a, TUint64 u, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
203 |
IMPORT_C TUint64 __e32_atomic_axo_rel64(volatile TAny* a, TUint64 u, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
204 |
IMPORT_C TUint64 __e32_atomic_axo_ord64(volatile TAny* a, TUint64 u, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
205 |
IMPORT_C TUint64 __e32_atomic_tau_rlx64(volatile TAny* a, TUint64 t, TUint64 u, TUint64 v); /* if (*a>=t) *a+=u else *a+=v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
206 |
IMPORT_C TUint64 __e32_atomic_tau_acq64(volatile TAny* a, TUint64 t, TUint64 u, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
207 |
IMPORT_C TUint64 __e32_atomic_tau_rel64(volatile TAny* a, TUint64 t, TUint64 u, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
208 |
IMPORT_C TUint64 __e32_atomic_tau_ord64(volatile TAny* a, TUint64 t, TUint64 u, TUint64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
209 |
IMPORT_C TInt64 __e32_atomic_tas_rlx64(volatile TAny* a, TInt64 t, TInt64 u, TInt64 v); /* if (*a>=t) *a+=u else *a+=v; return original *a; */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
210 |
IMPORT_C TInt64 __e32_atomic_tas_acq64(volatile TAny* a, TInt64 t, TInt64 u, TInt64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
211 |
IMPORT_C TInt64 __e32_atomic_tas_rel64(volatile TAny* a, TInt64 t, TInt64 u, TInt64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
212 |
IMPORT_C TInt64 __e32_atomic_tas_ord64(volatile TAny* a, TInt64 t, TInt64 u, TInt64 v); |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
213 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
214 |
/* Atomic operations on pointers |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
215 |
These are implemented as macro definitions over the 32 or 64 bit operations |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
216 |
*/ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
217 |
/* IMPORT_C TAny* __e32_atomic_load_acq_ptr(const volatile TAny* a); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
218 |
#define __e32_atomic_load_acq_ptr(a) ((TAny*)__e32_atomic_load_acq32(a)) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
219 |
/* IMPORT_C TAny* __e32_atomic_store_rel_ptr(volatile TAny* a, const volatile TAny* v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
220 |
#define __e32_atomic_store_rel_ptr(a,v) ((TAny*)__e32_atomic_store_rel32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
221 |
/* IMPORT_C TAny* __e32_atomic_store_ord_ptr(volatile TAny* a, const volatile TAny* v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
222 |
#define __e32_atomic_store_ord_ptr(a,v) ((TAny*)__e32_atomic_store_ord32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
223 |
/* IMPORT_C TAny* __e32_atomic_swp_rlx_ptr(volatile TAny* a, const volatile TAny* v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
224 |
#define __e32_atomic_swp_rlx_ptr(a,v) ((TAny*)__e32_atomic_swp_rlx32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
225 |
/* IMPORT_C TAny* __e32_atomic_swp_acq_ptr(volatile TAny* a, const volatile TAny* v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
226 |
#define __e32_atomic_swp_acq_ptr(a,v) ((TAny*)__e32_atomic_swp_acq32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
227 |
/* IMPORT_C TAny* __e32_atomic_swp_rel_ptr(volatile TAny* a, const volatile TAny* v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
228 |
#define __e32_atomic_swp_rel_ptr(a,v) ((TAny*)__e32_atomic_swp_rel32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
229 |
/* IMPORT_C TAny* __e32_atomic_swp_ord_ptr(volatile TAny* a, const volatile TAny* v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
230 |
#define __e32_atomic_swp_ord_ptr(a,v) ((TAny*)__e32_atomic_swp_ord32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
231 |
/* IMPORT_C TBool __e32_atomic_cas_rlx_ptr(volatile TAny* a, const volatile TAny** q, const volatile TAny* v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
232 |
#define __e32_atomic_cas_rlx_ptr(a,q,v) (__e32_atomic_cas_rlx32(a,(T_UintPtr*)(q),(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
233 |
/* IMPORT_C TBool __e32_atomic_cas_acq_ptr(volatile TAny* a, const volatile TAny** q, const volatile TAny* v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
234 |
#define __e32_atomic_cas_acq_ptr(a,q,v) (__e32_atomic_cas_acq32(a,(T_UintPtr*)(q),(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
235 |
/* IMPORT_C TBool __e32_atomic_cas_rel_ptr(volatile TAny* a, const volatile TAny** q, const volatile TAny* v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
236 |
#define __e32_atomic_cas_rel_ptr(a,q,v) (__e32_atomic_cas_rel32(a,(T_UintPtr*)(q),(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
237 |
/* IMPORT_C TBool __e32_atomic_cas_ord_ptr(volatile TAny* a, const volatile TAny** q, const volatile TAny* v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
238 |
#define __e32_atomic_cas_ord_ptr(a,q,v) (__e32_atomic_cas_ord32(a,(T_UintPtr*)(q),(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
239 |
/* IMPORT_C TAny* __e32_atomic_add_rlx_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
240 |
#define __e32_atomic_add_rlx_ptr(a,v) ((TAny*)__e32_atomic_add_rlx32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
241 |
/* IMPORT_C TAny* __e32_atomic_add_acq_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
242 |
#define __e32_atomic_add_acq_ptr(a,v) ((TAny*)__e32_atomic_add_acq32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
243 |
/* IMPORT_C TAny* __e32_atomic_add_rel_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
244 |
#define __e32_atomic_add_rel_ptr(a,v) ((TAny*)__e32_atomic_add_rel32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
245 |
/* IMPORT_C TAny* __e32_atomic_add_ord_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
246 |
#define __e32_atomic_add_ord_ptr(a,v) ((TAny*)__e32_atomic_add_ord32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
247 |
/* IMPORT_C TAny* __e32_atomic_and_rlx_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
248 |
#define __e32_atomic_and_rlx_ptr(a,v) ((TAny*)__e32_atomic_and_rlx32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
249 |
/* IMPORT_C TAny* __e32_atomic_and_acq_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
250 |
#define __e32_atomic_and_acq_ptr(a,v) ((TAny*)__e32_atomic_and_acq32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
251 |
/* IMPORT_C TAny* __e32_atomic_and_rel_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
252 |
#define __e32_atomic_and_rel_ptr(a,v) ((TAny*)__e32_atomic_and_rel32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
253 |
/* IMPORT_C TAny* __e32_atomic_and_ord_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
254 |
#define __e32_atomic_and_ord_ptr(a,v) ((TAny*)__e32_atomic_and_ord32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
255 |
/* IMPORT_C TAny* __e32_atomic_ior_rlx_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
256 |
#define __e32_atomic_ior_rlx_ptr(a,v) ((TAny*)__e32_atomic_ior_rlx32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
257 |
/* IMPORT_C TAny* __e32_atomic_ior_acq_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
258 |
#define __e32_atomic_ior_acq_ptr(a,v) ((TAny*)__e32_atomic_ior_acq32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
259 |
/* IMPORT_C TAny* __e32_atomic_ior_rel_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
260 |
#define __e32_atomic_ior_rel_ptr(a,v) ((TAny*)__e32_atomic_ior_rel32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
261 |
/* IMPORT_C TAny* __e32_atomic_ior_ord_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
262 |
#define __e32_atomic_ior_ord_ptr(a,v) ((TAny*)__e32_atomic_ior_ord32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
263 |
/* IMPORT_C TAny* __e32_atomic_xor_rlx_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
264 |
#define __e32_atomic_xor_rlx_ptr(a,v) ((TAny*)__e32_atomic_xor_rlx32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
265 |
/* IMPORT_C TAny* __e32_atomic_xor_acq_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
266 |
#define __e32_atomic_xor_acq_ptr(a,v) ((TAny*)__e32_atomic_xor_acq32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
267 |
/* IMPORT_C TAny* __e32_atomic_xor_rel_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
268 |
#define __e32_atomic_xor_rel_ptr(a,v) ((TAny*)__e32_atomic_xor_rel32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
269 |
/* IMPORT_C TAny* __e32_atomic_xor_ord_ptr(volatile TAny* a, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
270 |
#define __e32_atomic_xor_ord_ptr(a,v) ((TAny*)__e32_atomic_xor_ord32(a,(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
271 |
/* IMPORT_C TAny* __e32_atomic_axo_rlx_ptr(volatile TAny* a, T_UintPtr u, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
272 |
#define __e32_atomic_axo_rlx_ptr(a,u,v) ((TAny*)__e32_atomic_axo_rlx32(a,(T_UintPtr)(u),(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
273 |
/* IMPORT_C TAny* __e32_atomic_axo_acq_ptr(volatile TAny* a, T_UintPtr u, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
274 |
#define __e32_atomic_axo_acq_ptr(a,u,v) ((TAny*)__e32_atomic_axo_acq32(a,(T_UintPtr)(u),(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
275 |
/* IMPORT_C TAny* __e32_atomic_axo_rel_ptr(volatile TAny* a, T_UintPtr u, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
276 |
#define __e32_atomic_axo_rel_ptr(a,u,v) ((TAny*)__e32_atomic_axo_rel32(a,(T_UintPtr)(u),(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
277 |
/* IMPORT_C TAny* __e32_atomic_axo_ord_ptr(volatile TAny* a, T_UintPtr u, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
278 |
#define __e32_atomic_axo_ord_ptr(a,u,v) ((TAny*)__e32_atomic_axo_ord32(a,(T_UintPtr)(u),(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
279 |
/* IMPORT_C TAny* __e32_atomic_tau_rlx_ptr(volatile TAny* a, const volatile TAny* t, T_UintPtr u, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
280 |
#define __e32_atomic_tau_rlx_ptr(a,t,u,v) ((TAny*)__e32_atomic_tau_rlx32(a,(T_UintPtr)(t),(T_UintPtr)(u),(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
281 |
/* IMPORT_C TAny* __e32_atomic_tau_acq_ptr(volatile TAny* a, const volatile TAny* t, T_UintPtr u, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
282 |
#define __e32_atomic_tau_acq_ptr(a,t,u,v) ((TAny*)__e32_atomic_tau_acq32(a,(T_UintPtr)(t),(T_UintPtr)(u),(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
283 |
/* IMPORT_C TAny* __e32_atomic_tau_rel_ptr(volatile TAny* a, const volatile TAny* t, T_UintPtr u, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
284 |
#define __e32_atomic_tau_rel_ptr(a,t,u,v) ((TAny*)__e32_atomic_tau_rel32(a,(T_UintPtr)(t),(T_UintPtr)(u),(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
285 |
/* IMPORT_C TAny* __e32_atomic_tau_ord_ptr(volatile TAny* a, const volatile TAny* t, T_UintPtr u, T_UintPtr v); */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
286 |
#define __e32_atomic_tau_ord_ptr(a,t,u,v) ((TAny*)__e32_atomic_tau_ord32(a,(T_UintPtr)(t),(T_UintPtr)(u),(T_UintPtr)(v))) |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
287 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
288 |
/* Miscellaneous utility functions |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
289 |
*/ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
290 |
IMPORT_C TInt __e32_find_ms1_32(TUint32 v); /* return bit number of most significant 1, -1 if argument zero */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
291 |
IMPORT_C TInt __e32_find_ls1_32(TUint32 v); /* return bit number of least significant 1, -1 if argument zero */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
292 |
IMPORT_C TInt __e32_bit_count_32(TUint32 v); /* return number of bits with value 1 */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
293 |
IMPORT_C TInt __e32_find_ms1_64(TUint64 v); /* return bit number of most significant 1, -1 if argument zero */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
294 |
IMPORT_C TInt __e32_find_ls1_64(TUint64 v); /* return bit number of least significant 1, -1 if argument zero */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
295 |
IMPORT_C TInt __e32_bit_count_64(TUint64 v); /* return number of bits with value 1 */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
296 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
297 |
#ifdef __cplusplus |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
298 |
} /* extern "C" */ |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
299 |
#endif |
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
300 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
301 |
|
96e5fb8b040d
Revision: 200951
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
302 |
#endif /* __E32ATOMICS_H__ */ |