\hypertarget{OTF__FileManager_8h}{\section{ompi/contrib/vt/vt/extlib/otf/otflib/\+O\+T\+F\+\_\+\+File\+Manager.h File Reference}
\label{OTF__FileManager_8h}\index{ompi/contrib/vt/vt/extlib/otf/otflib/\+O\+T\+F\+\_\+\+File\+Manager.\+h@{ompi/contrib/vt/vt/extlib/otf/otflib/\+O\+T\+F\+\_\+\+File\+Manager.\+h}}
}


Manages file handles.  


{\ttfamily \#include \char`\"{}O\+T\+F\+\_\+inttypes.\+h\char`\"{}}\\*
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{OTF__FileManager_8h_a13d55ba4f776412d626289d4612a544b}{typedef struct \hyperlink{structstruct__OTF__File}{struct\+\_\+\+O\+T\+F\+\_\+\+File} {\bfseries O\+T\+F\+\_\+\+File}}\label{OTF__FileManager_8h_a13d55ba4f776412d626289d4612a544b}

\item 
\hypertarget{group__fm_ga621c18447ec33f803cc270a9494b0685}{typedef struct \\*
\hyperlink{structstruct__OTF__FileManager}{struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager} \hyperlink{group__fm_ga621c18447ec33f803cc270a9494b0685}{O\+T\+F\+\_\+\+File\+Manager}}\label{group__fm_ga621c18447ec33f803cc270a9494b0685}

\begin{DoxyCompactList}\small\item\em file manager object \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group__fm_ga621c18447ec33f803cc270a9494b0685}{O\+T\+F\+\_\+\+File\+Manager} $\ast$ \hyperlink{group__fm_gaeaee6fa34285107dfdf42eb1905d5ce2}{O\+T\+F\+\_\+\+File\+Manager\+\_\+open} (uint32\+\_\+t number)
\begin{DoxyCompactList}\small\item\em Generates a new file manager with a maximum number of files that are allowed to be open simultaneously. \end{DoxyCompactList}\item 
\hypertarget{group__fm_ga45307a172ee04fa888e9e41dc7f83465}{void \hyperlink{group__fm_ga45307a172ee04fa888e9e41dc7f83465}{O\+T\+F\+\_\+\+File\+Manager\+\_\+close} (\hyperlink{group__fm_ga621c18447ec33f803cc270a9494b0685}{O\+T\+F\+\_\+\+File\+Manager} $\ast$m)}\label{group__fm_ga45307a172ee04fa888e9e41dc7f83465}

\begin{DoxyCompactList}\small\item\em Closes the file manager. \end{DoxyCompactList}\item 
uint32\+\_\+t \hyperlink{OTF__FileManager_8h_ad5b6484cdb5feebf744aa7c9a9c47cc7}{O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Count} (\hyperlink{group__fm_ga621c18447ec33f803cc270a9494b0685}{O\+T\+F\+\_\+\+File\+Manager} $\ast$m)
\begin{DoxyCompactList}\small\item\em Returns the number of files currently open. \end{DoxyCompactList}\item 
uint32\+\_\+t \hyperlink{OTF__FileManager_8h_af26e9915d6ecc737e91f8cc839e130e8}{O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Number} (\hyperlink{group__fm_ga621c18447ec33f803cc270a9494b0685}{O\+T\+F\+\_\+\+File\+Manager} $\ast$m)
\begin{DoxyCompactList}\small\item\em Returns the numbner of files allowed to be open simultaneously. \end{DoxyCompactList}\item 
uint32\+\_\+t \hyperlink{OTF__FileManager_8h_ae00d596d36240d58aef6f894c6a38565}{O\+T\+F\+\_\+\+File\+Manager\+\_\+set\+Number} (\hyperlink{group__fm_ga621c18447ec33f803cc270a9494b0685}{O\+T\+F\+\_\+\+File\+Manager} $\ast$m, uint32\+\_\+t number)
\begin{DoxyCompactList}\small\item\em Sets the number of files allowed to be open simultaneously. \end{DoxyCompactList}\item 
int \hyperlink{OTF__FileManager_8h_aaff5dc44c4418a0f7b0006bccc71fca7}{O\+T\+F\+\_\+\+File\+Manager\+\_\+guarantee\+File} (\hyperlink{group__fm_ga621c18447ec33f803cc270a9494b0685}{O\+T\+F\+\_\+\+File\+Manager} $\ast$m)
\begin{DoxyCompactList}\small\item\em Ensure there is a free file handle available after this call. \end{DoxyCompactList}\item 
int \hyperlink{OTF__FileManager_8h_ab9d7f51e4aabbbb1a06910a3d4f60014}{O\+T\+F\+\_\+\+File\+Manager\+\_\+register\+File} (\hyperlink{group__fm_ga621c18447ec33f803cc270a9494b0685}{O\+T\+F\+\_\+\+File\+Manager} $\ast$m, \hyperlink{structstruct__OTF__File}{O\+T\+F\+\_\+\+File} $\ast$file)
\begin{DoxyCompactList}\small\item\em Registers the 'file' as open. \end{DoxyCompactList}\item 
int \hyperlink{OTF__FileManager_8h_a9b62063ddcf6962c6f348d91c91559fd}{O\+T\+F\+\_\+\+File\+Manager\+\_\+touch\+File} (\hyperlink{group__fm_ga621c18447ec33f803cc270a9494b0685}{O\+T\+F\+\_\+\+File\+Manager} $\ast$m, \hyperlink{structstruct__OTF__File}{O\+T\+F\+\_\+\+File} $\ast$file)
\begin{DoxyCompactList}\small\item\em Marks currently opened 'file' as used which is important for the scheduling strategy, i.\+e. \end{DoxyCompactList}\item 
int \hyperlink{OTF__FileManager_8h_af87b135440167bdcd6cb8bd40b1ae348}{O\+T\+F\+\_\+\+File\+Manager\+\_\+suspend\+File} (\hyperlink{group__fm_ga621c18447ec33f803cc270a9494b0685}{O\+T\+F\+\_\+\+File\+Manager} $\ast$m, \hyperlink{structstruct__OTF__File}{O\+T\+F\+\_\+\+File} $\ast$file)
\begin{DoxyCompactList}\small\item\em Suspend an open file explicitly. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Manages file handles. 

i.\+e. Opens, closes and suspends files, if there are not enough filehandles available. 

\subsection{Function Documentation}
\hypertarget{OTF__FileManager_8h_ad5b6484cdb5feebf744aa7c9a9c47cc7}{\index{O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}!O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Count@{O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Count}}
\index{O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Count@{O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Count}!O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}}
\subsubsection[{O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Count}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Count (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+File\+Manager} $\ast$}]{m}
\end{DoxyParamCaption}
)}}\label{OTF__FileManager_8h_ad5b6484cdb5feebf744aa7c9a9c47cc7}


Returns the number of files currently open. 



References struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager\+::count.

\hypertarget{OTF__FileManager_8h_af26e9915d6ecc737e91f8cc839e130e8}{\index{O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}!O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Number@{O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Number}}
\index{O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Number@{O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Number}!O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}}
\subsubsection[{O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Number}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t O\+T\+F\+\_\+\+File\+Manager\+\_\+get\+Number (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+File\+Manager} $\ast$}]{m}
\end{DoxyParamCaption}
)}}\label{OTF__FileManager_8h_af26e9915d6ecc737e91f8cc839e130e8}


Returns the numbner of files allowed to be open simultaneously. 



References struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager\+::number.

\hypertarget{OTF__FileManager_8h_aaff5dc44c4418a0f7b0006bccc71fca7}{\index{O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}!O\+T\+F\+\_\+\+File\+Manager\+\_\+guarantee\+File@{O\+T\+F\+\_\+\+File\+Manager\+\_\+guarantee\+File}}
\index{O\+T\+F\+\_\+\+File\+Manager\+\_\+guarantee\+File@{O\+T\+F\+\_\+\+File\+Manager\+\_\+guarantee\+File}!O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}}
\subsubsection[{O\+T\+F\+\_\+\+File\+Manager\+\_\+guarantee\+File}]{\setlength{\rightskip}{0pt plus 5cm}int O\+T\+F\+\_\+\+File\+Manager\+\_\+guarantee\+File (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+File\+Manager} $\ast$}]{m}
\end{DoxyParamCaption}
)}}\label{OTF__FileManager_8h_aaff5dc44c4418a0f7b0006bccc71fca7}


Ensure there is a free file handle available after this call. 

return 1 on success, 0 otherwise (which is not supposed to happen)

Ensure there is a free file handle available after this call.

return 1 on success, 0 otherwise (which is not supposed to happen) 

References struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager\+::count, struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager\+::list, struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager\+::number, and O\+T\+F\+\_\+\+File\+Manager\+\_\+suspend\+File().



Referenced by O\+T\+F\+\_\+\+File\+\_\+revive().

\hypertarget{OTF__FileManager_8h_ab9d7f51e4aabbbb1a06910a3d4f60014}{\index{O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}!O\+T\+F\+\_\+\+File\+Manager\+\_\+register\+File@{O\+T\+F\+\_\+\+File\+Manager\+\_\+register\+File}}
\index{O\+T\+F\+\_\+\+File\+Manager\+\_\+register\+File@{O\+T\+F\+\_\+\+File\+Manager\+\_\+register\+File}!O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}}
\subsubsection[{O\+T\+F\+\_\+\+File\+Manager\+\_\+register\+File}]{\setlength{\rightskip}{0pt plus 5cm}int O\+T\+F\+\_\+\+File\+Manager\+\_\+register\+File (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+File\+Manager} $\ast$}]{m, }
\item[{{\bf O\+T\+F\+\_\+\+File} $\ast$}]{file}
\end{DoxyParamCaption}
)}}\label{OTF__FileManager_8h_ab9d7f51e4aabbbb1a06910a3d4f60014}


Registers the 'file' as open. 

Return 1 on success, 0 otherwise.

Registers the 'file' as open.

return 1 on success, 0 otherwise. 

References struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager\+::count, struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager\+::list, struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager\+::number, and O\+T\+F\+\_\+\+File\+\_\+status().



Referenced by O\+T\+F\+\_\+\+File\+\_\+revive().

\hypertarget{OTF__FileManager_8h_ae00d596d36240d58aef6f894c6a38565}{\index{O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}!O\+T\+F\+\_\+\+File\+Manager\+\_\+set\+Number@{O\+T\+F\+\_\+\+File\+Manager\+\_\+set\+Number}}
\index{O\+T\+F\+\_\+\+File\+Manager\+\_\+set\+Number@{O\+T\+F\+\_\+\+File\+Manager\+\_\+set\+Number}!O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}}
\subsubsection[{O\+T\+F\+\_\+\+File\+Manager\+\_\+set\+Number}]{\setlength{\rightskip}{0pt plus 5cm}uint32\+\_\+t O\+T\+F\+\_\+\+File\+Manager\+\_\+set\+Number (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+File\+Manager} $\ast$}]{m, }
\item[{uint32\+\_\+t}]{number}
\end{DoxyParamCaption}
)}}\label{OTF__FileManager_8h_ae00d596d36240d58aef6f894c6a38565}


Sets the number of files allowed to be open simultaneously. 



References struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager\+::number.



Referenced by O\+T\+F\+\_\+\+File\+Manager\+\_\+open().

\hypertarget{OTF__FileManager_8h_af87b135440167bdcd6cb8bd40b1ae348}{\index{O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}!O\+T\+F\+\_\+\+File\+Manager\+\_\+suspend\+File@{O\+T\+F\+\_\+\+File\+Manager\+\_\+suspend\+File}}
\index{O\+T\+F\+\_\+\+File\+Manager\+\_\+suspend\+File@{O\+T\+F\+\_\+\+File\+Manager\+\_\+suspend\+File}!O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}}
\subsubsection[{O\+T\+F\+\_\+\+File\+Manager\+\_\+suspend\+File}]{\setlength{\rightskip}{0pt plus 5cm}int O\+T\+F\+\_\+\+File\+Manager\+\_\+suspend\+File (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+File\+Manager} $\ast$}]{m, }
\item[{{\bf O\+T\+F\+\_\+\+File} $\ast$}]{file}
\end{DoxyParamCaption}
)}}\label{OTF__FileManager_8h_af87b135440167bdcd6cb8bd40b1ae348}


Suspend an open file explicitly. 

this may be called externaly or internally. Return 1 on success, 0 otherwise.

Suspend an open file explicitly.

this may be called externaly or internally. return 1 on success, 0 otherwise. 

References struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager\+::count, struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager\+::list, O\+T\+F\+\_\+\+File\+\_\+status(), and O\+T\+F\+\_\+\+File\+\_\+suspend().



Referenced by O\+T\+F\+\_\+\+File\+\_\+close(), and O\+T\+F\+\_\+\+File\+Manager\+\_\+guarantee\+File().

\hypertarget{OTF__FileManager_8h_a9b62063ddcf6962c6f348d91c91559fd}{\index{O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}!O\+T\+F\+\_\+\+File\+Manager\+\_\+touch\+File@{O\+T\+F\+\_\+\+File\+Manager\+\_\+touch\+File}}
\index{O\+T\+F\+\_\+\+File\+Manager\+\_\+touch\+File@{O\+T\+F\+\_\+\+File\+Manager\+\_\+touch\+File}!O\+T\+F\+\_\+\+File\+Manager.\+h@{O\+T\+F\+\_\+\+File\+Manager.\+h}}
\subsubsection[{O\+T\+F\+\_\+\+File\+Manager\+\_\+touch\+File}]{\setlength{\rightskip}{0pt plus 5cm}int O\+T\+F\+\_\+\+File\+Manager\+\_\+touch\+File (
\begin{DoxyParamCaption}
\item[{{\bf O\+T\+F\+\_\+\+File\+Manager} $\ast$}]{m, }
\item[{{\bf O\+T\+F\+\_\+\+File} $\ast$}]{file}
\end{DoxyParamCaption}
)}}\label{OTF__FileManager_8h_a9b62063ddcf6962c6f348d91c91559fd}


Marks currently opened 'file' as used which is important for the scheduling strategy, i.\+e. 

the internal decision which file to suspend next. return 1 on success or 0 for an suspended file.

Marks currently opened 'file' as used which is important for the scheduling strategy, i.\+e.

the internal decision which file to suspend next. return 1 on success or 0 for an suspended file. 

References struct\+\_\+\+O\+T\+F\+\_\+\+File\+Manager\+::list, and O\+T\+F\+\_\+\+File\+\_\+status().



Referenced by O\+T\+F\+\_\+\+File\+\_\+revive().

