Shortcuts

Struct Spinlock::Sleeper

Nested Relationships

This struct is a nested type of Struct Spinlock.

Struct Documentation

struct ripple::Spinlock::Sleeper

A struct which can be used to spin for a certain number of iterations and then sleep if the iteration count has been reached.

Public Functions

auto wait() noexcept -> void

Causes the CPU to wait if the spin count is less than the maximum number of spins, otherwise sleeps for the kernel min sleep duration.

Public Static Functions

auto sleep() noexcept -> void

Puts the thread to sleep for a duration which is usually less than the minimum sleep time for the kernel, so the kernel will usually schedule this thread to sleep for the minimum duration.

Public Static Attributes

constexpr uint32_t max_spins = 4000

Defines the max number of spins before sleeping.

Docs

Access comprehensive developer documentation for Ripple

View Docs

Tutorials

Get tutorials to help with understand all features

View Tutorials

Examples

Find examples to help get started

View Examples