\hypertarget{structeventop}{\section{eventop Struct Reference}
\label{structeventop}\index{eventop@{eventop}}
}


Structure to define the backend of a given \hyperlink{structevent__base}{event\+\_\+base}.  




{\ttfamily \#include $<$event-\/internal.\+h$>$}

\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
const char $\ast$ \hyperlink{structeventop_aea346959c36b45b594317b9f27960a4e}{name}
\begin{DoxyCompactList}\small\item\em The name of this backend. \end{DoxyCompactList}\item 
void $\ast$($\ast$ \hyperlink{structeventop_a143c3b14c239be78a24ad159b16f9f35}{init} )(struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$)
\begin{DoxyCompactList}\small\item\em \hyperlink{structFunction}{Function} to set up an \hyperlink{structevent__base}{event\+\_\+base} to use this backend. \end{DoxyCompactList}\item 
int($\ast$ \hyperlink{structeventop_a96b282c8d557271e1f4418c1756d1855}{add} )(struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$, \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} fd, short old, short events, void $\ast$fdinfo)
\begin{DoxyCompactList}\small\item\em Enable reading/writing on a given fd or signal. \end{DoxyCompactList}\item 
int($\ast$ \hyperlink{structeventop_a14bddc47684285635f415c17c5fe4c1f}{del} )(struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$, \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} fd, short old, short events, void $\ast$fdinfo)
\begin{DoxyCompactList}\small\item\em As \char`\"{}add\char`\"{}, except 'events' contains the events we mean to disable. \end{DoxyCompactList}\item 
int($\ast$ \hyperlink{structeventop_ad09333310d237e39058d19426695790c}{dispatch} )(struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$, struct timeval $\ast$)
\begin{DoxyCompactList}\small\item\em \hyperlink{structFunction}{Function} to implement the core of an event loop. \end{DoxyCompactList}\item 
void($\ast$ \hyperlink{structeventop_a64b7e92edb993eb1185aaae1f6c3ee32}{dealloc} )(struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$)
\begin{DoxyCompactList}\small\item\em \hyperlink{structFunction}{Function} to clean up and free our data from the \hyperlink{structevent__base}{event\+\_\+base}. \end{DoxyCompactList}\item 
\hypertarget{structeventop_a542f6de57ac994c0e2d663570bbe494e}{int \hyperlink{structeventop_a542f6de57ac994c0e2d663570bbe494e}{need\+\_\+reinit}}\label{structeventop_a542f6de57ac994c0e2d663570bbe494e}

\begin{DoxyCompactList}\small\item\em Flag\+: set if we need to reinitialize the event base after we fork. \end{DoxyCompactList}\item 
enum \hyperlink{libevent2013_2libevent_2include_2event2_2event_8h_ae7da61aef13e27a3047151b696b44c80}{event\+\_\+method\+\_\+feature} \hyperlink{structeventop_a08aa4b25e8efd9e2cf22daa27f03276e}{features}
\begin{DoxyCompactList}\small\item\em Bit-\/array of supported event\+\_\+method\+\_\+features that this backend can provide. \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{structeventop_a7dd2e226e3ee07731094d137d94daab0}{fdinfo\+\_\+len}
\begin{DoxyCompactList}\small\item\em Length of the extra information we should record for each fd that has one or more active events. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Structure to define the backend of a given \hyperlink{structevent__base}{event\+\_\+base}. 



\subsection{Field Documentation}
\hypertarget{structeventop_a96b282c8d557271e1f4418c1756d1855}{\index{eventop@{eventop}!add@{add}}
\index{add@{add}!eventop@{eventop}}
\subsubsection[{add}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ eventop\+::add)(struct {\bf event\+\_\+base} $\ast$, {\bf evutil\+\_\+socket\+\_\+t} fd, short old, short events, void $\ast$fdinfo)}}\label{structeventop_a96b282c8d557271e1f4418c1756d1855}


Enable reading/writing on a given fd or signal. 

'events' will be the events that we're trying to enable\+: one or more of E\+V\+\_\+\+R\+E\+A\+D, E\+V\+\_\+\+W\+R\+I\+T\+E, E\+V\+\_\+\+S\+I\+G\+N\+A\+L, and E\+V\+\_\+\+E\+T. 'old' will be those events that were enabled on this fd previously. 'fdinfo' will be a structure associated with the fd by the evmap; its size is defined by the fdinfo field below. It will be set to 0 the first time the fd is added. The function should return 0 on success and -\/1 on error. 

Referenced by evmap\+\_\+io\+\_\+add().

\hypertarget{structeventop_a64b7e92edb993eb1185aaae1f6c3ee32}{\index{eventop@{eventop}!dealloc@{dealloc}}
\index{dealloc@{dealloc}!eventop@{eventop}}
\subsubsection[{dealloc}]{\setlength{\rightskip}{0pt plus 5cm}void($\ast$ eventop\+::dealloc)(struct {\bf event\+\_\+base} $\ast$)}}\label{structeventop_a64b7e92edb993eb1185aaae1f6c3ee32}


\hyperlink{structFunction}{Function} to clean up and free our data from the \hyperlink{structevent__base}{event\+\_\+base}. 



Referenced by event\+\_\+base\+\_\+free(), and event\+\_\+reinit().

\hypertarget{structeventop_a14bddc47684285635f415c17c5fe4c1f}{\index{eventop@{eventop}!del@{del}}
\index{del@{del}!eventop@{eventop}}
\subsubsection[{del}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ eventop\+::del)(struct {\bf event\+\_\+base} $\ast$, {\bf evutil\+\_\+socket\+\_\+t} fd, short old, short events, void $\ast$fdinfo)}}\label{structeventop_a14bddc47684285635f415c17c5fe4c1f}


As \char`\"{}add\char`\"{}, except 'events' contains the events we mean to disable. 



Referenced by evmap\+\_\+io\+\_\+del().

\hypertarget{structeventop_ad09333310d237e39058d19426695790c}{\index{eventop@{eventop}!dispatch@{dispatch}}
\index{dispatch@{dispatch}!eventop@{eventop}}
\subsubsection[{dispatch}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$ eventop\+::dispatch)(struct {\bf event\+\_\+base} $\ast$, struct timeval $\ast$)}}\label{structeventop_ad09333310d237e39058d19426695790c}


\hyperlink{structFunction}{Function} to implement the core of an event loop. 

It must see which added events are ready, and cause event\+\_\+active to be called for each active event (usually via event\+\_\+io\+\_\+active or such). It should return 0 on success and -\/1 on error. 

Referenced by event\+\_\+base\+\_\+loop().

\hypertarget{structeventop_a7dd2e226e3ee07731094d137d94daab0}{\index{eventop@{eventop}!fdinfo\+\_\+len@{fdinfo\+\_\+len}}
\index{fdinfo\+\_\+len@{fdinfo\+\_\+len}!eventop@{eventop}}
\subsubsection[{fdinfo\+\_\+len}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t eventop\+::fdinfo\+\_\+len}}\label{structeventop_a7dd2e226e3ee07731094d137d94daab0}


Length of the extra information we should record for each fd that has one or more active events. 

This information is recorded as part of the evmap entry for each fd, and passed as an argument to the add and del functions above. 

Referenced by evmap\+\_\+io\+\_\+add().

\hypertarget{structeventop_a08aa4b25e8efd9e2cf22daa27f03276e}{\index{eventop@{eventop}!features@{features}}
\index{features@{features}!eventop@{eventop}}
\subsubsection[{features}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf event\+\_\+method\+\_\+feature} eventop\+::features}}\label{structeventop_a08aa4b25e8efd9e2cf22daa27f03276e}


Bit-\/array of supported event\+\_\+method\+\_\+features that this backend can provide. 



Referenced by event\+\_\+base\+\_\+get\+\_\+features(), and evthread\+\_\+make\+\_\+base\+\_\+notifiable().

\hypertarget{structeventop_a143c3b14c239be78a24ad159b16f9f35}{\index{eventop@{eventop}!init@{init}}
\index{init@{init}!eventop@{eventop}}
\subsubsection[{init}]{\setlength{\rightskip}{0pt plus 5cm}void$\ast$($\ast$ eventop\+::init)(struct {\bf event\+\_\+base} $\ast$)}}\label{structeventop_a143c3b14c239be78a24ad159b16f9f35}


\hyperlink{structFunction}{Function} to set up an \hyperlink{structevent__base}{event\+\_\+base} to use this backend. 

It should create a new structure holding whatever information is needed to run the backend, and return it. The returned pointer will get stored by event\+\_\+init into the \hyperlink{structevent__base_ac69c16250431b118d0f066244a67da56}{event\+\_\+base.\+evbase} field. On failure, this function should return N\+U\+L\+L. 

Referenced by event\+\_\+base\+\_\+new\+\_\+with\+\_\+config(), and event\+\_\+reinit().

\hypertarget{structeventop_aea346959c36b45b594317b9f27960a4e}{\index{eventop@{eventop}!name@{name}}
\index{name@{name}!eventop@{eventop}}
\subsubsection[{name}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ eventop\+::name}}\label{structeventop_aea346959c36b45b594317b9f27960a4e}


The name of this backend. 



Referenced by event\+\_\+base\+\_\+get\+\_\+method(), event\+\_\+base\+\_\+new\+\_\+with\+\_\+config(), and event\+\_\+get\+\_\+supported\+\_\+methods().



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
opal/mca/event/libevent2013/libevent/event-\/internal.\+h\end{DoxyCompactItemize}
