return NULL;
}
- rte_atomic16_inc(&bbdev->data->process_cnt);
+ __atomic_add_fetch(&bbdev->data->process_cnt, 1, __ATOMIC_RELAXED);
bbdev->data->dev_id = dev_id;
bbdev->state = RTE_BBDEV_INITIALIZED;
}
/* clear shared BBDev Data if no process is using the device anymore */
- if (rte_atomic16_dec_and_test(&bbdev->data->process_cnt))
+ if (__atomic_sub_fetch(&bbdev->data->process_cnt, 1,
+ __ATOMIC_RELAXED) == 0)
memset(bbdev->data, 0, sizeof(*bbdev->data));
memset(bbdev, 0, sizeof(*bbdev));
#include <string.h>
#include <rte_compat.h>
-#include <rte_atomic.h>
#include <rte_bus.h>
#include <rte_cpuflags.h>
#include <rte_memory.h>
uint16_t dev_id; /**< Device ID */
int socket_id; /**< NUMA socket that device is on */
bool started; /**< Device run-time state */
- /** Counter of processes using the device */
- rte_atomic16_t process_cnt;
+ uint16_t process_cnt; /** Counter of processes using the device */
};
/* Forward declarations */