\hypertarget{mmal__vc__shm_8h}{}\section{/\+Volumes/\+W\+O\+R\+K\+\_\+\+I\+N\+\_\+\+P\+R\+O\+G\+R\+E\+S\+S/\+R\+A\+S\+P\+B\+E\+R\+R\+Y\+\_\+\+P\+I/github/firmware-\/master/opt/vc/include/interface/mmal/vc/mmal\+\_\+vc\+\_\+shm.h File Reference}
\label{mmal__vc__shm_8h}\index{/\+Volumes/\+W\+O\+R\+K\+\_\+\+I\+N\+\_\+\+P\+R\+O\+G\+R\+E\+S\+S/\+R\+A\+S\+P\+B\+E\+R\+R\+Y\+\_\+\+P\+I/github/firmware-\/master/opt/vc/include/interface/mmal/vc/mmal\+\_\+vc\+\_\+shm.\+h@{/\+Volumes/\+W\+O\+R\+K\+\_\+\+I\+N\+\_\+\+P\+R\+O\+G\+R\+E\+S\+S/\+R\+A\+S\+P\+B\+E\+R\+R\+Y\+\_\+\+P\+I/github/firmware-\/master/opt/vc/include/interface/mmal/vc/mmal\+\_\+vc\+\_\+shm.\+h}}
{\ttfamily \#include \char`\"{}mmal\+\_\+types.\+h\char`\"{}}\\*
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{group___mmal_types_ga5ac87230bd615d2b154a9d5899bc37fd}{M\+M\+A\+L\+\_\+\+S\+T\+A\+T\+U\+S\+\_\+\+T} \hyperlink{mmal__vc__shm_8h_adfef9115e25400f3311e7b71165a8c31}{mmal\+\_\+vc\+\_\+shm\+\_\+init} (void)
\item 
uint8\+\_\+t $\ast$ \hyperlink{mmal__vc__shm_8h_a8ba411decddcf1a1681b0a6589c0013a}{mmal\+\_\+vc\+\_\+shm\+\_\+alloc} (uint32\+\_\+t size)
\item 
\hyperlink{group___mmal_types_ga5ac87230bd615d2b154a9d5899bc37fd}{M\+M\+A\+L\+\_\+\+S\+T\+A\+T\+U\+S\+\_\+\+T} \hyperlink{mmal__vc__shm_8h_ae592d8505310fc480ae665e0dedb1154}{mmal\+\_\+vc\+\_\+shm\+\_\+free} (uint8\+\_\+t $\ast$mem)
\item 
uint8\+\_\+t $\ast$ \hyperlink{mmal__vc__shm_8h_afe29c8a7b09da7e25d8cbb8968a79264}{mmal\+\_\+vc\+\_\+shm\+\_\+lock} (uint8\+\_\+t $\ast$mem, uint32\+\_\+t workaround)
\item 
uint8\+\_\+t $\ast$ \hyperlink{mmal__vc__shm_8h_ae244b0c3c670fdd53c0bdeecc0b80edc}{mmal\+\_\+vc\+\_\+shm\+\_\+unlock} (uint8\+\_\+t $\ast$mem, uint32\+\_\+t $\ast$length, uint32\+\_\+t workaround)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Abstraction layer for M\+M\+A\+L V\+C shared memory. This A\+P\+I is only used by the M\+M\+A\+L V\+C component. 

\subsection{Function Documentation}
\hypertarget{mmal__vc__shm_8h_a8ba411decddcf1a1681b0a6589c0013a}{}\index{mmal\+\_\+vc\+\_\+shm.\+h@{mmal\+\_\+vc\+\_\+shm.\+h}!mmal\+\_\+vc\+\_\+shm\+\_\+alloc@{mmal\+\_\+vc\+\_\+shm\+\_\+alloc}}
\index{mmal\+\_\+vc\+\_\+shm\+\_\+alloc@{mmal\+\_\+vc\+\_\+shm\+\_\+alloc}!mmal\+\_\+vc\+\_\+shm.\+h@{mmal\+\_\+vc\+\_\+shm.\+h}}
\subsubsection[{mmal\+\_\+vc\+\_\+shm\+\_\+alloc}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t$\ast$ mmal\+\_\+vc\+\_\+shm\+\_\+alloc (
\begin{DoxyParamCaption}
\item[{uint32\+\_\+t}]{size}
\end{DoxyParamCaption}
)}\label{mmal__vc__shm_8h_a8ba411decddcf1a1681b0a6589c0013a}
Allocate a shared memory buffer \hypertarget{mmal__vc__shm_8h_ae592d8505310fc480ae665e0dedb1154}{}\index{mmal\+\_\+vc\+\_\+shm.\+h@{mmal\+\_\+vc\+\_\+shm.\+h}!mmal\+\_\+vc\+\_\+shm\+\_\+free@{mmal\+\_\+vc\+\_\+shm\+\_\+free}}
\index{mmal\+\_\+vc\+\_\+shm\+\_\+free@{mmal\+\_\+vc\+\_\+shm\+\_\+free}!mmal\+\_\+vc\+\_\+shm.\+h@{mmal\+\_\+vc\+\_\+shm.\+h}}
\subsubsection[{mmal\+\_\+vc\+\_\+shm\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+M\+A\+L\+\_\+\+S\+T\+A\+T\+U\+S\+\_\+\+T} mmal\+\_\+vc\+\_\+shm\+\_\+free (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{mem}
\end{DoxyParamCaption}
)}\label{mmal__vc__shm_8h_ae592d8505310fc480ae665e0dedb1154}
Free a shared memory buffer \hypertarget{mmal__vc__shm_8h_adfef9115e25400f3311e7b71165a8c31}{}\index{mmal\+\_\+vc\+\_\+shm.\+h@{mmal\+\_\+vc\+\_\+shm.\+h}!mmal\+\_\+vc\+\_\+shm\+\_\+init@{mmal\+\_\+vc\+\_\+shm\+\_\+init}}
\index{mmal\+\_\+vc\+\_\+shm\+\_\+init@{mmal\+\_\+vc\+\_\+shm\+\_\+init}!mmal\+\_\+vc\+\_\+shm.\+h@{mmal\+\_\+vc\+\_\+shm.\+h}}
\subsubsection[{mmal\+\_\+vc\+\_\+shm\+\_\+init}]{\setlength{\rightskip}{0pt plus 5cm}{\bf M\+M\+A\+L\+\_\+\+S\+T\+A\+T\+U\+S\+\_\+\+T} mmal\+\_\+vc\+\_\+shm\+\_\+init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}\label{mmal__vc__shm_8h_adfef9115e25400f3311e7b71165a8c31}
Initialise the shared memory system \hypertarget{mmal__vc__shm_8h_afe29c8a7b09da7e25d8cbb8968a79264}{}\index{mmal\+\_\+vc\+\_\+shm.\+h@{mmal\+\_\+vc\+\_\+shm.\+h}!mmal\+\_\+vc\+\_\+shm\+\_\+lock@{mmal\+\_\+vc\+\_\+shm\+\_\+lock}}
\index{mmal\+\_\+vc\+\_\+shm\+\_\+lock@{mmal\+\_\+vc\+\_\+shm\+\_\+lock}!mmal\+\_\+vc\+\_\+shm.\+h@{mmal\+\_\+vc\+\_\+shm.\+h}}
\subsubsection[{mmal\+\_\+vc\+\_\+shm\+\_\+lock}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t$\ast$ mmal\+\_\+vc\+\_\+shm\+\_\+lock (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{mem, }
\item[{uint32\+\_\+t}]{workaround}
\end{DoxyParamCaption}
)}\label{mmal__vc__shm_8h_afe29c8a7b09da7e25d8cbb8968a79264}
Lock a shared memory buffer \hypertarget{mmal__vc__shm_8h_ae244b0c3c670fdd53c0bdeecc0b80edc}{}\index{mmal\+\_\+vc\+\_\+shm.\+h@{mmal\+\_\+vc\+\_\+shm.\+h}!mmal\+\_\+vc\+\_\+shm\+\_\+unlock@{mmal\+\_\+vc\+\_\+shm\+\_\+unlock}}
\index{mmal\+\_\+vc\+\_\+shm\+\_\+unlock@{mmal\+\_\+vc\+\_\+shm\+\_\+unlock}!mmal\+\_\+vc\+\_\+shm.\+h@{mmal\+\_\+vc\+\_\+shm.\+h}}
\subsubsection[{mmal\+\_\+vc\+\_\+shm\+\_\+unlock}]{\setlength{\rightskip}{0pt plus 5cm}uint8\+\_\+t$\ast$ mmal\+\_\+vc\+\_\+shm\+\_\+unlock (
\begin{DoxyParamCaption}
\item[{uint8\+\_\+t $\ast$}]{mem, }
\item[{uint32\+\_\+t $\ast$}]{length, }
\item[{uint32\+\_\+t}]{workaround}
\end{DoxyParamCaption}
)}\label{mmal__vc__shm_8h_ae244b0c3c670fdd53c0bdeecc0b80edc}
Unlock a shared memory buffer 