summaryrefslogtreecommitdiff
path: root/lib/bbdev
diff options
context:
space:
mode:
authorTyler Retzlaff <[email protected]>2023-03-02 08:18:06 -0800
committerDavid Marchand <[email protected]>2023-04-25 10:38:09 +0200
commitf9eb7a4bc1cb70bca87878a29db1418f13c4f318 (patch)
treec9f81d1d6844a1c41bcb1fc82eafe87ce6f771f7 /lib/bbdev
parent70cc4e1fed665712e68f2f45d98dda4abc6accda (diff)
use atomic intrinsics closer to C11
Use __atomic_fetch_{add,and,or,sub,xor} instead of __atomic_{add,and,or,sub,xor}_fetch when we have no interest in the result of the operation. This change reduces unnecessary code that provided the result of the atomic operation while this result was not used. It also brings us to a closer alignment with atomics available in C11 standard and will reduce review effort when they are integrated. Signed-off-by: Tyler Retzlaff <[email protected]> Acked-by: Morten Brørup <[email protected]> Acked-by: Ruifeng Wang <[email protected]> Acked-by: Chengwen Feng <[email protected]> Reviewed-by: Maxime Coquelin <[email protected]> Acked-by: Bruce Richardson <[email protected]> Acked-by: Pavan Nikhilesh <[email protected]> Reviewed-by: David Marchand <[email protected]>
Diffstat (limited to 'lib/bbdev')
-rw-r--r--lib/bbdev/rte_bbdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index 1521cdbc53..69e099d5bb 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -208,7 +208,7 @@ rte_bbdev_allocate(const char *name)
return NULL;
}
- __atomic_add_fetch(&bbdev->data->process_cnt, 1, __ATOMIC_RELAXED);
+ __atomic_fetch_add(&bbdev->data->process_cnt, 1, __ATOMIC_RELAXED);
bbdev->data->dev_id = dev_id;
bbdev->state = RTE_BBDEV_INITIALIZED;