Subversion Repositories HelenOS-historic

Rev

Rev 863 | Rev 1082 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 863 Rev 1024
Line 60... Line 60...
60
    );
60
    );
61
 
61
 
62
    return a;
62
    return a;
63
}
63
}
64
 
64
 
-
 
65
static inline count_t atomic_preinc(atomic_t *val)
-
 
66
{
-
 
67
    return atomic_add(val, 1) + 1;
-
 
68
}
-
 
69
 
-
 
70
static inline count_t atomic_postinc(atomic_t *val)
-
 
71
{
-
 
72
    return atomic_add(val, 1);
-
 
73
}
-
 
74
 
-
 
75
static inline count_t atomic_predec(atomic_t *val)
-
 
76
{
-
 
77
    return atomic_add(val, -1) - 1;
-
 
78
}
-
 
79
 
-
 
80
static inline count_t atomic_postdec(atomic_t *val)
-
 
81
{
-
 
82
    return atomic_add(val, 1);
-
 
83
}
-
 
84
 
65
static inline void atomic_inc(atomic_t *val)
85
static inline void atomic_inc(atomic_t *val)
66
{
86
{
67
    (void) atomic_add(val, 1);
87
    (void) atomic_add(val, 1);
68
}
88
}
69
 
89