35#ifndef _EXECUTOR_SELECTABLE_HXX_
36#define _EXECUTOR_SELECTABLE_HXX_
An object that can be scheduled on an executor to run.
This class implements an execution of tasks pulled off an input queue.
Essentially a "next" pointer container.
Handler structure that ExecutorBase knows about each entry to the select call.
Limits
Helper declarations for the certain fields' maximums.
@ MAX_PRIO
Largest priority we accept (otherwise we clip).
@ MAX_FD
Largest FD we accept (otherwise crash with error).
Selectable(Executable *parent)
Constructor.
void reset(SelectType type, int fd, unsigned priority)
Re-initialize a Selectable preparing to add it to select().
void set_wakeup(Executable *e)
Can be used to override the executable to wake up.
unsigned priority_
When the select condition is met, the Executable will be scheduled at this priority.
unsigned selectType_
What to watch the file for. See SelectType.
unsigned fd_
File descriptor to watch.
Executable * wakeup_
This executable will be scheduled on the executor when the select condition is met.
SelectType
Which operation this file should be selected upon.
#define HASSERT(x)
Checks that the value of expression x is true, else terminates the current process.