Abstract base class for a clock tree element of a clock tree.
Class implementations of Element must implement DoAcquireLocked and DoReleaseLocked functions. For clock tree elements that only get enabled / configured, it is sufficient to only override the DoEnable function, otherwise it is required to override the DoDisable function to disable the respective clock tree element.
Note: Clock tree element classes shouldn't be directly derived from the Element class, but from the ElementBlocking, ElementNonBlockingCannotFail or ElementNonBlockingMightFail class.
Public Member Functions | |
| constexpr | Element (bool may_block) |
| uint32_t | ref_count () const |
| Get reference count for this clock tree element. | |
| bool | may_block () const |
| Check whether acquiring or releasing the element may block. | |
| Element (const Element &)=delete | |
| Element (const Element &&)=delete | |
| Element & | operator= (const Element &)=delete |
| Element & | operator= (const Element &&)=delete |
| Status | Acquire () |
| Status | Release () |
| Status | AcquireWith (Element &element_with) |
Protected Member Functions | |
| virtual Status | DoAcquireLocked ()=0 |
| virtual Status | DoReleaseLocked ()=0 |
| uint32_t | IncRef () |
| Increment reference count and return incremented value. | |
| uint32_t | DecRef () |
| Decrement reference count and return decremented value. | |
| virtual Status | DoEnable ()=0 |
| Function called when the clock tree element needs to get enabled. | |
| virtual Status | DoDisable () |
Private Member Functions | |
| virtual Status | DoAcquire ()=0 |
| Handle Acquire(), deferring locking the child class. | |
| virtual Status | DoRelease ()=0 |
| Handle Release(), deferring locking the child class. | |