/*1*2* This file is part of FFmpeg.3*4* FFmpeg is free software; you can redistribute it and/or5* modify it under the terms of the GNU Lesser General Public6* License as published by the Free Software Foundation; either7* version 2.1 of the License, or (at your option) any later version.8*9* FFmpeg is distributed in the hope that it will be useful,10* but WITHOUT ANY WARRANTY; without even the implied warranty of11* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU12* Lesser General Public License for more details.13*14* You should have received a copy of the GNU Lesser General Public15* License along with FFmpeg; if not, write to the Free Software16* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA17*/1819#ifndef AVUTIL_ATOMIC_SUNCC_H20#define AVUTIL_ATOMIC_SUNCC_H2122#include <atomic.h>23#include <mbarrier.h>2425#include "atomic.h"2627#define avpriv_atomic_int_get atomic_int_get_suncc28static inline int atomic_int_get_suncc(volatile int *ptr)29{30__machine_rw_barrier();31return *ptr;32}3334#define avpriv_atomic_int_set atomic_int_set_suncc35static inline void atomic_int_set_suncc(volatile int *ptr, int val)36{37*ptr = val;38__machine_rw_barrier();39}4041#define avpriv_atomic_int_add_and_fetch atomic_int_add_and_fetch_suncc42static inline int atomic_int_add_and_fetch_suncc(volatile int *ptr, int inc)43{44return atomic_add_int_nv(ptr, inc);45}4647#define avpriv_atomic_ptr_cas atomic_ptr_cas_suncc48static inline void *atomic_ptr_cas_suncc(void * volatile *ptr,49void *oldval, void *newval)50{51return atomic_cas_ptr(ptr, oldval, newval);52}5354#endif /* AVUTIL_ATOMIC_SUNCC_H */555657