summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMilan Zamazal <mzamazal@redhat.com>2024-04-16 11:13:41 +0200
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-04-16 13:00:21 +0100
commitce3c8a5082f492ef1aeac9b2a488ca94d413029d (patch)
treef6bd6addaa061f4057ae4c17b3b02f460cf0c6fe /include
parentbd801907bf3b8b6bcbafb09d73d76018deba4266 (diff)
libcamera: shared_mem_object: Rename SIZE constant to `size'
The SharedMemObject has been imported directly into the libcamera internal components. Adapt the SIZE constant of the class to match the libcamera coding style. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Milan Zamazal <mzamazal@redhat.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/shared_mem_object.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/libcamera/internal/shared_mem_object.h b/include/libcamera/internal/shared_mem_object.h
index 98636b44..a9970059 100644
--- a/include/libcamera/internal/shared_mem_object.h
+++ b/include/libcamera/internal/shared_mem_object.h
@@ -23,7 +23,7 @@ template<class T>
class SharedMemObject
{
public:
- static constexpr std::size_t SIZE = sizeof(T);
+ static constexpr std::size_t kSize = sizeof(T);
SharedMemObject()
: obj_(nullptr)
@@ -45,11 +45,11 @@ public:
if (!fd_.isValid())
return;
- ret = ftruncate(fd_.get(), SIZE);
+ ret = ftruncate(fd_.get(), kSize);
if (ret < 0)
return;
- mem = mmap(nullptr, SIZE, PROT_READ | PROT_WRITE, MAP_SHARED,
+ mem = mmap(nullptr, kSize, PROT_READ | PROT_WRITE, MAP_SHARED,
fd_.get(), 0);
if (mem == MAP_FAILED)
return;
@@ -69,7 +69,7 @@ public:
{
if (obj_) {
obj_->~T();
- munmap(obj_, SIZE);
+ munmap(obj_, kSize);
}
}