Thread (17 messages) flat view 17 messages, 3 authors, 2021-01-27

Re: [dpdk-dev] [dpdk-stable] [PATCH] vdpa/mlx5: fix configuration mutex cleanup

From: David Marchand <hidden>
Date: 2021-01-14 08:34:33

On Fri, Jan 8, 2021 at 9:48 AM David Marchand [off-list ref] wrote:
quoted
I wonder if it would be possible and cleaner to disable cancellation on
the thread while the mutex is held?
+1
IEEE Std 1003.1-2001/Cor 2-2004, item XBD/TC2/D6/26 is applied, adding
pthread_t to the list of types that are not required to be arithmetic
types, thus allowing pthread_t to be defined as a structure.

It would be better to leave pthread_t alone and not interpret it:

if (priv->timer_tid) {
    pthread_cancel(priv->timer_tid);
    pthread_join(priv->timer_tid, &status);
}
priv->timer_tid = 0;


-- 
David Marchand
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help