\doxysection{osmo\+\_\+wqueue Struct Reference}
\label{structosmo__wqueue}\index{osmo\_wqueue@{osmo\_wqueue}}


write queue instance  




{\ttfamily \#include $<$write\+\_\+queue.\+h$>$}

\doxysubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+fd} \textbf{ bfd}
\begin{DoxyCompactList}\small\item\em osmocom file descriptor \end{DoxyCompactList}\item 
unsigned int \textbf{ max\+\_\+length}
\begin{DoxyCompactList}\small\item\em maximum length of write queue \end{DoxyCompactList}\item 
unsigned int \textbf{ current\+\_\+length}
\begin{DoxyCompactList}\small\item\em current length of write queue \end{DoxyCompactList}\item 
struct \textbf{ llist\+\_\+head} \textbf{ msg\+\_\+queue}
\begin{DoxyCompactList}\small\item\em actual linked list implementing the queue \end{DoxyCompactList}\item 
int($\ast$ \textbf{ read\+\_\+cb} )(struct \textbf{ osmo\+\_\+fd} $\ast$fd)
\begin{DoxyCompactList}\small\item\em call-\/back in case qeueue is readable. \end{DoxyCompactList}\item 
int($\ast$ \textbf{ write\+\_\+cb} )(struct \textbf{ osmo\+\_\+fd} $\ast$fd, struct \textbf{ msgb} $\ast$\textbf{ msg})
\begin{DoxyCompactList}\small\item\em call-\/back in case qeueue is writable. \end{DoxyCompactList}\item 
int($\ast$ \textbf{ except\+\_\+cb} )(struct \textbf{ osmo\+\_\+fd} $\ast$fd)
\begin{DoxyCompactList}\small\item\em call-\/back in case qeueue has exceptions. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
write queue instance 

\doxysubsection{Field Documentation}
\mbox{\label{structosmo__wqueue_a57c285118552bc1dfe4800c902bb0719}} 
\index{osmo\_wqueue@{osmo\_wqueue}!bfd@{bfd}}
\index{bfd@{bfd}!osmo\_wqueue@{osmo\_wqueue}}
\doxysubsubsection{bfd}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+fd} osmo\+\_\+wqueue\+::bfd}



osmocom file descriptor 



Referenced by \textbf{ \+\_\+file\+\_\+raw\+\_\+output()}, \textbf{ gsmtap\+\_\+inst\+\_\+fd2()}, \textbf{ log\+\_\+target\+\_\+create\+\_\+file()}, \textbf{ log\+\_\+target\+\_\+destroy()}, \textbf{ log\+\_\+target\+\_\+file\+\_\+reopen()}, \textbf{ log\+\_\+target\+\_\+file\+\_\+switch\+\_\+to\+\_\+stream()}, \textbf{ log\+\_\+target\+\_\+file\+\_\+switch\+\_\+to\+\_\+wqueue()}, \textbf{ osmo\+\_\+tundev\+\_\+alloc()}, \textbf{ osmo\+\_\+tundev\+\_\+close()}, \textbf{ osmo\+\_\+tundev\+\_\+get\+\_\+fd()}, \textbf{ osmo\+\_\+tundev\+\_\+open()}, \textbf{ osmo\+\_\+wqueue\+\_\+bfd\+\_\+cb()}, \textbf{ osmo\+\_\+wqueue\+\_\+clear()}, \textbf{ osmo\+\_\+wqueue\+\_\+enqueue\+\_\+quiet()}, \textbf{ osmo\+\_\+wqueue\+\_\+init()}, \textbf{ tundev\+\_\+decaps()}, and \textbf{ tundev\+\_\+write\+\_\+cb()}.

\mbox{\label{structosmo__wqueue_a7f42a77dae317a74b151cc76480f6729}} 
\index{osmo\_wqueue@{osmo\_wqueue}!current\_length@{current\_length}}
\index{current\_length@{current\_length}!osmo\_wqueue@{osmo\_wqueue}}
\doxysubsubsection{current\_length}
{\footnotesize\ttfamily unsigned int osmo\+\_\+wqueue\+::current\+\_\+length}



current length of write queue 



Referenced by \textbf{ \+\_\+file\+\_\+raw\+\_\+output()}, \textbf{ osmo\+\_\+wqueue\+\_\+bfd\+\_\+cb()}, \textbf{ osmo\+\_\+wqueue\+\_\+clear()}, \textbf{ osmo\+\_\+wqueue\+\_\+enqueue()}, \textbf{ osmo\+\_\+wqueue\+\_\+enqueue\+\_\+quiet()}, \textbf{ osmo\+\_\+wqueue\+\_\+init()}, and \textbf{ osmo\+\_\+wqueue\+\_\+set\+\_\+maxlen()}.

\mbox{\label{structosmo__wqueue_a89018e4a1d9eae9790b19f2c886fa077}} 
\index{osmo\_wqueue@{osmo\_wqueue}!except\_cb@{except\_cb}}
\index{except\_cb@{except\_cb}!osmo\_wqueue@{osmo\_wqueue}}
\doxysubsubsection{except\_cb}
{\footnotesize\ttfamily int($\ast$ osmo\+\_\+wqueue\+::except\+\_\+cb) (struct \textbf{ osmo\+\_\+fd} $\ast$fd)}



call-\/back in case qeueue has exceptions. 

Return -\/EBADF if fd is freed inside cb. 

Referenced by \textbf{ osmo\+\_\+wqueue\+\_\+bfd\+\_\+cb()}, and \textbf{ osmo\+\_\+wqueue\+\_\+init()}.

\mbox{\label{structosmo__wqueue_a1ac0b48a931de4c45ce432098adc5a04}} 
\index{osmo\_wqueue@{osmo\_wqueue}!max\_length@{max\_length}}
\index{max\_length@{max\_length}!osmo\_wqueue@{osmo\_wqueue}}
\doxysubsubsection{max\_length}
{\footnotesize\ttfamily unsigned int osmo\+\_\+wqueue\+::max\+\_\+length}



maximum length of write queue 



Referenced by \textbf{ osmo\+\_\+wqueue\+\_\+enqueue()}, \textbf{ osmo\+\_\+wqueue\+\_\+enqueue\+\_\+quiet()}, \textbf{ osmo\+\_\+wqueue\+\_\+init()}, and \textbf{ osmo\+\_\+wqueue\+\_\+set\+\_\+maxlen()}.

\mbox{\label{structosmo__wqueue_a01ef6782c5706b22d5e72d724a742bed}} 
\index{osmo\_wqueue@{osmo\_wqueue}!msg\_queue@{msg\_queue}}
\index{msg\_queue@{msg\_queue}!osmo\_wqueue@{osmo\_wqueue}}
\doxysubsubsection{msg\_queue}
{\footnotesize\ttfamily struct \textbf{ llist\+\_\+head} osmo\+\_\+wqueue\+::msg\+\_\+queue}



actual linked list implementing the queue 



Referenced by \textbf{ log\+\_\+target\+\_\+file\+\_\+switch\+\_\+to\+\_\+stream()}, \textbf{ osmo\+\_\+wqueue\+\_\+bfd\+\_\+cb()}, \textbf{ osmo\+\_\+wqueue\+\_\+clear()}, \textbf{ osmo\+\_\+wqueue\+\_\+enqueue\+\_\+quiet()}, \textbf{ osmo\+\_\+wqueue\+\_\+init()}, and \textbf{ osmo\+\_\+wqueue\+\_\+set\+\_\+maxlen()}.

\mbox{\label{structosmo__wqueue_af34ee3f3e80707ce0d9f0e8d09d46150}} 
\index{osmo\_wqueue@{osmo\_wqueue}!read\_cb@{read\_cb}}
\index{read\_cb@{read\_cb}!osmo\_wqueue@{osmo\_wqueue}}
\doxysubsubsection{read\_cb}
{\footnotesize\ttfamily int($\ast$ osmo\+\_\+wqueue\+::read\+\_\+cb) (struct \textbf{ osmo\+\_\+fd} $\ast$fd)}



call-\/back in case qeueue is readable. 

Return -\/EBADF if fd is freed inside cb. 

Referenced by \textbf{ osmo\+\_\+tundev\+\_\+alloc()}, \textbf{ osmo\+\_\+wqueue\+\_\+bfd\+\_\+cb()}, and \textbf{ osmo\+\_\+wqueue\+\_\+init()}.

\mbox{\label{structosmo__wqueue_aac8455731a29b598880872f177ca483c}} 
\index{osmo\_wqueue@{osmo\_wqueue}!write\_cb@{write\_cb}}
\index{write\_cb@{write\_cb}!osmo\_wqueue@{osmo\_wqueue}}
\doxysubsubsection{write\_cb}
{\footnotesize\ttfamily int($\ast$ osmo\+\_\+wqueue\+::write\+\_\+cb) (struct \textbf{ osmo\+\_\+fd} $\ast$fd, struct \textbf{ msgb} $\ast$\textbf{ msg})}



call-\/back in case qeueue is writable. 

Return -\/EBADF if fd is freed inside cb. 

Referenced by \textbf{ log\+\_\+target\+\_\+create\+\_\+file()}, \textbf{ log\+\_\+target\+\_\+file\+\_\+switch\+\_\+to\+\_\+wqueue()}, \textbf{ osmo\+\_\+tundev\+\_\+alloc()}, \textbf{ osmo\+\_\+wqueue\+\_\+bfd\+\_\+cb()}, and \textbf{ osmo\+\_\+wqueue\+\_\+init()}.



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
include/osmocom/core/\textbf{ write\+\_\+queue.\+h}\end{DoxyCompactItemize}
