\hypertarget{evmap-internal_8h}{\section{opal/mca/event/libevent2013/libevent/evmap-\/internal.h File Reference}
\label{evmap-internal_8h}\index{opal/mca/event/libevent2013/libevent/evmap-\/internal.\+h@{opal/mca/event/libevent2013/libevent/evmap-\/internal.\+h}}
}


An event\+\_\+map is a utility structure to map each fd or signal to zero or more events.  


\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{evmap-internal_8h_a7be51d319c7f67df6a032f852c415fcb}{void \hyperlink{evmap-internal_8h_a7be51d319c7f67df6a032f852c415fcb}{evmap\+\_\+io\+\_\+initmap} (struct event\+\_\+io\+\_\+map $\ast$ctx)}\label{evmap-internal_8h_a7be51d319c7f67df6a032f852c415fcb}

\begin{DoxyCompactList}\small\item\em Initialize an event\+\_\+map for use. \end{DoxyCompactList}\item 
\hypertarget{evmap-internal_8h_a80b4a9d3ff389e3e32c78079269932ea}{void {\bfseries evmap\+\_\+signal\+\_\+initmap} (struct \hyperlink{structevent__signal__map}{event\+\_\+signal\+\_\+map} $\ast$ctx)}\label{evmap-internal_8h_a80b4a9d3ff389e3e32c78079269932ea}

\item 
void \hyperlink{evmap-internal_8h_aa86262101585908b054e3eadcccd41bb}{evmap\+\_\+io\+\_\+clear} (struct event\+\_\+io\+\_\+map $\ast$ctx)
\begin{DoxyCompactList}\small\item\em Remove all entries from an event\+\_\+map. \end{DoxyCompactList}\item 
\hypertarget{evmap-internal_8h_ae5d4e30c6c752120b575fbc98022d021}{void {\bfseries evmap\+\_\+signal\+\_\+clear} (struct \hyperlink{structevent__signal__map}{event\+\_\+signal\+\_\+map} $\ast$ctx)}\label{evmap-internal_8h_ae5d4e30c6c752120b575fbc98022d021}

\item 
int \hyperlink{evmap-internal_8h_a337c42f077943b9ec9e56d80bb5cc1da}{evmap\+\_\+io\+\_\+add} (struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$base, \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} fd, struct \hyperlink{structevent}{event} $\ast$ev)
\begin{DoxyCompactList}\small\item\em Add an I\+O event (some combination of E\+V\+\_\+\+R\+E\+A\+D or E\+V\+\_\+\+W\+R\+I\+T\+E) to an \hyperlink{structevent__base}{event\+\_\+base}'s list of events on a given file descriptor, and tell the underlying eventops about the fd if its state has changed. \end{DoxyCompactList}\item 
int \hyperlink{evmap-internal_8h_a6e701fc134ed4b018c82883d4c4a6cee}{evmap\+\_\+io\+\_\+del} (struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$base, \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} fd, struct \hyperlink{structevent}{event} $\ast$ev)
\begin{DoxyCompactList}\small\item\em Remove an I\+O event (some combination of E\+V\+\_\+\+R\+E\+A\+D or E\+V\+\_\+\+W\+R\+I\+T\+E) to an \hyperlink{structevent__base}{event\+\_\+base}'s list of events on a given file descriptor, and tell the underlying eventops about the fd if its state has changed. \end{DoxyCompactList}\item 
void \hyperlink{evmap-internal_8h_a2ccab98f18a20681477c76da0029b08e}{evmap\+\_\+io\+\_\+active} (struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$base, \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} fd, short events)
\begin{DoxyCompactList}\small\item\em Active the set of events waiting on an \hyperlink{structevent__base}{event\+\_\+base} for a given fd. \end{DoxyCompactList}\item 
\hypertarget{evmap-internal_8h_a398f044bc3239c0a156e901a6b8ac12a}{int {\bfseries evmap\+\_\+signal\+\_\+add} (struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$base, int signum, struct \hyperlink{structevent}{event} $\ast$ev)}\label{evmap-internal_8h_a398f044bc3239c0a156e901a6b8ac12a}

\item 
\hypertarget{evmap-internal_8h_acb1de810206952cf02b2c598ca8f0811}{int {\bfseries evmap\+\_\+signal\+\_\+del} (struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$base, int signum, struct \hyperlink{structevent}{event} $\ast$ev)}\label{evmap-internal_8h_acb1de810206952cf02b2c598ca8f0811}

\item 
\hypertarget{evmap-internal_8h_a68ae9e5826589615a9487a2448cfda2c}{void {\bfseries evmap\+\_\+signal\+\_\+active} (struct \hyperlink{structevent__base}{event\+\_\+base} $\ast$base, \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} signum, int ncalls)}\label{evmap-internal_8h_a68ae9e5826589615a9487a2448cfda2c}

\item 
\hypertarget{evmap-internal_8h_af7d3a02c219288f840c89f745aeb8823}{void $\ast$ {\bfseries evmap\+\_\+io\+\_\+get\+\_\+fdinfo} (struct event\+\_\+io\+\_\+map $\ast$ctx, \hyperlink{opal_2mca_2event_2libevent2013_2libevent_2include_2event2_2util_8h_a7ef0023565082a65020f6e56be59fd0b}{evutil\+\_\+socket\+\_\+t} fd)}\label{evmap-internal_8h_af7d3a02c219288f840c89f745aeb8823}

\end{DoxyCompactItemize}


\subsection{Detailed Description}
An event\+\_\+map is a utility structure to map each fd or signal to zero or more events. 

Functions to manipulate event\+\_\+maps should only be used from inside libevent. They generally need to hold the lock on the corresponding \hyperlink{structevent__base}{event\+\_\+base}. 

\subsection{Function Documentation}
\hypertarget{evmap-internal_8h_a2ccab98f18a20681477c76da0029b08e}{\index{evmap-\/internal.\+h@{evmap-\/internal.\+h}!evmap\+\_\+io\+\_\+active@{evmap\+\_\+io\+\_\+active}}
\index{evmap\+\_\+io\+\_\+active@{evmap\+\_\+io\+\_\+active}!evmap-\/internal.\+h@{evmap-\/internal.\+h}}
\subsubsection[{evmap\+\_\+io\+\_\+active}]{\setlength{\rightskip}{0pt plus 5cm}void evmap\+\_\+io\+\_\+active (
\begin{DoxyParamCaption}
\item[{struct {\bf event\+\_\+base} $\ast$}]{base, }
\item[{{\bf evutil\+\_\+socket\+\_\+t}}]{fd, }
\item[{short}]{events}
\end{DoxyParamCaption}
)}}\label{evmap-internal_8h_a2ccab98f18a20681477c76da0029b08e}


Active the set of events waiting on an \hyperlink{structevent__base}{event\+\_\+base} for a given fd. 


\begin{DoxyParams}{Parameters}
{\em base} & the \hyperlink{structevent__base}{event\+\_\+base} to operate on. \\
\hline
{\em fd} & the file descriptor that has become active. \\
\hline
{\em events} & a bitmask of E\+V\+\_\+\+R\+E\+A\+D$\vert$\+E\+V\+\_\+\+W\+R\+I\+T\+E$\vert$\+E\+V\+\_\+\+E\+T. \\
\hline
\end{DoxyParams}


References event\+\_\+base\+::io.

\hypertarget{evmap-internal_8h_a337c42f077943b9ec9e56d80bb5cc1da}{\index{evmap-\/internal.\+h@{evmap-\/internal.\+h}!evmap\+\_\+io\+\_\+add@{evmap\+\_\+io\+\_\+add}}
\index{evmap\+\_\+io\+\_\+add@{evmap\+\_\+io\+\_\+add}!evmap-\/internal.\+h@{evmap-\/internal.\+h}}
\subsubsection[{evmap\+\_\+io\+\_\+add}]{\setlength{\rightskip}{0pt plus 5cm}int evmap\+\_\+io\+\_\+add (
\begin{DoxyParamCaption}
\item[{struct {\bf event\+\_\+base} $\ast$}]{base, }
\item[{{\bf evutil\+\_\+socket\+\_\+t}}]{fd, }
\item[{struct {\bf event} $\ast$}]{ev}
\end{DoxyParamCaption}
)}}\label{evmap-internal_8h_a337c42f077943b9ec9e56d80bb5cc1da}


Add an I\+O event (some combination of E\+V\+\_\+\+R\+E\+A\+D or E\+V\+\_\+\+W\+R\+I\+T\+E) to an \hyperlink{structevent__base}{event\+\_\+base}'s list of events on a given file descriptor, and tell the underlying eventops about the fd if its state has changed. 

Requires that ev is not already added.


\begin{DoxyParams}{Parameters}
{\em base} & the \hyperlink{structevent__base}{event\+\_\+base} to operate on. \\
\hline
{\em fd} & the file descriptor corresponding to ev. \\
\hline
{\em ev} & the event to add. \\
\hline
\end{DoxyParams}


References eventop\+::add, E\+V\+\_\+\+E\+T, E\+V\+\_\+\+R\+E\+A\+D, E\+V\+\_\+\+W\+R\+I\+T\+E, event\+\_\+base\+::evsel, eventop\+::fdinfo\+\_\+len, and event\+\_\+base\+::io.



Referenced by event\+\_\+reinit().

\hypertarget{evmap-internal_8h_aa86262101585908b054e3eadcccd41bb}{\index{evmap-\/internal.\+h@{evmap-\/internal.\+h}!evmap\+\_\+io\+\_\+clear@{evmap\+\_\+io\+\_\+clear}}
\index{evmap\+\_\+io\+\_\+clear@{evmap\+\_\+io\+\_\+clear}!evmap-\/internal.\+h@{evmap-\/internal.\+h}}
\subsubsection[{evmap\+\_\+io\+\_\+clear}]{\setlength{\rightskip}{0pt plus 5cm}void evmap\+\_\+io\+\_\+clear (
\begin{DoxyParamCaption}
\item[{struct event\+\_\+io\+\_\+map $\ast$}]{ctx}
\end{DoxyParamCaption}
)}}\label{evmap-internal_8h_aa86262101585908b054e3eadcccd41bb}


Remove all entries from an event\+\_\+map. 


\begin{DoxyParams}{Parameters}
{\em ctx} & the map to clear. \\
\hline
\end{DoxyParams}


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

\hypertarget{evmap-internal_8h_a6e701fc134ed4b018c82883d4c4a6cee}{\index{evmap-\/internal.\+h@{evmap-\/internal.\+h}!evmap\+\_\+io\+\_\+del@{evmap\+\_\+io\+\_\+del}}
\index{evmap\+\_\+io\+\_\+del@{evmap\+\_\+io\+\_\+del}!evmap-\/internal.\+h@{evmap-\/internal.\+h}}
\subsubsection[{evmap\+\_\+io\+\_\+del}]{\setlength{\rightskip}{0pt plus 5cm}int evmap\+\_\+io\+\_\+del (
\begin{DoxyParamCaption}
\item[{struct {\bf event\+\_\+base} $\ast$}]{base, }
\item[{{\bf evutil\+\_\+socket\+\_\+t}}]{fd, }
\item[{struct {\bf event} $\ast$}]{ev}
\end{DoxyParamCaption}
)}}\label{evmap-internal_8h_a6e701fc134ed4b018c82883d4c4a6cee}


Remove an I\+O event (some combination of E\+V\+\_\+\+R\+E\+A\+D or E\+V\+\_\+\+W\+R\+I\+T\+E) to an \hyperlink{structevent__base}{event\+\_\+base}'s list of events on a given file descriptor, and tell the underlying eventops about the fd if its state has changed. 


\begin{DoxyParams}{Parameters}
{\em base} & the \hyperlink{structevent__base}{event\+\_\+base} to operate on. \\
\hline
{\em fd} & the file descriptor corresponding to ev. \\
\hline
{\em ev} & the event to remove. \\
\hline
\end{DoxyParams}


References eventop\+::del, E\+V\+\_\+\+R\+E\+A\+D, E\+V\+\_\+\+W\+R\+I\+T\+E, event\+\_\+base\+::evsel, and event\+\_\+base\+::io.

