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


Ignore:
Timestamp:
2010-07-25T10:11:13Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
377cce8
Parents:
24a2517 (diff), a2da43c (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 with mainline.

File:
1 edited

Legend:

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

    r24a2517 rc621f4aa  
    3838
    3939#include <arch/asm.h>
     40#include <trace.h>
    4041
    4142/** Atomic addition.
     
    4748 *
    4849 */
    49 static inline long atomic_add(atomic_t *val, int i)
     50NO_TRACE static inline atomic_count_t atomic_add(atomic_t *val,
     51    atomic_count_t i)
    5052{
    51         long ret;
    52 
    5353        /*
    5454         * This implementation is for UP pre-ARMv6 systems where we do not have
     
    5757        ipl_t ipl = interrupts_disable();
    5858        val->count += i;
    59         ret = val->count;
     59        atomic_count_t ret = val->count;
    6060        interrupts_restore(ipl);
    6161       
     
    6666 *
    6767 * @param val Variable to be incremented.
     68 *
    6869 */
    69 static inline void atomic_inc(atomic_t *val)
     70NO_TRACE static inline void atomic_inc(atomic_t *val)
    7071{
    7172        atomic_add(val, 1);
     
    7576 *
    7677 * @param val Variable to be decremented.
     78 *
    7779 */
    78 static inline void atomic_dec(atomic_t *val) {
     80NO_TRACE static inline void atomic_dec(atomic_t *val) {
    7981        atomic_add(val, -1);
    8082}
     
    8486 * @param val Variable to be incremented.
    8587 * @return    Value after incrementation.
     88 *
    8689 */
    87 static inline long atomic_preinc(atomic_t *val)
     90NO_TRACE static inline atomic_count_t atomic_preinc(atomic_t *val)
    8891{
    8992        return atomic_add(val, 1);
     
    9497 * @param val Variable to be decremented.
    9598 * @return    Value after decrementation.
     99 *
    96100 */
    97 static inline long atomic_predec(atomic_t *val)
     101NO_TRACE static inline atomic_count_t atomic_predec(atomic_t *val)
    98102{
    99103        return atomic_add(val, -1);
     
    104108 * @param val Variable to be incremented.
    105109 * @return    Value before incrementation.
     110 *
    106111 */
    107 static inline long atomic_postinc(atomic_t *val)
     112NO_TRACE static inline atomic_count_t atomic_postinc(atomic_t *val)
    108113{
    109114        return atomic_add(val, 1) - 1;
     
    114119 * @param val Variable to be decremented.
    115120 * @return    Value before decrementation.
     121 *
    116122 */
    117 static inline long atomic_postdec(atomic_t *val)
     123NO_TRACE static inline atomic_count_t atomic_postdec(atomic_t *val)
    118124{
    119125        return atomic_add(val, -1) + 1;
Note: See TracChangeset for help on using the changeset viewer.