From patchwork Sat Jan 18 21:33:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2683 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 537C6607B3 for ; Sat, 18 Jan 2020 22:34:07 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id DA63A97A for ; Sat, 18 Jan 2020 22:34:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1579383247; bh=POF0W8NXW0zaPezmQXBVkruH6t22pay5n6ISWoXTnpM=; h=From:To:Subject:Date:From; b=iunZBuzmm1ZFOQpN8kzuJ4ToB7nxby5D5uBlpM8SwIFCrBmcKoPdWAv98RXShBxG7 C6IT+bGtxUEcGwNB34nvolPSxmI7BUfDL//Bxfn4fy8qd2SdKjJyFdoXd5Scp27inU pcd769zr3HZZK6hQ/kmts3LDbpQ7xmoS96AVUnx0= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sat, 18 Jan 2020 23:33:46 +0200 Message-Id: <20200118213348.16561-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/2] Make log messages more thread-friendly 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: , X-List-Received-Date: Sat, 18 Jan 2020 21:34:07 -0000 Hello, In a multithread context, knowing from which thread log messages are printed is very valuable during debugging. This series adds support for retrieving the ID of the current thread in patch 1/2, and prints it in the log in patch 2/2. Laurent Pinchart (2): libcamera: thread: Add a method to return the ID of the current thread libcamera: log: Print the thread ID in the log src/libcamera/include/thread.h | 2 ++ src/libcamera/log.cpp | 4 +++- src/libcamera/thread.cpp | 20 ++++++++++++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-)