From: Jérémie Galarneau Date: Fri, 29 Nov 2019 20:42:24 +0000 (-0500) Subject: Make lttng_directory_handle reference countable X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=cbf53d23cecaca9c6ec71582663c4a8254a9f285;hp=cbf53d23cecaca9c6ec71582663c4a8254a9f285 Make lttng_directory_handle reference countable Currently, the lttng_directory_handle API assumes that the caller has exclusive ownership of the lttng_directory_handle. Directory handles are passed by reference and populated by an "init" method and finalized using the "fini" method. In order to allow multiple references to a path or directory file descriptor in follow-up patches, the API is moved to a model where directory handles are dynamically allocated and released using the "put" method. No change in behaviour is intended by this change beyond adapting the API. The objective of the change is to make it easier to implement copy operations of trace chunks that are configured to use an fd-tracker and reduce the number of open file descriptors when lttng_directory_handles are copied. Signed-off-by: Jérémie Galarneau Change-Id: Ibc8e97ea9e949adafef44533c30b61e3a9fa1f7d ---