From patchwork Tue Oct 1 08:10:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 21445 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 65EFAC3257 for ; Tue, 1 Oct 2024 08:18:32 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0BE9D63517; Tue, 1 Oct 2024 10:18:32 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="NZQV/lwv"; dkim-atps=neutral Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 397DF6350F for ; Tue, 1 Oct 2024 10:18:30 +0200 (CEST) Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-71b8d10e990so2356640b3a.3 for ; Tue, 01 Oct 2024 01:18:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1727770708; x=1728375508; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=Nn3xnXPdHegHeOjfNS5WlZptPjZJQ8pBp2iZA7xye4g=; b=NZQV/lwv/IubobxtgXaVEQwvn9bjvUHYnhNykILffOTduvUc7rTxV7ov/5LuQv4Bem MXSNe6l4eYg27Q0aVWFEpxa8IroNyikmTkfAi23Awiebp++8aPQrmGk/fIHw0/jybixD eq6rVhpuScHm4qOfPWKGZWcE6P5cqfnDUZzso= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727770708; x=1728375508; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Nn3xnXPdHegHeOjfNS5WlZptPjZJQ8pBp2iZA7xye4g=; b=PQddGgF7qZMBiR6+SzvwAlRwgkF4+X4XybUmCGkOkkjJRwsLJIRfwsxm1xgaFLb2cw kFln52xRQeQH9SUecoxiT+2lJUWWexl2BfJq41Jr0szwYwk2uxSO3wxR94vNts0cGTyr vTl4ZTjukpeX/ogMFbfPnyFujHecWeBwCrwvCfqT+LtouLL3cO4iCeXokmKq5vL4DzOi ojYtk7RZouZgqaSgdTxZe/DOCOC+50HHooRMF7Cckc8gOSTia1K44pi5F5nGTE7e5myr FbJQ1OYihyLslBumWlT9aocSqO9qKEjxqg0/2m1iz+nKjd7z2SzcfPk/jEnTTzuDQDJT JKmw== X-Gm-Message-State: AOJu0YxBTtfqqnC5rfNEKxexr63Px059929ucvXbkQi8lL3L0yKRiO5e hrQdMffCN/Z4eW4BI89YDyovXJiHtGGT+i2NLSPOzjAEP26xCJZuX8QFeoMveAu+hNgWE4ly/aM = X-Google-Smtp-Source: AGHT+IEQtlhd50ISMTs4KF2G6UBjqFMj/EN8tls+WwRPRh3/Lf9wwNxtQMLPQo5wJegs6ePN+4B8/A== X-Received: by 2002:a05:6a21:3406:b0:1d4:f6c4:8e7a with SMTP id adf61e73a8af0-1d4fa7ae0e3mr19996161637.31.1727770708434; Tue, 01 Oct 2024 01:18:28 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (208.158.221.35.bc.googleusercontent.com. [35.221.158.208]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6db17c3b8sm7941186a12.0.2024.10.01.01.18.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Oct 2024 01:18:28 -0700 (PDT) From: Harvey Yang X-Google-Original-From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang Subject: [PATCH 0/1] Add MailBox Date: Tue, 1 Oct 2024 08:10:07 +0000 Message-ID: <20241001081824.960009-1-chenghaoyang@google.com> X-Mailer: git-send-email 2.46.1.824.gd892dcdcdd-goog MIME-Version: 1.0 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" Hi folks, This patch adds MailBox as a template helper class. It's often used with Tasks, introduced in another patch: "Add Task and Scheduler". Normally, there will be a task as the producer of a MailBox (with type SharedMailBox), and other tasks that run after the producer task to use the data as consumers. This patch passed gitlab pipeline: https://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1281432 Please take a look. Thanks! BR, Harvey Han-Lin Chen (1): libcamera: Add mailbox template helper include/libcamera/internal/mailbox.h | 50 +++++++++++++ include/libcamera/internal/meson.build | 1 + src/libcamera/mailbox.cpp | 97 ++++++++++++++++++++++++++ src/libcamera/meson.build | 1 + 4 files changed, 149 insertions(+) create mode 100644 include/libcamera/internal/mailbox.h create mode 100644 src/libcamera/mailbox.cpp