libcamera: v4l2_videodevice: Don't use std::atomic specialization

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: 4e0d1eca10 ("libcamera: V4L2BufferCache: Improve cache eviction strategy")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart 2020-03-07 01:00:03 +02:00
parent 4e0d1eca10
commit 2cc90af8c7

View file

@ -9,6 +9,7 @@
#include <atomic> #include <atomic>
#include <memory> #include <memory>
#include <stdint.h>
#include <string> #include <string>
#include <vector> #include <vector>
@ -142,7 +143,7 @@ private:
std::vector<Plane> planes_; std::vector<Plane> planes_;
}; };
std::atomic_uint64_t lastUsedCounter_; std::atomic<uint64_t> lastUsedCounter_;
std::vector<Entry> cache_; std::vector<Entry> cache_;
/* \todo Expose the miss counter through an instrumentation API. */ /* \todo Expose the miss counter through an instrumentation API. */
unsigned int missCounter_; unsigned int missCounter_;