From patchwork Wed Mar 24 15:01: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: 11696 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 716A6C32E5 for ; Wed, 24 Mar 2021 15:01:36 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id F16F468D68; Wed, 24 Mar 2021 16:01:34 +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="DIrws9G+"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CC077602E3 for ; Wed, 24 Mar 2021 16:01:31 +0100 (CET) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 54E02580; Wed, 24 Mar 2021 16:01:31 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1616598091; bh=k3gnrktnFtKlTIoS3bCPGXMoxEuZ9o1+XOAkKRXQAFg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DIrws9G+ODMbA424AA9iLv1QvZJqXzQRDcuGBaulU22fxuFE90mCaR+iVeuotmJ1f KXortHFN0bR4j0ZvZTIwW0NA4lzmUM4bq1ScZKw9Ze8NNOHJev4LAMGwfx3cHFJ0BS dN2DlfB8OnEVAW4w0Tp8T/b+KJAp2RRgNSpk0JEs= From: Kieran Bingham To: libcamera devel Date: Wed, 24 Mar 2021 15:01:21 +0000 Message-Id: <20210324150125.1318325-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210324150125.1318325-1-kieran.bingham@ideasonboard.com> References: <20210324150125.1318325-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 2/6] 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. Reviewed-by: Jacopo Mondi Signed-off-by: Laurent Pinchart Signed-off-by: Kieran Bingham --- 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 -%}