3 * This file is part of Libav.
5 * Libav is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * Libav is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with Libav; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 #ifndef AVUTIL_ATOMIC_SUNCC_H
21 #define AVUTIL_ATOMIC_SUNCC_H
28 #define avpriv_atomic_int_get atomic_int_get_suncc
29 static inline int atomic_int_get_suncc(volatile int *ptr)
31 __machine_rw_barrier();
35 #define avpriv_atomic_int_set atomic_int_set_suncc
36 static inline void atomic_int_set_suncc(volatile int *ptr, int val)
39 __machine_rw_barrier();
42 #define avpriv_atomic_int_add_and_fetch atomic_int_add_and_fetch_suncc
43 static inline int atomic_int_add_and_fetch_suncc(volatile int *ptr, int inc)
45 return atomic_add_int_nv(ptr, inc);
48 #define avpriv_atomic_ptr_cas atomic_ptr_cas_suncc
49 static inline void *atomic_ptr_cas_suncc(void * volatile *ptr,
50 void *oldval, void *newval)
52 return atomic_cas_ptr(ptr, oldval, newval);
55 #endif /* AVUTIL_ATOMIC_SUNCC_H */