diff options
Diffstat (limited to 'compat/atomics')
-rw-r--r-- | compat/atomics/dummy/stdatomic.h | 16 | ||||
-rw-r--r-- | compat/atomics/gcc/stdatomic.h | 26 | ||||
-rw-r--r-- | compat/atomics/pthread/stdatomic.c | 8 | ||||
-rw-r--r-- | compat/atomics/pthread/stdatomic.h | 16 | ||||
-rw-r--r-- | compat/atomics/suncc/stdatomic.h | 16 | ||||
-rw-r--r-- | compat/atomics/win32/stdatomic.h | 17 |
6 files changed, 50 insertions, 49 deletions
diff --git a/compat/atomics/dummy/stdatomic.h b/compat/atomics/dummy/stdatomic.h index 374e1e5e17..59d85f915d 100644 --- a/compat/atomics/dummy/stdatomic.h +++ b/compat/atomics/dummy/stdatomic.h @@ -1,18 +1,18 @@ /* - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -21,8 +21,8 @@ * Copyright (C) 2010 Rémi Denis-Courmont */ -#ifndef LIBAV_COMPAT_ATOMICS_DUMMY_STDATOMIC_H -#define LIBAV_COMPAT_ATOMICS_DUMMY_STDATOMIC_H +#ifndef COMPAT_ATOMICS_DUMMY_STDATOMIC_H +#define COMPAT_ATOMICS_DUMMY_STDATOMIC_H #include <stdint.h> @@ -156,7 +156,7 @@ FETCH_MODIFY(and, &) atomic_fetch_or(object, operand) #define atomic_fetch_xor_explicit(object, operand, order) \ - atomic_fetch_sub(object, operand) + atomic_fetch_xor(object, operand) #define atomic_fetch_and_explicit(object, operand, order) \ atomic_fetch_and(object, operand) @@ -173,4 +173,4 @@ FETCH_MODIFY(and, &) #define atomic_flag_clear_explicit(object, order) \ atomic_flag_clear(object) -#endif /* LIBAV_COMPAT_ATOMICS_DUMMY_STDATOMIC_H */ +#endif /* COMPAT_ATOMICS_DUMMY_STDATOMIC_H */ diff --git a/compat/atomics/gcc/stdatomic.h b/compat/atomics/gcc/stdatomic.h index 67168abb5e..e13ed0e068 100644 --- a/compat/atomics/gcc/stdatomic.h +++ b/compat/atomics/gcc/stdatomic.h @@ -1,18 +1,18 @@ /* - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -21,8 +21,8 @@ * Copyright (C) 2010 Rémi Denis-Courmont */ -#ifndef LIBAV_COMPAT_ATOMICS_GCC_STDATOMIC_H -#define LIBAV_COMPAT_ATOMICS_GCC_STDATOMIC_H +#ifndef COMPAT_ATOMICS_GCC_STDATOMIC_H +#define COMPAT_ATOMICS_GCC_STDATOMIC_H #include <stddef.h> #include <stdint.h> @@ -100,8 +100,8 @@ do { \ #define atomic_exchange(object, desired) \ ({ \ - typeof(object) _obj = (object); \ - typeof(*object) _old; \ + __typeof__(object) _obj = (object); \ + __typeof__(*object) _old; \ do \ _old = atomic_load(_obj); \ while (!__sync_bool_compare_and_swap(_obj, _old, (desired))); \ @@ -113,8 +113,8 @@ do { \ #define atomic_compare_exchange_strong(object, expected, desired) \ ({ \ - typeof(object) _exp = (expected); \ - typeof(*object) _old = *_exp; \ + __typeof__(object) _exp = (expected); \ + __typeof__(*object) _old = *_exp; \ *_exp = __sync_val_compare_and_swap((object), _old, (desired)); \ *_exp == _old; \ }) @@ -147,10 +147,10 @@ do { \ atomic_fetch_or(object, operand) #define atomic_fetch_xor(object, operand) \ - __sync_fetch_and_sub(object, operand) + __sync_fetch_and_xor(object, operand) #define atomic_fetch_xor_explicit(object, operand, order) \ - atomic_fetch_sub(object, operand) + atomic_fetch_xor(object, operand) #define atomic_fetch_and(object, operand) \ __sync_fetch_and_and(object, operand) @@ -170,4 +170,4 @@ do { \ #define atomic_flag_clear_explicit(object, order) \ atomic_flag_clear(object) -#endif /* LIBAV_COMPAT_ATOMICS_GCC_STDATOMIC_H */ +#endif /* COMPAT_ATOMICS_GCC_STDATOMIC_H */ diff --git a/compat/atomics/pthread/stdatomic.c b/compat/atomics/pthread/stdatomic.c index 0d1ecfec0d..9fca98980b 100644 --- a/compat/atomics/pthread/stdatomic.c +++ b/compat/atomics/pthread/stdatomic.c @@ -1,18 +1,18 @@ /* - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ diff --git a/compat/atomics/pthread/stdatomic.h b/compat/atomics/pthread/stdatomic.h index a4aa9bbbed..81a60f102b 100644 --- a/compat/atomics/pthread/stdatomic.h +++ b/compat/atomics/pthread/stdatomic.h @@ -1,18 +1,18 @@ /* - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -21,8 +21,8 @@ * Copyright (C) 2010 Rémi Denis-Courmont */ -#ifndef LIBAV_COMPAT_ATOMICS_PTHREAD_STDATOMIC_H -#define LIBAV_COMPAT_ATOMICS_PTHREAD_STDATOMIC_H +#ifndef COMPAT_ATOMICS_PTHREAD_STDATOMIC_H +#define COMPAT_ATOMICS_PTHREAD_STDATOMIC_H #include <stdint.h> @@ -177,7 +177,7 @@ FETCH_MODIFY(and, &) atomic_fetch_or(object, operand) #define atomic_fetch_xor_explicit(object, operand, order) \ - atomic_fetch_sub(object, operand) + atomic_fetch_xor(object, operand) #define atomic_fetch_and_explicit(object, operand, order) \ atomic_fetch_and(object, operand) @@ -194,4 +194,4 @@ FETCH_MODIFY(and, &) #define atomic_flag_clear_explicit(object, order) \ atomic_flag_clear(object) -#endif /* LIBAV_COMPAT_ATOMICS_PTHREAD_STDATOMIC_H */ +#endif /* COMPAT_ATOMICS_PTHREAD_STDATOMIC_H */ diff --git a/compat/atomics/suncc/stdatomic.h b/compat/atomics/suncc/stdatomic.h index aef498d022..0cf89e0f78 100644 --- a/compat/atomics/suncc/stdatomic.h +++ b/compat/atomics/suncc/stdatomic.h @@ -1,23 +1,23 @@ /* - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef LIBAV_COMPAT_ATOMICS_SUNCC_STDATOMIC_H -#define LIBAV_COMPAT_ATOMICS_SUNCC_STDATOMIC_H +#ifndef COMPAT_ATOMICS_SUNCC_STDATOMIC_H +#define COMPAT_ATOMICS_SUNCC_STDATOMIC_H #include <atomic.h> #include <mbarrier.h> @@ -166,7 +166,7 @@ static inline intptr_t atomic_fetch_and(intptr_t *object, intptr_t operand) atomic_fetch_or(object, operand) #define atomic_fetch_xor_explicit(object, operand, order) \ - atomic_fetch_sub(object, operand) + atomic_fetch_xor(object, operand) #define atomic_fetch_and_explicit(object, operand, order) \ atomic_fetch_and(object, operand) @@ -183,4 +183,4 @@ static inline intptr_t atomic_fetch_and(intptr_t *object, intptr_t operand) #define atomic_flag_clear_explicit(object, order) \ atomic_flag_clear(object) -#endif /* LIBAV_COMPAT_ATOMICS_SUNCC_STDATOMIC_H */ +#endif /* COMPAT_ATOMICS_SUNCC_STDATOMIC_H */ diff --git a/compat/atomics/win32/stdatomic.h b/compat/atomics/win32/stdatomic.h index 9cfdaa523f..bb8e6e7e15 100644 --- a/compat/atomics/win32/stdatomic.h +++ b/compat/atomics/win32/stdatomic.h @@ -1,24 +1,25 @@ /* - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef LIBAV_COMPAT_ATOMICS_WIN32_STDATOMIC_H -#define LIBAV_COMPAT_ATOMICS_WIN32_STDATOMIC_H +#ifndef COMPAT_ATOMICS_WIN32_STDATOMIC_H +#define COMPAT_ATOMICS_WIN32_STDATOMIC_H +#define WIN32_LEAN_AND_MEAN #include <stddef.h> #include <stdint.h> #include <windows.h> @@ -160,7 +161,7 @@ static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *exp atomic_fetch_or(object, operand) #define atomic_fetch_xor_explicit(object, operand, order) \ - atomic_fetch_sub(object, operand) + atomic_fetch_xor(object, operand) #define atomic_fetch_and_explicit(object, operand, order) \ atomic_fetch_and(object, operand) @@ -177,4 +178,4 @@ static inline int atomic_compare_exchange_strong(intptr_t *object, intptr_t *exp #define atomic_flag_clear_explicit(object, order) \ atomic_flag_clear(object) -#endif /* LIBAV_COMPAT_ATOMICS_WIN32_STDATOMIC_H */ +#endif /* COMPAT_ATOMICS_WIN32_STDATOMIC_H */ |