\doxysection{write\+\_\+queue.\+h}
\label{write__queue_8h_source}\index{include/osmocom/core/write\_queue.h@{include/osmocom/core/write\_queue.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{3 \textcolor{comment}{/*}}
\DoxyCodeLine{4 \textcolor{comment}{ * (C) 2010 by Holger Hans Peter Freyther}}
\DoxyCodeLine{5 \textcolor{comment}{ * (C) 2010 by On-\/Waves}}
\DoxyCodeLine{6 \textcolor{comment}{ *}}
\DoxyCodeLine{7 \textcolor{comment}{ * All Rights Reserved}}
\DoxyCodeLine{8 \textcolor{comment}{ *}}
\DoxyCodeLine{9 \textcolor{comment}{ * This program is free software; you can redistribute it and/or modify}}
\DoxyCodeLine{10 \textcolor{comment}{ * it under the terms of the GNU General Public License as published by}}
\DoxyCodeLine{11 \textcolor{comment}{ * the Free Software Foundation; either version 2 of the License, or}}
\DoxyCodeLine{12 \textcolor{comment}{ * (at your option) any later version.}}
\DoxyCodeLine{13 \textcolor{comment}{ *}}
\DoxyCodeLine{14 \textcolor{comment}{ * This program is distributed in the hope that it will be useful,}}
\DoxyCodeLine{15 \textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{16 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the}}
\DoxyCodeLine{17 \textcolor{comment}{ * GNU General Public License for more details.}}
\DoxyCodeLine{18 \textcolor{comment}{ *}}
\DoxyCodeLine{19 \textcolor{comment}{ */}}
\DoxyCodeLine{20 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{21 }
\DoxyCodeLine{26 \textcolor{preprocessor}{\#include <osmocom/core/select.h>}}
\DoxyCodeLine{27 \textcolor{preprocessor}{\#include <osmocom/core/msgb.h>}}
\DoxyCodeLine{28 }
\DoxyCodeLine{30 \textcolor{keyword}{struct }osmo\_wqueue \{}
\DoxyCodeLine{32         \textcolor{keyword}{struct }osmo\_fd bfd;}
\DoxyCodeLine{34         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} max\_length;}
\DoxyCodeLine{36         \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} current\_length;}
\DoxyCodeLine{37 }
\DoxyCodeLine{39         \textcolor{keyword}{struct }llist\_head msg\_queue;}
\DoxyCodeLine{40 }
\DoxyCodeLine{42         int (*read\_cb)(\textcolor{keyword}{struct }osmo\_fd *fd);}
\DoxyCodeLine{44         int (*write\_cb)(\textcolor{keyword}{struct }osmo\_fd *fd, \textcolor{keyword}{struct }msgb *msg);}
\DoxyCodeLine{46         int (*except\_cb)(\textcolor{keyword}{struct }osmo\_fd *fd);}
\DoxyCodeLine{47 \};}
\DoxyCodeLine{48 }
\DoxyCodeLine{49 \textcolor{keywordtype}{void} osmo\_wqueue\_init(\textcolor{keyword}{struct} osmo\_wqueue *queue, \textcolor{keywordtype}{int} max\_length);}
\DoxyCodeLine{50 \textcolor{keywordtype}{void} osmo\_wqueue\_clear(\textcolor{keyword}{struct} osmo\_wqueue *queue);}
\DoxyCodeLine{51 \textcolor{keywordtype}{int} osmo\_wqueue\_enqueue(\textcolor{keyword}{struct} osmo\_wqueue *queue, \textcolor{keyword}{struct} msgb *data);}
\DoxyCodeLine{52 \textcolor{keywordtype}{int} osmo\_wqueue\_enqueue\_quiet(\textcolor{keyword}{struct} osmo\_wqueue *queue, \textcolor{keyword}{struct} msgb *data);}
\DoxyCodeLine{53 \textcolor{keywordtype}{size\_t} osmo\_wqueue\_set\_maxlen(\textcolor{keyword}{struct} osmo\_wqueue *queue, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{54 \textcolor{keywordtype}{int} osmo\_wqueue\_bfd\_cb(\textcolor{keyword}{struct} osmo\_fd *fd, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} what);}
\DoxyCodeLine{55 }

\end{DoxyCode}
