From patchwork Fri Mar 12 05:47:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11553 X-Patchwork-Delegate: kieran.bingham@ideasonboard.com 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 858DCBD1F1 for ; Fri, 12 Mar 2021 05:47:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 34F5968C75; Fri, 12 Mar 2021 06:47:35 +0100 (CET) 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="aLppM0HY"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 56ABA605B2 for ; Fri, 12 Mar 2021 06:47:32 +0100 (CET) Received: from localhost.localdomain (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CD37EA27; Fri, 12 Mar 2021 06:47:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1615528052; bh=PJh67ciDzElBE6OaDdXhg8fX+IPxGjewNSScBfLTJIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aLppM0HYFD/gQW1k5Oxi0mFbHLbY+TmVUs73WHT9wRYWYL9niRQwKhur735Zj2cvc 8uhmoX30th7zQabfxKW4i4PkY6AybRy4Ugl4kUndV2CtIT+DprfTIDSQqrRJu40kKZ z1gpzvG6Tm3ERyDOaEjxtLhYARb0Vi5KoU9iZVfc= From: Kieran Bingham To: libcamera devel Date: Fri, 12 Mar 2021 05:47:21 +0000 Message-Id: <20210312054727.852622-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210312054727.852622-1-kieran.bingham@ideasonboard.com> References: <20210312054727.852622-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 2/8] utils: ipc: proxy: Process pending messages 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" From: Laurent Pinchart Events may be queued to the pipeline handler between the pipeline handler entering the ::stop() function, and before the call to stop the IPA has completed. Handle these events by dispatching all pending messages at the proxy after the IPA has fully stopped. Signed-off-by: Laurent Pinchart Signed-off-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- utils/ipc/generators/libcamera_templates/proxy_functions.tmpl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl b/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl index 13dc8fdcab6e..8addc2fad0a8 100644 --- a/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl +++ b/utils/ipc/generators/libcamera_templates/proxy_functions.tmpl @@ -31,6 +31,8 @@ thread_.exit(); thread_.wait(); + Thread::current()->dispatchMessages(Message::Type::InvokeMessage); + running_ = false; {%- endmacro -%}