C/C++ API Reference
Loading...
Searching...
No Matches
pw_system

Oveview

Main docs: https://pigweed.dev/pw_system.

Namespaces

namespace  pw::system
 Opinionated system framework.
 

Classes

class  pw::system::AsyncCore
 

Functions

system::AsyncCorepw::System ()
 
void pw::SystemStart (channel::ByteReaderWriter &io_channel)
 
Allocatorpw::system::AsyncCore::allocator ()
 Returns the system pw::Allocator instance.
 
async2::Dispatcherpw::system::AsyncCore::dispatcher ()
 Returns the system pw::async2::Dispatcher instance.
 
rpc::Server & pw::system::AsyncCore::rpc_server ()
 Returns the system pw::rpc::Server instance.
 
bool pw::system::AsyncCore::RunOnce (Function< void()> &&function)
 

Friends

AsyncCorepw::system::AsyncCore::pw::System ()
 
void pw::system::AsyncCore::pw::SystemStart (channel::ByteReaderWriter &)
 

Function Documentation

◆ RunOnce()

bool pw::system::AsyncCore::RunOnce ( Function< void()> &&  function)

Runs a function once on a separate thread. If the function blocks, it may prevent other functions from running.

Returns
true if the function was enqueued to run, false if the function queue is full

◆ System()

system::AsyncCore & pw::System ( )
inline

Returns a reference to the global pw_system instance. pw::System() provides several features for applications: a memory allocator, an async dispatcher, and a RPC server.

◆ SystemStart()

void pw::SystemStart ( channel::ByteReaderWriter io_channel)

Starts running pw_system:async with the provided IO channel. This function never returns.