From patchwork Wed Mar 29 18:57:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Almer X-Patchwork-Id: 3179 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.44.195 with SMTP id s186csp1225088vss; Wed, 29 Mar 2017 11:58:32 -0700 (PDT) X-Received: by 10.28.113.204 with SMTP id d73mr2843842wmi.15.1490813912711; Wed, 29 Mar 2017 11:58:32 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id h132si8332464wma.82.2017.03.29.11.58.31; Wed, 29 Mar 2017 11:58:32 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2C89F68978C; Wed, 29 Mar 2017 21:58:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt0-f194.google.com (mail-qt0-f194.google.com [209.85.216.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0976968834A for ; Wed, 29 Mar 2017 21:58:00 +0300 (EEST) Received: by mail-qt0-f194.google.com with SMTP id r5so3243559qtb.2 for ; Wed, 29 Mar 2017 11:58:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=VxEA5nbIV+FZN5TdqMtrTpc4Z3KAAtOux3Ida6mupdc=; b=B3oUorbV5j1JrZLpaildk4BXvqqaukC0pa8GWnq/jSF13mx0S+r9Z1u8YUm5KN0653 NdpGv/DeFFxyDzWu8Y6X05nkh2PqRRghqNuaAt2xjObXDUok0yVHZP+TNnI5HIYeDxYF PUcmd4hP8kpLkroWid2vn9QGD6HZCS9oMWw9vESth9gWBnsyJXJsGlcP/QGHT6+MY2VW BmeD6yHxHk2FOsHeoj5YRk8wvV8Utdq9KkkFWmSzSbQY6fYwOy3zOEYI0pnDz3SP+QJI d1DZuvdTIjChR96w3UUrradGF4QhUcJhBOI2mCivWrvd1KpZN2JeZ8hkMSkPejfrCU0n +t0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=VxEA5nbIV+FZN5TdqMtrTpc4Z3KAAtOux3Ida6mupdc=; b=GW/c941BCCBhmoxOuTmoIuDO5zVYkiDnkKweEavnync5D7co2ZTmp43ZVuD0WjyE2x Yh4lOGg/uad8B2XMEFtlCTJLJ1xa4JNjLvXTH4i5EOdNl8c1tNPWuMe5IH+j4xX3UG6Q 1PVVmKYlH9GW/bIf1E5CfjA6IVsT/dsVk0HkrXBSyYgzCDWrJRVna+Wsv2mIXt1NN79S 7DZ02Fa2uJTeXnZd6YA3H8vs4Mb23hpl50GcCyxvQsdxx+NIC26X8brq7NkXRKkkfzQG hfE5JqDZ/C3XqeWaKXIMZ7JJqjflGG2QeW4frcGyInN70PZFph0sxIir2k3dXZidZkcZ U9JA== X-Gm-Message-State: AFeK/H18ZqjrqIdAYNpG+gvqy1iK45DhzXMp41vlvCJ5e7Nj4gLGWPLuDtS94zHCXGRJBw== X-Received: by 10.200.1.6 with SMTP id e6mr2103120qtg.21.1490813901081; Wed, 29 Mar 2017 11:58:21 -0700 (PDT) Received: from localhost.localdomain ([181.231.62.139]) by smtp.gmail.com with ESMTPSA id i140sm1810623qke.22.2017.03.29.11.58.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Mar 2017 11:58:20 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Wed, 29 Mar 2017 15:57:45 -0300 Message-Id: <20170329185745.3384-1-jamrial@gmail.com> X-Mailer: git-send-email 2.12.1 Subject: [FFmpeg-devel] [PATCH] compat/atomics: fix atomic_fetch_xor() X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" --- compat/atomics/dummy/stdatomic.h | 2 +- compat/atomics/gcc/stdatomic.h | 4 ++-- compat/atomics/pthread/stdatomic.h | 2 +- compat/atomics/suncc/stdatomic.h | 2 +- compat/atomics/win32/stdatomic.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/compat/atomics/dummy/stdatomic.h b/compat/atomics/dummy/stdatomic.h index c26f629aa2..59d85f915d 100644 --- a/compat/atomics/dummy/stdatomic.h +++ b/compat/atomics/dummy/stdatomic.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) diff --git a/compat/atomics/gcc/stdatomic.h b/compat/atomics/gcc/stdatomic.h index 2b64687437..e13ed0e068 100644 --- a/compat/atomics/gcc/stdatomic.h +++ b/compat/atomics/gcc/stdatomic.h @@ -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) diff --git a/compat/atomics/pthread/stdatomic.h b/compat/atomics/pthread/stdatomic.h index 1b7278e4fd..81a60f102b 100644 --- a/compat/atomics/pthread/stdatomic.h +++ b/compat/atomics/pthread/stdatomic.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) diff --git a/compat/atomics/suncc/stdatomic.h b/compat/atomics/suncc/stdatomic.h index 119c2ba3c9..4a864a4ae9 100644 --- a/compat/atomics/suncc/stdatomic.h +++ b/compat/atomics/suncc/stdatomic.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) diff --git a/compat/atomics/win32/stdatomic.h b/compat/atomics/win32/stdatomic.h index 4cbba9c78d..fa7ef51ea5 100644 --- a/compat/atomics/win32/stdatomic.h +++ b/compat/atomics/win32/stdatomic.h @@ -159,7 +159,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)