From patchwork Tue Dec 17 01:51:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Niklas_S=C3=B6derlund?= X-Patchwork-Id: 2431 Return-Path: Received: from vsp-unauthed02.binero.net (vsp-unauthed02.binero.net [195.74.38.227]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D5E82601E7 for ; Tue, 17 Dec 2019 02:51:16 +0100 (CET) X-Halon-ID: b1aaadaf-206f-11ea-a00b-005056917a89 Authorized-sender: niklas@soderlund.pp.se Received: from bismarck.berto.se (p54ac5865.dip0.t-ipconnect.de [84.172.88.101]) by bin-vsp-out-01.atm.binero.net (Halon) with ESMTPA id b1aaadaf-206f-11ea-a00b-005056917a89; Tue, 17 Dec 2019 02:51:14 +0100 (CET) From: =?utf-8?q?Niklas_S=C3=B6derlund?= To: libcamera-devel@lists.libcamera.org Date: Tue, 17 Dec 2019 02:51:03 +0100 Message-Id: <20191217015106.1175515-1-niklas.soderlund@ragnatech.se> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/3] libcamera: Add FileDescriptor to help pass numerical fds around 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: Tue, 17 Dec 2019 01:51:17 -0000 Hi, This was in part previously part of the rather large buffer rework series but is now broken out to a separate series. All review comments from the buffer v1 series have been addressed and a new test have been added on top. I hope to merge this as soon as it's ready as I really like to cut down on the size of the buffer series. If you think this should not be merged until buffers are ready please let me know. * Changes since v1 - Fix documentation for 1/3 and 2/3. - Fix memory leak in error cases in 3/3. - Check inode number when verifying fd is good in 3/3. - Dropped some redundant tests in 3/3. Niklas Söderlund (3): libcamera: utils: Add exchange() libcamera: Add FileDescriptor to help pass numerical fds around test: file_descriptor: Add test include/libcamera/file_descriptor.h | 33 ++++++ include/libcamera/meson.build | 1 + src/libcamera/file_descriptor.cpp | 164 +++++++++++++++++++++++++++ src/libcamera/include/utils.h | 9 ++ src/libcamera/meson.build | 1 + src/libcamera/utils.cpp | 8 ++ test/file_descriptor.cpp | 165 ++++++++++++++++++++++++++++ test/meson.build | 1 + 8 files changed, 382 insertions(+) create mode 100644 include/libcamera/file_descriptor.h create mode 100644 src/libcamera/file_descriptor.cpp create mode 100644 test/file_descriptor.cpp