From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DF675A0A02; Thu, 14 Jan 2021 09:34:31 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7E5B140FDF; Thu, 14 Jan 2021 09:34:31 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id 47F69140FDE for ; Thu, 14 Jan 2021 09:34:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610613269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=7s26z5o5vG7edffcqLDus5JRG4sHLRtwTGzcoY+hWoE=; b=AEseflzErXMygMWTXT7I5AD5tLnBDEZTEG/bhfkxgNL3gMlErrgtii37neCJwbVkNuDNfM 5wdbss6A7MeiwRYHMZY1srqNFeSGTzmnUNw9SHFF41JO6A2YLM8aluV5JMz3Bx8AU9/V80 SRBLlNM4pHxydCDIwZxuSxQ6OErUDto= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-156-p1NL8WFuNviT3NHfDGNZsA-1; Thu, 14 Jan 2021 03:34:28 -0500 X-MC-Unique: p1NL8WFuNviT3NHfDGNZsA-1 Received: by mail-vk1-f200.google.com with SMTP id d202so2059315vkd.4 for ; Thu, 14 Jan 2021 00:34:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=7s26z5o5vG7edffcqLDus5JRG4sHLRtwTGzcoY+hWoE=; b=Cuna0HWorIkFLS+jFEGtf5pHa6bwxfpm8uT2gi/MeVDJHsqc1solihBTDryq1ivow/ 2sE5/8Ex8Y3vH1qfU0bdLuQ+FkZR7B+Vox683k2a/YuaklZQmTN9VzDh1KQURMpiugBV E5GiNMFuJp2ACFVwz9iF165Zk1V9ZgRWTyBnk/VR9ArHi+Q48tN+Kj3JIiSdwplKUuTD XwJ3eY/wuwC1Nhjz0SyXW7C7uF89AvaXcMEaQrC57tCqdW8h/hHsWwL7NPdug6QoICLW Hs0rtRTQ+gZ/0mUrovHBjxid+mxDMMBS0ODP4r5tl7vsAHRSO7fLaGqHztvYdSyVbRjw 3AdQ== X-Gm-Message-State: AOAM531gmDJy2p3Dpp2tHuMhYb7Pxd6aYAR9dD+RpQIQzBbhy7KlKIIo F7YX6wh0jRUKSQnYTi5ZLAmkZ+pySGynOgMPHeqPd9rCQTz/v5bV6k4g4BNYoj+fAu+gX9EfeFc J665Fw+K3TcSrJdfZ2Xg= X-Received: by 2002:a05:6102:3136:: with SMTP id f22mr4348250vsh.17.1610613267942; Thu, 14 Jan 2021 00:34:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyDK0yN4rvpbkBIxMnhO5obiyjW1ijJLupgvc8oOJjSfxetb17U0nAY2Yf+SVLwYbR1rhuhR411cJ2X2OxZ7Bw= X-Received: by 2002:a05:6102:3136:: with SMTP id f22mr4348241vsh.17.1610613267803; Thu, 14 Jan 2021 00:34:27 -0800 (PST) MIME-Version: 1.0 References: <1609915409-272126-1-git-send-email-matan@nvidia.com> <746e905a-c394-44df-2c49-2afd59c05d9f@redhat.com> In-Reply-To: From: David Marchand Date: Thu, 14 Jan 2021 09:34:16 +0100 Message-ID: To: Maxime Coquelin , Matan Azrad Cc: dev , dpdk stable Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] vdpa/mlx5: fix configuration mutex cleanup X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Jan 8, 2021 at 9:48 AM David Marchand wrote: > > 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