[dpdk-dev] [PATCH v2 3/4] eal: set name when creating a control thread
Burakov, Anatoly
anatoly.burakov at intel.com
Tue Apr 10 18:34:36 CEST 2018
On 03-Apr-18 2:04 PM, Olivier Matz wrote:
> To avoid code duplication, add a parameter to rte_ctrl_thread_create()
> to specify the name of the thread.
>
> This requires to add a wrapper for the thread start routine in
> rte_thread_init(), which will first wait that the thread is configured.
>
> Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>
> ---
<...>
> +
> + pthread_barrier_wait(¶ms.configured);
> +
> + return 0;
> +
> +fail:
> + pthread_kill(*thread, SIGTERM);
This may be wrong, but perhaps instead of killing the thread outright, a
better approach would be pthread_cancel? I'm always uneasy about mixing
signals and pthreads...
> + pthread_join(*thread, NULL);
> + return ret;
> }
--
Thanks,
Anatoly
More information about the dev
mailing list