\hypertarget{group__lockssynchronisation}{}\doxysection{SVM synchronisation locks}
\label{group__lockssynchronisation}\index{SVM synchronisation locks@{SVM synchronisation locks}}


This module contains API functions to handle SVM synchronisation locks.  


\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga9e838c51ce283318b8730f828a77fa58}{SVM\+\_\+\+Lock}} \mbox{\hyperlink{group__lockssynchronisation_ga549ff0ec04049e7ed8363a606506717f}{svm\+\_\+lock\+\_\+new}} (const void $\ast$svm)
\begin{DoxyCompactList}\small\item\em This function creates a lock. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga3ac4056beee2ad9fce9f459ae749f5b0}{SVM\+\_\+\+Lock\+Guard\+\_\+\+Read}} \mbox{\hyperlink{group__lockssynchronisation_ga2da66e1c3e1d5fe1401d3ee000cdd918}{svm\+\_\+lock\+\_\+readguard\+\_\+new}} (const void $\ast$svm, const \mbox{\hyperlink{group__api__types_ga9e838c51ce283318b8730f828a77fa58}{SVM\+\_\+\+Lock}} lock, const \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} soft)
\begin{DoxyCompactList}\small\item\em This function locks a lock for read access. \end{DoxyCompactList}\item 
\mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_gae7ef77b583070e4e157c7ba5a36dd51e}{SVM\+\_\+\+Lock\+Guard\+\_\+\+Write}} \mbox{\hyperlink{group__lockssynchronisation_ga265ccd38f6ff80807c596b91d63f82bb}{svm\+\_\+lock\+\_\+writeguard\+\_\+new}} (const void $\ast$svm, const \mbox{\hyperlink{group__api__types_ga9e838c51ce283318b8730f828a77fa58}{SVM\+\_\+\+Lock}} lock, const \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}} soft)
\begin{DoxyCompactList}\small\item\em This function locks a lock for write access. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
This module contains API functions to handle SVM synchronisation locks. 



\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__lockssynchronisation_ga549ff0ec04049e7ed8363a606506717f}\label{group__lockssynchronisation_ga549ff0ec04049e7ed8363a606506717f}} 
\index{SVM synchronisation locks@{SVM synchronisation locks}!svm\_lock\_new@{svm\_lock\_new}}
\index{svm\_lock\_new@{svm\_lock\_new}!SVM synchronisation locks@{SVM synchronisation locks}}
\doxysubsubsection{\texorpdfstring{svm\_lock\_new()}{svm\_lock\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga9e838c51ce283318b8730f828a77fa58}{SVM\+\_\+\+Lock}} svm\+\_\+lock\+\_\+new (\begin{DoxyParamCaption}\item[{const void $\ast$}]{svm }\end{DoxyParamCaption})}



This function creates a lock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em svm} & The SVM pointer passed as first argument of the callback function.\\
\hline
\end{DoxyParams}
This lock supports the mutual exclusion of one writer and several concurent readers.

\begin{DoxyNote}{Note}
The lock will be kept alive while either a variable or a read lock guard or a write lock guard exists on this lock.
\end{DoxyNote}
\begin{DoxyReturn}{Returns}
The lock. This lock can be acquired by the API functions svm\+\_\+lock\+\_\+readguard\+\_\+new and svm\+\_\+lock\+\_\+writeguard\+\_\+new.
\end{DoxyReturn}

\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.)\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__lockssynchronisation_ga2da66e1c3e1d5fe1401d3ee000cdd918}{svm\+\_\+lock\+\_\+readguard\+\_\+new}} 

\mbox{\hyperlink{group__lockssynchronisation_ga265ccd38f6ff80807c596b91d63f82bb}{svm\+\_\+lock\+\_\+writeguard\+\_\+new}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__lockssynchronisation_ga2da66e1c3e1d5fe1401d3ee000cdd918}\label{group__lockssynchronisation_ga2da66e1c3e1d5fe1401d3ee000cdd918}} 
\index{SVM synchronisation locks@{SVM synchronisation locks}!svm\_lock\_readguard\_new@{svm\_lock\_readguard\_new}}
\index{svm\_lock\_readguard\_new@{svm\_lock\_readguard\_new}!SVM synchronisation locks@{SVM synchronisation locks}}
\doxysubsubsection{\texorpdfstring{svm\_lock\_readguard\_new()}{svm\_lock\_readguard\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_ga3ac4056beee2ad9fce9f459ae749f5b0}{SVM\+\_\+\+Lock\+Guard\+\_\+\+Read}} svm\+\_\+lock\+\_\+readguard\+\_\+new (\begin{DoxyParamCaption}\item[{const void $\ast$}]{svm,  }\item[{const \mbox{\hyperlink{group__api__types_ga9e838c51ce283318b8730f828a77fa58}{SVM\+\_\+\+Lock}}}]{lock,  }\item[{const \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}}}]{soft }\end{DoxyParamCaption})}



This function locks a lock for read access. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em svm} & The SVM pointer passed as first argument of the callback function. \\
\hline
\mbox{\texttt{ in}}  & {\em lock} & The lock to acquire. \\
\hline
\mbox{\texttt{ in}}  & {\em soft} & The process is put in pause while waiting for the lock acquisition.\\
\hline
\end{DoxyParams}
The lock is acquired for read access until the returned lock guard is freed/deleted. Please refer to the svm\+\_\+variable\+\_\+delete API function.

\begin{DoxyReturn}{Returns}
A read lock guard on the acquired lock.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
The soft parameter shall be set to FALSE when the lock is used at least once inside a scheduler, and should be set to TRUE otherwise.
\end{DoxyNote}

\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.) \\
\hline
{\em FAILURE} & interruption when this API function is called outside a kernel. \\
\hline
{\em FAILURE} & interruption when this API function is called outside a waiting instruction.\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__variables_ga5dba265f37ba41add5a7ffd7dfdb3243}{svm\+\_\+variable\+\_\+delete}} 

\mbox{\hyperlink{group__getkernels_gad6a03dbf0dd283278cdc4bbc2266efa5}{svm\+\_\+kernel\+\_\+get\+\_\+current}} 

\mbox{\hyperlink{group__lockssynchronisation_ga549ff0ec04049e7ed8363a606506717f}{svm\+\_\+lock\+\_\+new}} 
\end{DoxySeeAlso}
\mbox{\Hypertarget{group__lockssynchronisation_ga265ccd38f6ff80807c596b91d63f82bb}\label{group__lockssynchronisation_ga265ccd38f6ff80807c596b91d63f82bb}} 
\index{SVM synchronisation locks@{SVM synchronisation locks}!svm\_lock\_writeguard\_new@{svm\_lock\_writeguard\_new}}
\index{svm\_lock\_writeguard\_new@{svm\_lock\_writeguard\_new}!SVM synchronisation locks@{SVM synchronisation locks}}
\doxysubsubsection{\texorpdfstring{svm\_lock\_writeguard\_new()}{svm\_lock\_writeguard\_new()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group__apimacros_ga0d0dae93534c2ba22499a92705a4e391}{SVM\+\_\+\+FUNCTION}} \mbox{\hyperlink{group__api__types_gae7ef77b583070e4e157c7ba5a36dd51e}{SVM\+\_\+\+Lock\+Guard\+\_\+\+Write}} svm\+\_\+lock\+\_\+writeguard\+\_\+new (\begin{DoxyParamCaption}\item[{const void $\ast$}]{svm,  }\item[{const \mbox{\hyperlink{group__api__types_ga9e838c51ce283318b8730f828a77fa58}{SVM\+\_\+\+Lock}}}]{lock,  }\item[{const \mbox{\hyperlink{group__api__types_ga872facc2eea0e7296e689134f568b804}{SVM\+\_\+\+Boolean}}}]{soft }\end{DoxyParamCaption})}



This function locks a lock for write access. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em svm} & The SVM pointer passed as first argument of the callback function. \\
\hline
\mbox{\texttt{ in}}  & {\em lock} & The lock to acquire. \\
\hline
\mbox{\texttt{ in}}  & {\em soft} & The process is put in pause while waiting for the lock acquisition.\\
\hline
\end{DoxyParams}
The lock is acquired for write access until the returned lock guard is freed/deleted. Please refer to the svm\+\_\+variable\+\_\+delete API function.

\begin{DoxyReturn}{Returns}
A write lock guard on the acquired lock.
\end{DoxyReturn}
\begin{DoxyNote}{Note}
The soft parameter shall be set to FALSE when the lock is used at least once inside a scheduler, and should be set to TRUE otherwise.
\end{DoxyNote}

\begin{DoxyExceptions}{Exceptions}
{\em FAILURE} & interruption when a parameter is incorrect. (Please refer to the main description page of this API.) \\
\hline
{\em FAILURE} & interruption when this API function is called outside a kernel. \\
\hline
{\em FAILURE} & interruption when this API function is called outside a waiting instruction.\\
\hline
\end{DoxyExceptions}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{group__variables_ga5dba265f37ba41add5a7ffd7dfdb3243}{svm\+\_\+variable\+\_\+delete}} 

\mbox{\hyperlink{group__getkernels_gad6a03dbf0dd283278cdc4bbc2266efa5}{svm\+\_\+kernel\+\_\+get\+\_\+current}} 

\mbox{\hyperlink{group__lockssynchronisation_ga549ff0ec04049e7ed8363a606506717f}{svm\+\_\+lock\+\_\+new}} 
\end{DoxySeeAlso}
