Loading...
Searching...
No Matches
fence.h
Go to the documentation of this file.
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2021, Google Inc.
*
* Synchronization fence
*/
#pragma once
#include <libcamera/base/class.h>
#include <libcamera/base/unique_fd.h>
namespace libcamera {
class Fence
{
public:
Fence(UniqueFD fd);
bool isValid() const { return fd_.isValid(); }
const UniqueFD &fd() const { return fd_; }
UniqueFD release() { return std::move(fd_); }
private:
LIBCAMERA_DISABLE_COPY_AND_MOVE(Fence)
UniqueFD fd_;
};
} /* namespace libcamera */
libcamera::Fence
Synchronization primitive to manage resources.
Definition fence.h:16
libcamera::Fence::isValid
bool isValid() const
Check if a Fence is valid.
Definition fence.h:20
libcamera::Fence::release
UniqueFD release()
Release the ownership of the file descriptor.
Definition fence.h:23
libcamera::Fence::fd
const UniqueFD & fd() const
Retrieve a constant reference to the file descriptor.
Definition fence.h:21
libcamera::Fence::Fence
Fence(UniqueFD fd)
Create a Fence.
Definition fence.cpp:82
libcamera::UniqueFD
unique_ptr-like wrapper for a file descriptor
Definition unique_fd.h:17
libcamera
Top-level libcamera namespace.
Definition bound_method.h:15
unique_fd.h
File descriptor wrapper that owns a file descriptor.