CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Loading...
Searching...
No Matches
TicketLock Class Reference

A simple ticket lock. More...

#include <locks.hh>

Public Member Functions

void lock ()
 Acquire the lock.
void unlock ()
 Release the lock.

Detailed Description

A simple ticket lock.

A ticket lock ensures that threads that arrive are serviced in order, without regard for priorities. It has no mechanism for tracking tickets that are discarded and so does not implement a try_lock API.

Definition at line 215 of file locks.hh.

Member Function Documentation

◆ lock()

void TicketLock::lock ( )
inline

Acquire the lock.

Definition at line 223 of file locks.hh.

References ticketlock_lock().

◆ unlock()

void TicketLock::unlock ( )
inline

Release the lock.

Note: This does not check that the lock is owned by the calling thread.

Definition at line 233 of file locks.hh.

References ticketlock_unlock().


The documentation for this class was generated from the following file: