\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/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/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/firmware-\/master/opt/vc/include/interface/mmal/vc/mmal\+\_\+vc\+\_\+shm.\+h}}
{\ttfamily \#include \char`\"{}mmal\+\_\+types.\+h\char`\"{}}\newline
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{group___mmal_types_ga5ac87230bd615d2b154a9d5899bc37fd}{M\+M\+A\+L\+\_\+\+S\+T\+A\+T\+U\+S\+\_\+T}} \mbox{\hyperlink{mmal__vc__shm_8h_adfef9115e25400f3311e7b71165a8c31}{mmal\+\_\+vc\+\_\+shm\+\_\+init}} (void)
\item 
uint8\+\_\+t $\ast$ \mbox{\hyperlink{mmal__vc__shm_8h_a8ba411decddcf1a1681b0a6589c0013a}{mmal\+\_\+vc\+\_\+shm\+\_\+alloc}} (uint32\+\_\+t size)
\item 
\mbox{\hyperlink{group___mmal_types_ga5ac87230bd615d2b154a9d5899bc37fd}{M\+M\+A\+L\+\_\+\+S\+T\+A\+T\+U\+S\+\_\+T}} \mbox{\hyperlink{mmal__vc__shm_8h_ae592d8505310fc480ae665e0dedb1154}{mmal\+\_\+vc\+\_\+shm\+\_\+free}} (uint8\+\_\+t $\ast$mem)
\item 
uint8\+\_\+t $\ast$ \mbox{\hyperlink{mmal__vc__shm_8h_afe29c8a7b09da7e25d8cbb8968a79264}{mmal\+\_\+vc\+\_\+shm\+\_\+lock}} (uint8\+\_\+t $\ast$mem, uint32\+\_\+t workaround)
\item 
uint8\+\_\+t $\ast$ \mbox{\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\+AL VC shared memory. This A\+PI is only used by the M\+M\+AL VC component. 

\subsection{Function Documentation}
\mbox{\Hypertarget{mmal__vc__shm_8h_a8ba411decddcf1a1681b0a6589c0013a}\label{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{\texorpdfstring{mmal\+\_\+vc\+\_\+shm\+\_\+alloc()}{mmal\_vc\_shm\_alloc()}}
{\footnotesize\ttfamily uint8\+\_\+t$\ast$ mmal\+\_\+vc\+\_\+shm\+\_\+alloc (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{size }\end{DoxyParamCaption})}

Allocate a shared memory buffer \mbox{\Hypertarget{mmal__vc__shm_8h_ae592d8505310fc480ae665e0dedb1154}\label{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{\texorpdfstring{mmal\+\_\+vc\+\_\+shm\+\_\+free()}{mmal\_vc\_shm\_free()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group___mmal_types_ga5ac87230bd615d2b154a9d5899bc37fd}{M\+M\+A\+L\+\_\+\+S\+T\+A\+T\+U\+S\+\_\+T}} mmal\+\_\+vc\+\_\+shm\+\_\+free (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{mem }\end{DoxyParamCaption})}

Free a shared memory buffer \mbox{\Hypertarget{mmal__vc__shm_8h_adfef9115e25400f3311e7b71165a8c31}\label{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{\texorpdfstring{mmal\+\_\+vc\+\_\+shm\+\_\+init()}{mmal\_vc\_shm\_init()}}
{\footnotesize\ttfamily \mbox{\hyperlink{group___mmal_types_ga5ac87230bd615d2b154a9d5899bc37fd}{M\+M\+A\+L\+\_\+\+S\+T\+A\+T\+U\+S\+\_\+T}} mmal\+\_\+vc\+\_\+shm\+\_\+init (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}

Initialise the shared memory system \mbox{\Hypertarget{mmal__vc__shm_8h_afe29c8a7b09da7e25d8cbb8968a79264}\label{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{\texorpdfstring{mmal\+\_\+vc\+\_\+shm\+\_\+lock()}{mmal\_vc\_shm\_lock()}}
{\footnotesize\ttfamily uint8\+\_\+t$\ast$ mmal\+\_\+vc\+\_\+shm\+\_\+lock (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{mem,  }\item[{uint32\+\_\+t}]{workaround }\end{DoxyParamCaption})}

Lock a shared memory buffer \mbox{\Hypertarget{mmal__vc__shm_8h_ae244b0c3c670fdd53c0bdeecc0b80edc}\label{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{\texorpdfstring{mmal\+\_\+vc\+\_\+shm\+\_\+unlock()}{mmal\_vc\_shm\_unlock()}}
{\footnotesize\ttfamily 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})}

Unlock a shared memory buffer 