[libcamera-devel] [PATCH] libcamera: v4l2_videodevice: Don't use std::atomic specialization
Niklas Söderlund
niklas.soderlund at ragnatech.se
Sat Mar 7 00:14:31 CET 2020
Hi Laurent,
Thanks for your fix, sorry for breaking it in the first place.
On 2020-03-07 01:10:50 +0200, Laurent Pinchart wrote:
> The std::atomic_uint64_t specialization was missing from C++14, and only
> added to C++17 (see LWG 2441). It was treated as a Defect Report and
> backported to earlier C++ standards by gcc and clang, but is missing
> from libstdc++ shipped with gcc 5 and gcc 6. Fix the compilation error
> by using std::atomic<uint64_t> instead.
>
> Fixes: 4e0d1eca10b7 ("libcamera: V4L2BufferCache: Improve cache eviction strategy")
> Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
> ---
> src/libcamera/include/v4l2_videodevice.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/libcamera/include/v4l2_videodevice.h b/src/libcamera/include/v4l2_videodevice.h
> index 04802012d531..d051c9060f09 100644
> --- a/src/libcamera/include/v4l2_videodevice.h
> +++ b/src/libcamera/include/v4l2_videodevice.h
> @@ -9,6 +9,7 @@
>
> #include <atomic>
> #include <memory>
> +#include <stdint.h>
> #include <string>
> #include <vector>
>
> @@ -142,7 +143,7 @@ private:
> std::vector<Plane> planes_;
> };
>
> - std::atomic_uint64_t lastUsedCounter_;
> + std::atomic<uint64_t> lastUsedCounter_;
> std::vector<Entry> cache_;
> /* \todo Expose the miss counter through an instrumentation API. */
> unsigned int missCounter_;
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
--
Regards,
Niklas Söderlund
More information about the libcamera-devel
mailing list