Serene Runtime 1.0.0-dev
C runtime for the Serene programming language
Loading...
Searching...
No Matches
srn_reactor_backend_t Struct Reference

One async system behind the reactor contract. More...

#include <backend.h>

Collaboration diagram for srn_reactor_backend_t:
[legend]

Data Fields

const char * name
 A short name for diagnostics, for example "epoll".
uint32_t features
 Bitmap of SRN_REACTOR_BACKEND_FEAT_* flags this backend requires from the reactor.
srn_error_t *(* init )(srn_reactor_t *reactor)
 Initialize the backend in the given reactor.
void(* shutdown )(srn_reactor_t *reactor)
 Clean up after the backend.
void(* submit )(srn_reactor_t *reactor, size_t channel, const srn_reactor_io_request_t *req)
 Submit a new request to the backend.
void(* wait )(srn_reactor_t *reactor, int timeout_ms)
 Wait for readiness and complete any ready operations.
void(* wake )(srn_reactor_t *reactor)

Detailed Description

One async system behind the reactor contract.

The reactor core drives these on the reactor thread.

Definition at line 55 of file backend.h.

Field Documentation

◆ features

uint32_t srn_reactor_backend_t::features

Bitmap of SRN_REACTOR_BACKEND_FEAT_* flags this backend requires from the reactor.

Definition at line 61 of file backend.h.

◆ init

srn_error_t *(* srn_reactor_backend_t::init) (srn_reactor_t *reactor)

Initialize the backend in the given reactor.

Definition at line 64 of file backend.h.

◆ name

const char* srn_reactor_backend_t::name

A short name for diagnostics, for example "epoll".

Definition at line 57 of file backend.h.

◆ shutdown

void(* srn_reactor_backend_t::shutdown) (srn_reactor_t *reactor)

Clean up after the backend.

Definition at line 67 of file backend.h.

◆ submit

void(* srn_reactor_backend_t::submit) (srn_reactor_t *reactor, size_t channel, const srn_reactor_io_request_t *req)

Submit a new request to the backend.

Failures are reported to the waiting fiber by posting a completion, not returned, so there is nothing to check.

Definition at line 71 of file backend.h.

◆ wait

void(* srn_reactor_backend_t::wait) (srn_reactor_t *reactor, int timeout_ms)

Wait for readiness and complete any ready operations.

Errors here are either benign (EINTR) or setup bugs, so nothing is returned.

Definition at line 75 of file backend.h.

◆ wake

void(* srn_reactor_backend_t::wake) (srn_reactor_t *reactor)

Definition at line 77 of file backend.h.


The documentation for this struct was generated from the following file: