From patchwork Sun May 23 02:31:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 12363 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 13FA4C3200 for ; Sun, 23 May 2021 02:32:04 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0C2F668922; Sun, 23 May 2021 04:32:03 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="WcESwXUh"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6230460510 for ; Sun, 23 May 2021 04:32:01 +0200 (CEST) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C3D362A8; Sun, 23 May 2021 04:32:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1621737121; bh=nWcGBneTuQ6G+ZNdtL83TDxYYMAIz1R3PTo+J4HXrQo=; h=From:To:Cc:Subject:Date:From; b=WcESwXUhfp8Z5Ya6nm96i6fONLzmJEITXHhvAN1xP7DdnGiBw32SfspgpPjqJHl9F D7HT53IBy8M5Hgf4J30if3hWYTSJxPO309oElgPkedHFxG+kHct80Qu8nUz8s2tOSn oXN5BF+2Y+x/EOS5e2apoFqpkwtCaq3m6AiM1VHc= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sun, 23 May 2021 05:31:51 +0300 Message-Id: <20210523023155.20268-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.28.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/4] libcamera: thread: Documentation fixes and enhancements X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hello, This patch series enhances the documentation of the Thread class and thread usage in libcamera. Documentation issues are fixed in patches 1/4 and 3/4, with patch 2/4 adding an assertion to enforce a documented rule. Patch 4/4 then documents race typical conditions when stopping threads. I'm considering further patches to handle some of the race conditions in the Thread class itself, but until that's ready, this series brings the documentation in sync with the implementation. Laurent Pinchart (4): libcamera: thread: Document dispatchMessages() thread-safety requirements libcamera: thread: Enforce dispatchMessages() call context with assert libcamera: thread: Drop doc of asynchronous signals delivery to applications libcamera: thread: Document race condition at stop time src/libcamera/object.cpp | 8 +++++ src/libcamera/thread.cpp | 69 ++++++++++++++++++++++++++++++++++------ 2 files changed, 68 insertions(+), 9 deletions(-)