aboutsummaryrefslogtreecommitdiff
path: root/src/rt/sync/sync.h
blob: 8c9a13f0f4a9a042fa4ac10c4bdc56fbbd0964fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#ifndef SYNC_H
#define SYNC_H

class sync {
public:
    static void yield();
    template <class T>
    static bool compare_and_swap(T *address,
        T oldValue, T newValue) {
        return __sync_bool_compare_and_swap(address, oldValue, newValue);
    }
};

#endif /* SYNC_H */