[dpdk-dev] [PATCH] eal: check for interrupt context
Stephen Hemminger
stephen at networkplumber.org
Sun Nov 17 21:03:51 CET 2019
On Sun, 17 Nov 2019 19:36:11 +0000
Harman Kalra <hkalra at marvell.com> wrote:
> +int rte_thread_is_intr(void)
> +{
> + if (pthread_equal(intr_thread, pthread_self()))
> + return true;
> + else
> + return false;
> +}
A couple of things here.
1. true/false implies that this is of type bool not int.
2. Why the if, you can just do:
return pthread_equal()
More information about the dev
mailing list