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