.. _program_listing_file_include_embers_primitives_ticketlock.h: Program Listing for File ticketlock.h ===================================== |exhale_lsh| :ref:`Return to documentation for file ` (``include/embers/primitives/ticketlock.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp /* Copyright © 2020 Advanced Micro Devices, Inc. All rights reserved */ #ifndef _EMBERS_TICKETLOCK_H_ #define _EMBERS_TICKETLOCK_H_ #include "embers/atomic.h" #include namespace embers { template class TicketLock { private: atomic next_ticket_; uint8_t pad[128]; atomic now_serving_; public: TicketLock(); ~TicketLock() = default; TicketLock(const TicketLock &) = delete; TicketLock &operator=(const TicketLock &) = delete; TicketLock(TicketLock &&) = delete; __host__ __device__ void Acquire() noexcept; __host__ __device__ void Release() noexcept; }; } // namespace embers #include "ticketlock_impl.h" #endif // _EMBERS_TICKETLOCK_H_