Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/corelib/arch/qatomic_armv6.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the QtCore module of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    4646
    4747QT_BEGIN_NAMESPACE
    48 
    4948#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_ALWAYS_NATIVE
    5049
     
    101100Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
    102101{ return false; }
     102
     103
    103104
    104105inline bool QBasicAtomicInt::ref()
     
    156157}
    157158
    158 inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
    159 {
    160     return testAndSetOrdered(expectedValue, newValue);
    161 }
    162 
    163 inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
    164 {
    165     return testAndSetOrdered(expectedValue, newValue);
    166 }
    167 
    168 inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
    169 {
    170     return testAndSetOrdered(expectedValue, newValue);
    171 }
    172 
    173159inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue)
    174160{
     
    187173                 : "cc", "memory");
    188174    return originalValue;
    189 }
    190 
    191 inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
    192 {
    193     return fetchAndStoreOrdered(newValue);
    194 }
    195 
    196 inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
    197 {
    198     return fetchAndStoreOrdered(newValue);
    199 }
    200 
    201 inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
    202 {
    203     return fetchAndStoreOrdered(newValue);
    204175}
    205176
     
    225196}
    226197
    227 inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
    228 {
    229     return fetchAndAddOrdered(valueToAdd);
    230 }
    231 
    232 inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
    233 {
    234     return fetchAndAddOrdered(valueToAdd);
    235 }
    236 
    237 inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
    238 {
    239     return fetchAndAddOrdered(valueToAdd);
    240 }
    241 
    242198template <typename T>
    243199Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue)
     
    260216
    261217template <typename T>
    262 Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue)
    263 {
    264     return testAndSetOrdered(expectedValue, newValue);
    265 }
    266 
    267 template <typename T>
    268 Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue)
    269 {
    270     return testAndSetOrdered(expectedValue, newValue);
    271 }
    272 
    273 template <typename T>
    274 Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue)
    275 {
    276     return testAndSetOrdered(expectedValue, newValue);
    277 }
    278 
    279 template <typename T>
    280218Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue)
    281219{
     
    294232                 : "cc", "memory");
    295233    return originalValue;
    296 }
    297 
    298 template <typename T>
    299 Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
    300 {
    301     return fetchAndStoreOrdered(newValue);
    302 }
    303 
    304 template <typename T>
    305 Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
    306 {
    307     return fetchAndStoreOrdered(newValue);
    308 }
    309 
    310 template <typename T>
    311 Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
    312 {
    313     return fetchAndStoreOrdered(newValue);
    314234}
    315235
     
    336256}
    337257
     258
     259
     260
     261
     262
     263
     264
     265
     266
     267
     268
     269
     270
     271
     272
     273
     274
     275
     276
     277
     278
     279
     280
     281
     282
     283
     284
     285
     286
     287
     288
     289
     290
     291
     292
     293
     294
     295
     296
     297
     298
     299
     300
     301
     302
     303
     304
     305
     306
     307
     308
     309
     310
     311
     312
     313
     314
     315
     316
     317
     318
     319
     320
     321
     322
     323
     324
     325
     326
     327
     328
     329
     330
     331
     332
     333
     334
     335
     336
     337
     338
     339
     340
     341
     342
     343
     344
     345
     346
     347
     348
     349
     350
     351
     352
     353
     354
     355
     356
     357
     358
     359
     360
     361
     362
     363
     364
     365
     366
     367
     368
     369
     370
     371
     372
     373
     374
     375
     376
     377
     378
     379
     380
     381
     382
     383
     384
     385
     386
     387
     388
     389
     390
     391
     392
     393
     394
     395
     396
     397
     398
     399
     400
     401
     402
     403
     404
     405
     406
     407
     408
     409
     410
     411
     412
     413
     414
     415
     416
     417
     418
     419
     420
     421
     422
     423
     424
     425
     426
     427
     428
     429
     430
     431
     432
     433
     434
     435
     436
     437
     438
     439
     440
     441
     442
     443
     444
     445
     446
     447
     448
     449
     450
     451
     452
     453
     454
     455
     456
     457
     458
     459
     460
     461
     462
     463
     464
     465
     466
     467
     468
     469
     470
     471
     472
     473
     474
     475
     476
     477
    338478template <typename T>
    339479Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd)
Note: See TracChangeset for help on using the changeset viewer.