[dpdk-dev] [PATCH v2] igb_uio: allow multi-process access

Stephen Hemminger stephen at networkplumber.org
Tue Dec 19 16:39:01 CET 2017


On Tue, 19 Dec 2017 07:42:20 -0800
Xiao Wang <xiao.w.wang at intel.com> wrote:

> +	atomic_dec(&udev->refcnt);
> +	if (atomic_read(&udev->refcnt) > 0)
> +		return 0;
> +

The point of using atomic functions is to do atomic operations.
You need to use atomic_dec_and_test here.


More information about the dev mailing list