Skip to content

Class Ase::USignalSource

ClassList > Ase > USignalSource

EventLoop source for handler execution.

  • #include <loop.hh>

Inherits the following classes: Ase::EventSource

Public Attributes inherited from Ase::EventSource

See Ase::EventSource

Type Name
uint idx
PollFD * pfd

Public Functions inherited from Ase::EventSource

See Ase::EventSource

Type Name
void add_poll (PollFD *const pfd)
Add a PollFD descriptors for poll(2) andcheck() .
virtual bool check (const LoopState & state) = 0
Check the source and its PollFD descriptors for dispatching (true return).
virtual void destroy ()
virtual bool dispatch (const LoopState & state) = 0
Dispatch source, returns if it should be kept alive.
void loop_remove ()
Remove this source from its event loop if any.
MainLoop * main_loop () const
Get the main loop for this source.
bool may_recurse () const
Indicates if this source may recurse.
void may_recurse (bool may_recurse)
Dispatch this source if its running recursively.
virtual bool prepare (const LoopState & state, int64 * timeout_usecs_p) = 0
Prepare the source for dispatching (true return) or polling (false).
bool primary () const
Indicate whether this source is primary.
void primary (bool is_primary)
Set whether this source prevents its loop from exiting.
bool recursion () const
Indicates wether the source is currently in recursion.
void remove_poll (PollFD *const pfd)
Remove a previously added PollFD .

Public Static Functions

Type Name
USignalSourceP create (int8 signum, const USignalSlot & slot)
void install_sigaction (int8 signum)
void raise (int8 signum)
Flag a unix signal being raised, this function may be called from any thread at any time.

Protected Attributes inherited from Ase::EventSource

See Ase::EventSource

Type Name
uint dispatching_
uint id_
EventLoop * loop_
uint8 loop_state_
uint may_recurse_
struct Ase::EventSource * pfds_
uint primary_
int16 priority_
uint was_dispatching_

Protected Functions

Type Name
USignalSource (int8 signum, const USignalSlot & slot)
virtual bool check (const LoopState & state)
Check the source and its PollFD descriptors for dispatching (true return).
virtual void destroy ()
virtual bool dispatch (const LoopState & state)
Dispatch source, returns if it should be kept alive.
virtual bool prepare (const LoopState & state, int64 * timeout_usecs_p)
Prepare the source for dispatching (true return) or polling (false).
virtual ~USignalSource ()

Protected Functions inherited from Ase::EventSource

See Ase::EventSource

Type Name
EventSource ()
uint n_pfds ()
uint source_id ()
virtual ~EventSource ()

Public Static Functions Documentation

function create

static inline USignalSourceP Ase::USignalSource::create (
    int8 signum,
    const USignalSlot & slot
) 

function install_sigaction

static void Ase::USignalSource::install_sigaction (
    int8 signum
) 

function raise

static void Ase::USignalSource::raise (
    int8 signum
) 

Protected Functions Documentation

function USignalSource

explicit Ase::USignalSource::USignalSource (
    int8 signum,
    const USignalSlot & slot
) 

function check

virtual bool Ase::USignalSource::check (
    const LoopState & state
) 

Implements Ase::EventSource::check


function destroy

virtual void Ase::USignalSource::destroy () 

Implements Ase::EventSource::destroy


function dispatch

virtual bool Ase::USignalSource::dispatch (
    const LoopState & state
) 

Implements Ase::EventSource::dispatch


function prepare

virtual bool Ase::USignalSource::prepare (
    const LoopState & state,
    int64 * timeout_usecs_p
) 

Implements Ase::EventSource::prepare


function ~USignalSource

virtual Ase::USignalSource::~USignalSource () 


The documentation for this class was generated from the following file /__w/anklang/anklang/ase/loop.hh