Ignore:
Timestamp:
2010-06-29T17:43:38Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6473d41
Parents:
e4a4b44 (diff), 793cf029 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainlnie changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/abs32le/include/atomic.h

    re4a4b44 rf56e897f  
    4242
    4343ATOMIC static inline void atomic_inc(atomic_t *val)
     44    WRITES(&val->count)
     45    REQUIRES_EXTENT_MUTABLE(val)
    4446    REQUIRES(val->count < ATOMIC_COUNT_MAX)
    4547{
     
    5153
    5254ATOMIC static inline void atomic_dec(atomic_t *val)
     55    WRITES(&val->count)
     56    REQUIRES_EXTENT_MUTABLE(val)
    5357    REQUIRES(val->count > ATOMIC_COUNT_MIN)
    5458{
     
    6064
    6165ATOMIC static inline atomic_count_t atomic_postinc(atomic_t *val)
     66    WRITES(&val->count)
     67    REQUIRES_EXTENT_MUTABLE(val)
    6268    REQUIRES(val->count < ATOMIC_COUNT_MAX)
    6369{
     
    7379
    7480ATOMIC static inline atomic_count_t atomic_postdec(atomic_t *val)
     81    WRITES(&val->count)
     82    REQUIRES_EXTENT_MUTABLE(val)
    7583    REQUIRES(val->count > ATOMIC_COUNT_MIN)
    7684{
     
    8997
    9098ATOMIC static inline atomic_count_t test_and_set(atomic_t *val)
     99    WRITES(&val->count)
     100    REQUIRES_EXTENT_MUTABLE(val)
    91101{
    92102        /* On real hardware the retrieving of the original
     
    99109}
    100110
    101 ATOMIC static inline atomic_count_t arch_atomic_get(atomic_t *val)
    102 {
    103         /* This function is not needed on real hardware, it just
    104            duplicates the functionality of atomic_get(). It is
    105            defined here because atomic_get() is an inline function
    106            declared in a header file which we are included in. */
    107        
    108         return val->count;
    109 }
    110 
    111111static inline void atomic_lock_arch(atomic_t *val)
     112    WRITES(&val->count)
     113    REQUIRES_EXTENT_MUTABLE(val)
    112114{
    113115        do {
    114                 while (arch_atomic_get(val));
     116                while (val->count);
    115117        } while (test_and_set(val));
    116118}
Note: See TracChangeset for help on using the changeset viewer.