Changeset c2efbb4 in mainline for kernel/arch/arm32/include/atomic.h


Ignore:
Timestamp:
2010-02-20T20:54:53Z (14 years ago)
Author:
Pavel Rimsky <pavel@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
721d4e85, 95c4776
Parents:
f516bc2 (diff), b03a666 (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:

Synchronize with head.

File:
1 edited

Legend:

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

    rf516bc2 rc2efbb4  
    4747 *
    4848 */
    49 static inline long atomic_add(atomic_t *val, int i)
     49static inline atomic_count_t atomic_add(atomic_t *val, atomic_count_t i)
    5050{
    51         long ret;
    52 
    5351        /*
    5452         * This implementation is for UP pre-ARMv6 systems where we do not have
     
    5755        ipl_t ipl = interrupts_disable();
    5856        val->count += i;
    59         ret = val->count;
     57        atomic_count_t ret = val->count;
    6058        interrupts_restore(ipl);
    6159       
     
    6664 *
    6765 * @param val Variable to be incremented.
     66 *
    6867 */
    6968static inline void atomic_inc(atomic_t *val)
     
    7574 *
    7675 * @param val Variable to be decremented.
     76 *
    7777 */
    7878static inline void atomic_dec(atomic_t *val) {
     
    8484 * @param val Variable to be incremented.
    8585 * @return    Value after incrementation.
     86 *
    8687 */
    87 static inline long atomic_preinc(atomic_t *val)
     88static inline atomic_count_t atomic_preinc(atomic_t *val)
    8889{
    8990        return atomic_add(val, 1);
     
    9495 * @param val Variable to be decremented.
    9596 * @return    Value after decrementation.
     97 *
    9698 */
    97 static inline long atomic_predec(atomic_t *val)
     99static inline atomic_count_t atomic_predec(atomic_t *val)
    98100{
    99101        return atomic_add(val, -1);
     
    104106 * @param val Variable to be incremented.
    105107 * @return    Value before incrementation.
     108 *
    106109 */
    107 static inline long atomic_postinc(atomic_t *val)
     110static inline atomic_count_t atomic_postinc(atomic_t *val)
    108111{
    109112        return atomic_add(val, 1) - 1;
     
    114117 * @param val Variable to be decremented.
    115118 * @return    Value before decrementation.
     119 *
    116120 */
    117 static inline long atomic_postdec(atomic_t *val)
     121static inline atomic_count_t atomic_postdec(atomic_t *val)
    118122{
    119123        return atomic_add(val, -1) + 1;
Note: See TracChangeset for help on using the changeset viewer.