\hypertarget{group__Eina__Lock__Group}{\section{Lock}
\label{group__Eina__Lock__Group}\index{Lock@{Lock}}
}


This group provides thread locking and synchronization capabilities.  


\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{group__Eina__Lock__Group_ga2974eb3f18404edcc375910cc7e4859c}{E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+A\+L}(val)
\begin{DoxyCompactList}\small\item\em The macro doesn't do anything unless {\ttfamily E\+I\+N\+A\+\_\+\+H\+A\+V\+E\+\_\+\+D\+E\+B\+U\+G\+\_\+\+T\+H\+R\+E\+A\+D\+S} is defined. \end{DoxyCompactList}\item 
\hypertarget{group__Eina__Lock__Group_ga6900a2b986f5536b73210e2560675cb0}{\#define \hyperlink{group__Eina__Lock__Group_ga6900a2b986f5536b73210e2560675cb0}{E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+R\+N}}\label{group__Eina__Lock__Group_ga6900a2b986f5536b73210e2560675cb0}

\begin{DoxyCompactList}\small\item\em The macro doesn't do anything unless {\ttfamily E\+I\+N\+A\+\_\+\+H\+A\+V\+E\+\_\+\+D\+E\+B\+U\+G\+\_\+\+T\+H\+R\+E\+A\+D\+S} is defined. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Lock__Group_ga79d3a828f7f6961d86aac2d574a156b2}{typedef void($\ast$ \hyperlink{group__Eina__Lock__Group_ga79d3a828f7f6961d86aac2d574a156b2}{Eina\+\_\+\+T\+L\+S\+\_\+\+Delete\+\_\+\+Cb} )(void $\ast$ptr)}\label{group__Eina__Lock__Group_ga79d3a828f7f6961d86aac2d574a156b2}

\begin{DoxyCompactList}\small\item\em A callback type for deallocation of thread level sotrage data. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{group__Eina__Lock__Group_gacba5cc92b99189a86e3620c92836e729}{Eina\+\_\+\+Lock\+\_\+\+Result} \{ \\*
\hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a8b4d357ca18a463b01f789b24c8eb3b9}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L} = E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E, 
\\*
\hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D} = E\+I\+N\+A\+\_\+\+T\+R\+U\+E, 
\\*
\hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a42ea61e3245e1b9f1db5ea63615e6e67}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+D\+E\+A\+D\+L\+O\+C\+K}
 \}
\begin{DoxyCompactList}\small\item\em Return codes for lock operations. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_ga8dda398c1db315582a80640c7f78f648}{eina\+\_\+lock\+\_\+new} (Eina\+\_\+\+Lock $\ast$mutex)
\begin{DoxyCompactList}\small\item\em Initializes a new \#\+Eina\+\_\+\+Lock. \end{DoxyCompactList}\item 
static void \hyperlink{group__Eina__Lock__Group_gaf8d1c4e3aff3bd26fc85d81ed8c4e71a}{eina\+\_\+lock\+\_\+free} (Eina\+\_\+\+Lock $\ast$mutex)
\begin{DoxyCompactList}\small\item\em Deallocates an \#\+Eina\+\_\+\+Lock. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Lock__Group_gacba5cc92b99189a86e3620c92836e729}{Eina\+\_\+\+Lock\+\_\+\+Result} \hyperlink{group__Eina__Lock__Group_ga2ad27b83cf8562a41fe67557d8d2d753}{eina\+\_\+lock\+\_\+take} (Eina\+\_\+\+Lock $\ast$mutex)
\begin{DoxyCompactList}\small\item\em Attempts to take a lock. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Lock__Group_gacba5cc92b99189a86e3620c92836e729}{Eina\+\_\+\+Lock\+\_\+\+Result} \hyperlink{group__Eina__Lock__Group_ga13c8270c1589bfd4770ee4cd43977bc5}{eina\+\_\+lock\+\_\+take\+\_\+try} (Eina\+\_\+\+Lock $\ast$mutex)
\begin{DoxyCompactList}\small\item\em Attempts to take a lock if possible. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Lock__Group_gacba5cc92b99189a86e3620c92836e729}{Eina\+\_\+\+Lock\+\_\+\+Result} \hyperlink{group__Eina__Lock__Group_ga469476cfe8d8ca4dfdc46469fb9e31e5}{eina\+\_\+lock\+\_\+release} (Eina\+\_\+\+Lock $\ast$mutex)
\begin{DoxyCompactList}\small\item\em Releases a lock. \end{DoxyCompactList}\item 
static void \hyperlink{group__Eina__Lock__Group_gacaa58955efb147091249bf45610fdf6a}{eina\+\_\+lock\+\_\+debug} (const Eina\+\_\+\+Lock $\ast$mutex)
\begin{DoxyCompactList}\small\item\em Print debug information about a lock. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_gaab2b734db1cbdaffe79559f6716ac793}{eina\+\_\+condition\+\_\+new} (Eina\+\_\+\+Condition $\ast$cond, Eina\+\_\+\+Lock $\ast$mutex)
\begin{DoxyCompactList}\small\item\em Initializes a new condition variable. \end{DoxyCompactList}\item 
static void \hyperlink{group__Eina__Lock__Group_ga838e1e7dfc8bbf114634a7de67de8956}{eina\+\_\+condition\+\_\+free} (Eina\+\_\+\+Condition $\ast$cond)
\begin{DoxyCompactList}\small\item\em Deallocates a condition variable. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_ga149f387d5f18c469c365147ffbd4dc2c}{eina\+\_\+condition\+\_\+wait} (Eina\+\_\+\+Condition $\ast$cond)
\begin{DoxyCompactList}\small\item\em Causes a thread to wait until signaled by the condition. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_gaa9e6e29fffa21b4bef6f089655cf7982}{eina\+\_\+condition\+\_\+timedwait} (Eina\+\_\+\+Condition $\ast$cond, double t)
\begin{DoxyCompactList}\small\item\em Causes a thread to wait until signaled by the condition or a timeout is reached. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_ga26597941ef6777d759ad4934d3f1655e}{eina\+\_\+condition\+\_\+broadcast} (Eina\+\_\+\+Condition $\ast$cond)
\begin{DoxyCompactList}\small\item\em Signal all threads waiting for a condition. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_ga42cfdc4920e74fd7ba99527a6a99cd7d}{eina\+\_\+condition\+\_\+signal} (Eina\+\_\+\+Condition $\ast$cond)
\begin{DoxyCompactList}\small\item\em Signal a thread waiting for a condition. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_gafe7bfa849c19aa4738d1918219c2ebb5}{eina\+\_\+rwlock\+\_\+new} (Eina\+\_\+\+R\+W\+Lock $\ast$mutex)
\begin{DoxyCompactList}\small\item\em Initializes a new \#\+Eina\+\_\+\+R\+W\+Lock. \end{DoxyCompactList}\item 
static void \hyperlink{group__Eina__Lock__Group_gac0b244d4fec104f70a1a6157356c43f2}{eina\+\_\+rwlock\+\_\+free} (Eina\+\_\+\+R\+W\+Lock $\ast$mutex)
\begin{DoxyCompactList}\small\item\em Deallocates an \#\+Eina\+\_\+\+R\+W\+Lock. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Lock__Group_gacba5cc92b99189a86e3620c92836e729}{Eina\+\_\+\+Lock\+\_\+\+Result} \hyperlink{group__Eina__Lock__Group_ga4bfe2c4dabf66d02481e36168d409cd9}{eina\+\_\+rwlock\+\_\+take\+\_\+read} (Eina\+\_\+\+R\+W\+Lock $\ast$mutex)
\begin{DoxyCompactList}\small\item\em Attempts to take a read lock. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Lock__Group_gacba5cc92b99189a86e3620c92836e729}{Eina\+\_\+\+Lock\+\_\+\+Result} \hyperlink{group__Eina__Lock__Group_gae9fa682cffd225320e1c07fe644f034e}{eina\+\_\+rwlock\+\_\+take\+\_\+write} (Eina\+\_\+\+R\+W\+Lock $\ast$mutex)
\begin{DoxyCompactList}\small\item\em Attempts to take a write lock. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Lock__Group_gacba5cc92b99189a86e3620c92836e729}{Eina\+\_\+\+Lock\+\_\+\+Result} \hyperlink{group__Eina__Lock__Group_gab3d34ffb8950e66b820a4de5def7bcd4}{eina\+\_\+rwlock\+\_\+release} (Eina\+\_\+\+R\+W\+Lock $\ast$mutex)
\begin{DoxyCompactList}\small\item\em Releases a lock. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_ga300882739bb49270e52a62164a05276e}{eina\+\_\+tls\+\_\+new} (Eina\+\_\+\+T\+L\+S $\ast$key)
\begin{DoxyCompactList}\small\item\em Initializes a new \#\+Eina\+\_\+\+T\+L\+S, or thread level storage, to store thread specific data. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_gae128d753144bc09bdfc9e23b05f7ad90}{eina\+\_\+tls\+\_\+cb\+\_\+new} (Eina\+\_\+\+T\+L\+S $\ast$key, \hyperlink{group__Eina__Lock__Group_ga79d3a828f7f6961d86aac2d574a156b2}{Eina\+\_\+\+T\+L\+S\+\_\+\+Delete\+\_\+\+Cb} delete\+\_\+cb)
\begin{DoxyCompactList}\small\item\em Initializes a new \#\+Eina\+\_\+\+T\+L\+S, or thread level storage, to store thread specific data. \end{DoxyCompactList}\item 
static void \hyperlink{group__Eina__Lock__Group_ga6f9d5d1a0929b9cc5f1559fca41c9c1a}{eina\+\_\+tls\+\_\+free} (Eina\+\_\+\+T\+L\+S key)
\begin{DoxyCompactList}\small\item\em Frees an allocated \#\+Eina\+\_\+\+T\+L\+S. \end{DoxyCompactList}\item 
static void $\ast$ \hyperlink{group__Eina__Lock__Group_ga90d151fea86045136cefee074924f369}{eina\+\_\+tls\+\_\+get} (Eina\+\_\+\+T\+L\+S key)
\begin{DoxyCompactList}\small\item\em Gets the value in \#\+Eina\+\_\+\+T\+L\+S for this thread. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_gaf8c9890f52c058aa8cab1da3a109c26a}{eina\+\_\+tls\+\_\+set} (Eina\+\_\+\+T\+L\+S key, const void $\ast$data)
\begin{DoxyCompactList}\small\item\em Sets the value in Eina\+\_\+\+T\+L\+S for this thread. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_ga093fddb63d97504084f49dd36df65fd0}{eina\+\_\+semaphore\+\_\+new} (Eina\+\_\+\+Semaphore $\ast$sem, int count\+\_\+init)
\begin{DoxyCompactList}\small\item\em Initializes a new \#\+Eina\+\_\+\+Semaphore. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_ga3ed968965c79524a43f6efea20459d49}{eina\+\_\+semaphore\+\_\+free} (Eina\+\_\+\+Semaphore $\ast$sem)
\begin{DoxyCompactList}\small\item\em Frees an allocated \#\+Eina\+\_\+\+Semaphore. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_ga4b1a668ea5e49bb309f9b8c2b983b83c}{eina\+\_\+semaphore\+\_\+lock} (Eina\+\_\+\+Semaphore $\ast$sem)
\begin{DoxyCompactList}\small\item\em Gets a lock on an \#\+Eina\+\_\+\+Semaphore. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_gaf0b5612096cedc1d8a80d0fe43c42c43}{eina\+\_\+semaphore\+\_\+release} (Eina\+\_\+\+Semaphore $\ast$sem, int count\+\_\+release)
\begin{DoxyCompactList}\small\item\em Releases a lock on an \#\+Eina\+\_\+\+Semaphore. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_ga86dd1d3f5b8ae9ac27de7976910a5bb2}{eina\+\_\+barrier\+\_\+new} (Eina\+\_\+\+Barrier $\ast$barrier, int needed)
\begin{DoxyCompactList}\small\item\em Initializes a new \#\+Eina\+\_\+\+Barrier. \end{DoxyCompactList}\item 
static void \hyperlink{group__Eina__Lock__Group_gafe6f7125b084e0b54f3b43e9289b18a0}{eina\+\_\+barrier\+\_\+free} (Eina\+\_\+\+Barrier $\ast$barrier)
\begin{DoxyCompactList}\small\item\em Frees an allocated \#\+Eina\+\_\+\+Barrier. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_gab3a1febe7dc4e0a2f62270dc2602209e}{eina\+\_\+barrier\+\_\+wait} (Eina\+\_\+\+Barrier $\ast$barrier)
\begin{DoxyCompactList}\small\item\em Increments the count of threads that are waiting on {\ttfamily barrier}. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool} \hyperlink{group__Eina__Lock__Group_ga5f4b36220ae88623031cb0e9bf5de290}{eina\+\_\+spinlock\+\_\+new} (Eina\+\_\+\+Spinlock $\ast$spinlock)
\begin{DoxyCompactList}\small\item\em Initializes a new \#\+Eina\+\_\+\+Spinlock. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Lock__Group_gacba5cc92b99189a86e3620c92836e729}{Eina\+\_\+\+Lock\+\_\+\+Result} \hyperlink{group__Eina__Lock__Group_gaf9556624e5c6db1a66c20615c523efb5}{eina\+\_\+spinlock\+\_\+take} (Eina\+\_\+\+Spinlock $\ast$spinlock)
\begin{DoxyCompactList}\small\item\em Attempts to take a spinlock. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Lock__Group_gacba5cc92b99189a86e3620c92836e729}{Eina\+\_\+\+Lock\+\_\+\+Result} \hyperlink{group__Eina__Lock__Group_ga8e3592cdc708ac984f0caabc236d3f2e}{eina\+\_\+spinlock\+\_\+take\+\_\+try} (Eina\+\_\+\+Spinlock $\ast$spinlock)
\begin{DoxyCompactList}\small\item\em Attempts to take a spinlock if possible. \end{DoxyCompactList}\item 
static \hyperlink{group__Eina__Lock__Group_gacba5cc92b99189a86e3620c92836e729}{Eina\+\_\+\+Lock\+\_\+\+Result} \hyperlink{group__Eina__Lock__Group_ga7143ee35b9894e80578753485284256c}{eina\+\_\+spinlock\+\_\+release} (Eina\+\_\+\+Spinlock $\ast$spinlock)
\begin{DoxyCompactList}\small\item\em Releases a spinlock. \end{DoxyCompactList}\item 
static void \hyperlink{group__Eina__Lock__Group_gac2593032eadc7b1e03c0980f2dedb7ca}{eina\+\_\+spinlock\+\_\+free} (Eina\+\_\+\+Spinlock $\ast$spinlock)
\begin{DoxyCompactList}\small\item\em Deallocates an \#\+Eina\+\_\+\+Spinlock. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__Eina__Lock__Group_ga55d946144731464bd73ca2dd9c2381bc}{\hyperlink{group__Eina__Types__Group_ga3db3556eec8ef18cb8ddb43816974ac8}{E\+A\+P\+I} \hyperlink{group__Eina__Error__Group_ga95b3cbb33e987e7d92a81ea785001686}{Eina\+\_\+\+Error} \hyperlink{group__Eina__Lock__Group_ga55d946144731464bd73ca2dd9c2381bc}{E\+I\+N\+A\+\_\+\+E\+R\+R\+O\+R\+\_\+\+N\+O\+T\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P}}\label{group__Eina__Lock__Group_ga55d946144731464bd73ca2dd9c2381bc}

\begin{DoxyCompactList}\small\item\em A type definition for warning that a function was called from somewhere other than the E\+F\+L main loop. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
This group provides thread locking and synchronization capabilities. 

Similar to P\+O\+I\+S\+I\+X threads (pthreads), but it takes care of the platform specific details so you don't have to.

If you know how {\ttfamily pthreads} work, this library will look familiar to you. If you are not familiar with {\ttfamily pthreads}, a good overview is available \href{https://computing.llnl.gov/tutorials/pthreads/}{\tt here}

The Eina lock functions are grouped into several categories to handle different thread locking and sychronization methods\+: \begin{DoxyItemize}
\item eina\+\_\+lock\+\_\+$\ast$ -\/ Functions that implement locking. \item eina\+\_\+condition\+\_\+$\ast$ -\/ Functions that implement condition variables. \item eina\+\_\+rwlock\+\_\+$\ast$ -\/ Functions that implement read/write locks. \item eina\+\_\+tls\+\_\+$\ast$ -\/ Functions that implement thread level storage. \item eina\+\_\+semaphore\+\_\+$\ast$ -\/ Functions that implement semaphores. \item eina\+\_\+barrier\+\_\+$\ast$ -\/ Functions that implement barriers. \item eina\+\_\+spinlock\+\_\+$\ast$ -\/ Functions that implement spinlocks if they are available on the platform. If they are not available, these functuions degrade to plain locks. \end{DoxyItemize}


\subsection{Macro Definition Documentation}
\hypertarget{group__Eina__Lock__Group_ga2974eb3f18404edcc375910cc7e4859c}{\index{Lock@{Lock}!E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+A\+L@{E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+A\+L}}
\index{E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+A\+L@{E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+A\+L}!Lock@{Lock}}
\subsubsection[{E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+A\+L}]{\setlength{\rightskip}{0pt plus 5cm}\#define E\+I\+N\+A\+\_\+\+M\+A\+I\+N\+\_\+\+L\+O\+O\+P\+\_\+\+C\+H\+E\+C\+K\+\_\+\+R\+E\+T\+U\+R\+N\+\_\+\+V\+A\+L(
\begin{DoxyParamCaption}
\item[{}]{val}
\end{DoxyParamCaption}
)}}\label{group__Eina__Lock__Group_ga2974eb3f18404edcc375910cc7e4859c}


The macro doesn't do anything unless {\ttfamily E\+I\+N\+A\+\_\+\+H\+A\+V\+E\+\_\+\+D\+E\+B\+U\+G\+\_\+\+T\+H\+R\+E\+A\+D\+S} is defined. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em val} & The value to be returned \\
\hline
\end{DoxyParams}


Referenced by ecore\+\_\+animator\+\_\+del(), ecore\+\_\+animator\+\_\+frametime\+\_\+get(), ecore\+\_\+animator\+\_\+source\+\_\+get(), ecore\+\_\+event\+\_\+add(), ecore\+\_\+event\+\_\+current\+\_\+event\+\_\+get(), ecore\+\_\+event\+\_\+current\+\_\+type\+\_\+get(), ecore\+\_\+event\+\_\+del(), ecore\+\_\+event\+\_\+filter\+\_\+add(), ecore\+\_\+event\+\_\+filter\+\_\+del(), ecore\+\_\+event\+\_\+handler\+\_\+add(), ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+get(), ecore\+\_\+event\+\_\+handler\+\_\+data\+\_\+set(), ecore\+\_\+event\+\_\+handler\+\_\+del(), ecore\+\_\+event\+\_\+type\+\_\+new(), ecore\+\_\+exe\+\_\+cmd\+\_\+get(), ecore\+\_\+exe\+\_\+data\+\_\+get(), ecore\+\_\+exe\+\_\+data\+\_\+set(), ecore\+\_\+exe\+\_\+event\+\_\+data\+\_\+get(), ecore\+\_\+exe\+\_\+flags\+\_\+get(), ecore\+\_\+exe\+\_\+free(), ecore\+\_\+exe\+\_\+pid\+\_\+get(), ecore\+\_\+exe\+\_\+run(), ecore\+\_\+exe\+\_\+run\+\_\+priority\+\_\+get(), ecore\+\_\+exe\+\_\+send(), ecore\+\_\+exe\+\_\+tag\+\_\+get(), ecore\+\_\+idle\+\_\+enterer\+\_\+del(), ecore\+\_\+idle\+\_\+exiter\+\_\+del(), ecore\+\_\+idler\+\_\+del(), ecore\+\_\+job\+\_\+del(), ecore\+\_\+main\+\_\+fd\+\_\+handler\+\_\+active\+\_\+get(), ecore\+\_\+main\+\_\+fd\+\_\+handler\+\_\+add(), ecore\+\_\+main\+\_\+fd\+\_\+handler\+\_\+del(), ecore\+\_\+main\+\_\+fd\+\_\+handler\+\_\+fd\+\_\+get(), ecore\+\_\+main\+\_\+fd\+\_\+handler\+\_\+file\+\_\+add(), ecore\+\_\+main\+\_\+loop\+\_\+iterate\+\_\+may\+\_\+block(), ecore\+\_\+main\+\_\+loop\+\_\+select\+\_\+func\+\_\+get(), ecore\+\_\+pipe\+\_\+del(), ecore\+\_\+pipe\+\_\+full\+\_\+add(), ecore\+\_\+pipe\+\_\+read\+\_\+fd(), ecore\+\_\+pipe\+\_\+write\+\_\+fd(), ecore\+\_\+poller\+\_\+del(), ecore\+\_\+poller\+\_\+poll\+\_\+interval\+\_\+get(), ecore\+\_\+thread\+\_\+active\+\_\+get(), ecore\+\_\+thread\+\_\+feedback\+\_\+run(), ecore\+\_\+thread\+\_\+max\+\_\+get(), ecore\+\_\+thread\+\_\+pending\+\_\+feedback\+\_\+get(), ecore\+\_\+thread\+\_\+pending\+\_\+get(), ecore\+\_\+thread\+\_\+pending\+\_\+total\+\_\+get(), ecore\+\_\+thread\+\_\+run(), ecore\+\_\+throttle\+\_\+get(), ecore\+\_\+timer\+\_\+del(), ecore\+\_\+timer\+\_\+dump(), and ecore\+\_\+timer\+\_\+precision\+\_\+get().



\subsection{Enumeration Type Documentation}
\hypertarget{group__Eina__Lock__Group_gacba5cc92b99189a86e3620c92836e729}{\index{Lock@{Lock}!Eina\+\_\+\+Lock\+\_\+\+Result@{Eina\+\_\+\+Lock\+\_\+\+Result}}
\index{Eina\+\_\+\+Lock\+\_\+\+Result@{Eina\+\_\+\+Lock\+\_\+\+Result}!Lock@{Lock}}
\subsubsection[{Eina\+\_\+\+Lock\+\_\+\+Result}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Eina\+\_\+\+Lock\+\_\+\+Result}}}\label{group__Eina__Lock__Group_gacba5cc92b99189a86e3620c92836e729}


Return codes for lock operations. 

\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L@{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L}!Lock@{Lock}}\index{Lock@{Lock}!E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L@{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L}}\item[{\em 
\hypertarget{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a8b4d357ca18a463b01f789b24c8eb3b9}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L}\label{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a8b4d357ca18a463b01f789b24c8eb3b9}
}]Indicates that the lock operation failed. \index{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D@{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D}!Lock@{Lock}}\index{Lock@{Lock}!E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D@{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D}}\item[{\em 
\hypertarget{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D}\label{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}
}]Indicates that the lock operation succeeded. \index{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+D\+E\+A\+D\+L\+O\+C\+K@{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+D\+E\+A\+D\+L\+O\+C\+K}!Lock@{Lock}}\index{Lock@{Lock}!E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+D\+E\+A\+D\+L\+O\+C\+K@{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+D\+E\+A\+D\+L\+O\+C\+K}}\item[{\em 
\hypertarget{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a42ea61e3245e1b9f1db5ea63615e6e67}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+D\+E\+A\+D\+L\+O\+C\+K}\label{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a42ea61e3245e1b9f1db5ea63615e6e67}
}]Indicates that the lock is deadlocked. \end{description}
\end{Desc}


\subsection{Function Documentation}
\hypertarget{group__Eina__Lock__Group_ga8dda398c1db315582a80640c7f78f648}{\index{Lock@{Lock}!eina\+\_\+lock\+\_\+new@{eina\+\_\+lock\+\_\+new}}
\index{eina\+\_\+lock\+\_\+new@{eina\+\_\+lock\+\_\+new}!Lock@{Lock}}
\subsubsection[{eina\+\_\+lock\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+lock\+\_\+new (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Lock $\ast$}]{mutex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga8dda398c1db315582a80640c7f78f648}


Initializes a new \#\+Eina\+\_\+\+Lock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mutex} & The \#\+Eina\+\_\+\+Lock structure to be initialized \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise
\end{DoxyReturn}
This function initializes an \#\+Eina\+\_\+\+Lock with appropriate values. These values are platform dependent as is the structure of the \#\+Eina\+\_\+\+Lock itself.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_gaf8d1c4e3aff3bd26fc85d81ed8c4e71a}{eina\+\_\+lock\+\_\+free()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}.\end{Desc}


Referenced by ecore\+\_\+init(), ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync(), ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin(), eet\+\_\+init(), eina\+\_\+file\+\_\+open(), eina\+\_\+file\+\_\+virtualize(), eio\+\_\+init(), efl\+::eina\+::mutex\+::mutex(), and efl\+::eina\+::thread\+::thread().

\hypertarget{group__Eina__Lock__Group_gaf8d1c4e3aff3bd26fc85d81ed8c4e71a}{\index{Lock@{Lock}!eina\+\_\+lock\+\_\+free@{eina\+\_\+lock\+\_\+free}}
\index{eina\+\_\+lock\+\_\+free@{eina\+\_\+lock\+\_\+free}!Lock@{Lock}}
\subsubsection[{eina\+\_\+lock\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}static void eina\+\_\+lock\+\_\+free (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Lock $\ast$}]{mutex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gaf8d1c4e3aff3bd26fc85d81ed8c4e71a}


Deallocates an \#\+Eina\+\_\+\+Lock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mutex} & The \#\+Eina\+\_\+\+Lock structure to be deallocated\\
\hline
\end{DoxyParams}
This function deallocates an \#\+Eina\+\_\+\+Lock allocated by \hyperlink{group__Eina__Lock__Group_ga8dda398c1db315582a80640c7f78f648}{eina\+\_\+lock\+\_\+new()} and does any platform dependent cleanup that is required.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga8dda398c1db315582a80640c7f78f648}{eina\+\_\+lock\+\_\+new()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}.\end{Desc}


Referenced by ecore\+\_\+shutdown(), eet\+\_\+shutdown(), eio\+\_\+shutdown(), efl\+::eina\+::thread\+::thread(), and efl\+::eina\+::mutex\+::$\sim$mutex().

\hypertarget{group__Eina__Lock__Group_ga2ad27b83cf8562a41fe67557d8d2d753}{\index{Lock@{Lock}!eina\+\_\+lock\+\_\+take@{eina\+\_\+lock\+\_\+take}}
\index{eina\+\_\+lock\+\_\+take@{eina\+\_\+lock\+\_\+take}!Lock@{Lock}}
\subsubsection[{eina\+\_\+lock\+\_\+take}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Lock\+\_\+\+Result} eina\+\_\+lock\+\_\+take (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Lock $\ast$}]{mutex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga2ad27b83cf8562a41fe67557d8d2d753}


Attempts to take a lock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mutex} & The \#\+Eina\+\_\+\+Lock to take\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D} on success. If the operation fails because a deadlock condition exists, it returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a42ea61e3245e1b9f1db5ea63615e6e67}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+D\+E\+A\+D\+L\+O\+C\+K}. If some other condition causes the take to fail, \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a8b4d357ca18a463b01f789b24c8eb3b9}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L} is returned.
\end{DoxyReturn}
This function attempts to gain a lock on the indicated \#\+Eina\+\_\+\+Lock. If the underlying \#\+Eina\+\_\+\+Lock is locked already, this call can be blocked until the lock is released. This is appropriate in many cases, but consider using \hyperlink{group__Eina__Lock__Group_ga13c8270c1589bfd4770ee4cd43977bc5}{eina\+\_\+lock\+\_\+take\+\_\+try()} if you don't need to block.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga13c8270c1589bfd4770ee4cd43977bc5}{eina\+\_\+lock\+\_\+take\+\_\+try()} 

\hyperlink{group__Eina__Lock__Group_ga469476cfe8d8ca4dfdc46469fb9e31e5}{eina\+\_\+lock\+\_\+release()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}.\end{Desc}


Referenced by ecore\+\_\+fork\+\_\+reset(), ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync(), ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin(), ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end(), efreet\+\_\+desktop\+\_\+category\+\_\+add(), efreet\+\_\+desktop\+\_\+category\+\_\+del(), efreet\+\_\+desktop\+\_\+free(), efreet\+\_\+desktop\+\_\+new(), efreet\+\_\+desktop\+\_\+ref(), efreet\+\_\+desktop\+\_\+x\+\_\+field\+\_\+del(), efreet\+\_\+desktop\+\_\+x\+\_\+field\+\_\+set(), efreet\+\_\+util\+\_\+path\+\_\+to\+\_\+file\+\_\+id(), eina\+\_\+file\+\_\+close(), eina\+\_\+file\+\_\+dup(), eina\+\_\+file\+\_\+flush(), eina\+\_\+file\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+map\+\_\+faulted(), eina\+\_\+file\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+map\+\_\+lines(), eina\+\_\+file\+\_\+map\+\_\+new(), eina\+\_\+file\+\_\+map\+\_\+populate(), eina\+\_\+file\+\_\+open(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+new(), eina\+\_\+tmpstr\+\_\+add\+\_\+length(), eina\+\_\+tmpstr\+\_\+del(), eina\+\_\+tmpstr\+\_\+strlen(), eio\+\_\+memory\+\_\+burst\+\_\+limit\+\_\+set(), efl\+::eina\+::mutex\+::lock(), and efl\+::eina\+::thread\+::thread().

\hypertarget{group__Eina__Lock__Group_ga13c8270c1589bfd4770ee4cd43977bc5}{\index{Lock@{Lock}!eina\+\_\+lock\+\_\+take\+\_\+try@{eina\+\_\+lock\+\_\+take\+\_\+try}}
\index{eina\+\_\+lock\+\_\+take\+\_\+try@{eina\+\_\+lock\+\_\+take\+\_\+try}!Lock@{Lock}}
\subsubsection[{eina\+\_\+lock\+\_\+take\+\_\+try}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Lock\+\_\+\+Result} eina\+\_\+lock\+\_\+take\+\_\+try (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Lock $\ast$}]{mutex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga13c8270c1589bfd4770ee4cd43977bc5}


Attempts to take a lock if possible. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mutex} & The \#\+Eina\+\_\+\+Lock to take\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D} on success. If the operation fails because a deadlock condition exists, it returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a42ea61e3245e1b9f1db5ea63615e6e67}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+D\+E\+A\+D\+L\+O\+C\+K}. If some other condition causes the take to fail, \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a8b4d357ca18a463b01f789b24c8eb3b9}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L} is returned.
\end{DoxyReturn}
This function attempts to gain a lock on the indicated \#\+Eina\+\_\+\+Lock. Identical \hyperlink{group__Eina__Lock__Group_ga2ad27b83cf8562a41fe67557d8d2d753}{eina\+\_\+lock\+\_\+take()}, but returns immediately if the lock is already taken.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga2ad27b83cf8562a41fe67557d8d2d753}{eina\+\_\+lock\+\_\+take()} 

\hyperlink{group__Eina__Lock__Group_ga469476cfe8d8ca4dfdc46469fb9e31e5}{eina\+\_\+lock\+\_\+release()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}.\end{Desc}


Referenced by efl\+::eina\+::mutex\+::try\+\_\+lock().

\hypertarget{group__Eina__Lock__Group_ga469476cfe8d8ca4dfdc46469fb9e31e5}{\index{Lock@{Lock}!eina\+\_\+lock\+\_\+release@{eina\+\_\+lock\+\_\+release}}
\index{eina\+\_\+lock\+\_\+release@{eina\+\_\+lock\+\_\+release}!Lock@{Lock}}
\subsubsection[{eina\+\_\+lock\+\_\+release}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Lock\+\_\+\+Result} eina\+\_\+lock\+\_\+release (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Lock $\ast$}]{mutex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga469476cfe8d8ca4dfdc46469fb9e31e5}


Releases a lock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mutex} & The \#\+Eina\+\_\+\+Lock to release\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D} on success. If it fails, \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a8b4d357ca18a463b01f789b24c8eb3b9}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L} is returned.
\end{DoxyReturn}
This function releases the lock on the indicated \#\+Eina\+\_\+\+Lock. If successful, and {\ttfamily E\+I\+N\+A\+\_\+\+H\+A\+V\+E\+\_\+\+D\+E\+B\+U\+G\+\_\+\+T\+H\+R\+E\+A\+D\+S} is defined, {\ttfamily mutex} is updated and information about the locking process is removed (e.\+g. thread number and backtrace for P\+O\+S\+I\+X).

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga2ad27b83cf8562a41fe67557d8d2d753}{eina\+\_\+lock\+\_\+take()} 

\hyperlink{group__Eina__Lock__Group_ga13c8270c1589bfd4770ee4cd43977bc5}{eina\+\_\+lock\+\_\+take\+\_\+try()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}.\end{Desc}


Referenced by ecore\+\_\+fork\+\_\+reset(), ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync(), ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin(), ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end(), efreet\+\_\+desktop\+\_\+category\+\_\+add(), efreet\+\_\+desktop\+\_\+category\+\_\+del(), efreet\+\_\+desktop\+\_\+free(), efreet\+\_\+desktop\+\_\+new(), efreet\+\_\+desktop\+\_\+ref(), efreet\+\_\+desktop\+\_\+x\+\_\+field\+\_\+del(), efreet\+\_\+desktop\+\_\+x\+\_\+field\+\_\+set(), efreet\+\_\+util\+\_\+path\+\_\+to\+\_\+file\+\_\+id(), eina\+\_\+file\+\_\+close(), eina\+\_\+file\+\_\+dup(), eina\+\_\+file\+\_\+flush(), eina\+\_\+file\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+map\+\_\+faulted(), eina\+\_\+file\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+map\+\_\+lines(), eina\+\_\+file\+\_\+map\+\_\+new(), eina\+\_\+file\+\_\+map\+\_\+populate(), eina\+\_\+file\+\_\+open(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+all(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+free(), eina\+\_\+file\+\_\+virtual\+\_\+map\+\_\+new(), eina\+\_\+tmpstr\+\_\+add\+\_\+length(), eina\+\_\+tmpstr\+\_\+del(), eina\+\_\+tmpstr\+\_\+strlen(), eio\+\_\+memory\+\_\+burst\+\_\+limit\+\_\+set(), efl\+::eina\+::thread\+::thread(), and efl\+::eina\+::mutex\+::unlock().

\hypertarget{group__Eina__Lock__Group_gacaa58955efb147091249bf45610fdf6a}{\index{Lock@{Lock}!eina\+\_\+lock\+\_\+debug@{eina\+\_\+lock\+\_\+debug}}
\index{eina\+\_\+lock\+\_\+debug@{eina\+\_\+lock\+\_\+debug}!Lock@{Lock}}
\subsubsection[{eina\+\_\+lock\+\_\+debug}]{\setlength{\rightskip}{0pt plus 5cm}static void eina\+\_\+lock\+\_\+debug (
\begin{DoxyParamCaption}
\item[{const Eina\+\_\+\+Lock $\ast$}]{mutex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gacaa58955efb147091249bf45610fdf6a}


Print debug information about a lock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mutex} & The \#\+Eina\+\_\+\+Lock to print debug info for.\\
\hline
\end{DoxyParams}
This function prints debug information for {\ttfamily mutex}. The information is platform dependant. On P\+O\+S\+I\+X systems it prints the address of {\ttfamily mutex}, lock state, thread number and a backtrace.

\begin{DoxyNote}{Note}
If {\ttfamily E\+I\+N\+A\+\_\+\+H\+A\+V\+E\+\_\+\+D\+E\+B\+U\+G\+\_\+\+T\+H\+R\+E\+A\+D\+S} is not defined, this function does nothing. 

This function is implemented on Win32 or Win\+C\+E, but it does not not produce any output, regardless of {\ttfamily E\+I\+N\+A\+\_\+\+H\+A\+V\+E\+\_\+\+D\+E\+B\+U\+G\+\_\+\+T\+H\+R\+E\+A\+D\+S} being set. 
\end{DoxyNote}


Referenced by efl\+::eina\+::mutex\+::debug(), and eina\+\_\+threads\+\_\+shutdown().

\hypertarget{group__Eina__Lock__Group_gaab2b734db1cbdaffe79559f6716ac793}{\index{Lock@{Lock}!eina\+\_\+condition\+\_\+new@{eina\+\_\+condition\+\_\+new}}
\index{eina\+\_\+condition\+\_\+new@{eina\+\_\+condition\+\_\+new}!Lock@{Lock}}
\subsubsection[{eina\+\_\+condition\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+condition\+\_\+new (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Condition $\ast$}]{cond, }
\item[{Eina\+\_\+\+Lock $\ast$}]{mutex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gaab2b734db1cbdaffe79559f6716ac793}


Initializes a new condition variable. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em cond} & The condition variable to create \\
\hline
\mbox{\tt in}  & {\em mutex} & The \#\+Eina\+\_\+\+Lock structure that controls access to this condition variable\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function initializes an \#\+Eina\+\_\+\+Condition structure and associates it with an existing lock.

Condition variables are used to coordinate actions between threads. See \href{https://computing.llnl.gov/tutorials/pthreads/#ConVarOverview}{\tt Condition Varable Overview } for an introduction to condition variables and their use.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga838e1e7dfc8bbf114634a7de67de8956}{eina\+\_\+condition\+\_\+free()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}.\end{Desc}


Referenced by efl\+::eina\+::condition\+\_\+variable\+::condition\+\_\+variable(), ecore\+\_\+init(), ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync(), ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin(), eio\+\_\+init(), and efl\+::eina\+::thread\+::thread().

\hypertarget{group__Eina__Lock__Group_ga838e1e7dfc8bbf114634a7de67de8956}{\index{Lock@{Lock}!eina\+\_\+condition\+\_\+free@{eina\+\_\+condition\+\_\+free}}
\index{eina\+\_\+condition\+\_\+free@{eina\+\_\+condition\+\_\+free}!Lock@{Lock}}
\subsubsection[{eina\+\_\+condition\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}static void eina\+\_\+condition\+\_\+free (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Condition $\ast$}]{cond}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga838e1e7dfc8bbf114634a7de67de8956}


Deallocates a condition variable. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em cond} & The condition variable to be deallocated.\\
\hline
\end{DoxyParams}
This function deallocates a condition variable and does any platform dependent cleanup that is required.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_gaab2b734db1cbdaffe79559f6716ac793}{eina\+\_\+condition\+\_\+new()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}.\end{Desc}


Referenced by ecore\+\_\+shutdown(), eio\+\_\+shutdown(), efl\+::eina\+::thread\+::thread(), and efl\+::eina\+::condition\+\_\+variable\+::$\sim$condition\+\_\+variable().

\hypertarget{group__Eina__Lock__Group_ga149f387d5f18c469c365147ffbd4dc2c}{\index{Lock@{Lock}!eina\+\_\+condition\+\_\+wait@{eina\+\_\+condition\+\_\+wait}}
\index{eina\+\_\+condition\+\_\+wait@{eina\+\_\+condition\+\_\+wait}!Lock@{Lock}}
\subsubsection[{eina\+\_\+condition\+\_\+wait}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+condition\+\_\+wait (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Condition $\ast$}]{cond}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga149f387d5f18c469c365147ffbd4dc2c}


Causes a thread to wait until signaled by the condition. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em cond} & The \#\+Eina\+\_\+\+Condition upon which the thread waits.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function makes a thread block until a signal is sent to it via {\ttfamily cond}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_gaa9e6e29fffa21b4bef6f089655cf7982}{eina\+\_\+condition\+\_\+timedwait()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}.\end{Desc}


Referenced by ecore\+\_\+main\+\_\+loop\+\_\+thread\+\_\+safe\+\_\+call\+\_\+sync(), ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+begin(), ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end(), efl\+::eina\+::thread\+::thread(), and efl\+::eina\+::condition\+\_\+variable\+::wait().

\hypertarget{group__Eina__Lock__Group_gaa9e6e29fffa21b4bef6f089655cf7982}{\index{Lock@{Lock}!eina\+\_\+condition\+\_\+timedwait@{eina\+\_\+condition\+\_\+timedwait}}
\index{eina\+\_\+condition\+\_\+timedwait@{eina\+\_\+condition\+\_\+timedwait}!Lock@{Lock}}
\subsubsection[{eina\+\_\+condition\+\_\+timedwait}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+condition\+\_\+timedwait (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Condition $\ast$}]{cond, }
\item[{double}]{t}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gaa9e6e29fffa21b4bef6f089655cf7982}


Causes a thread to wait until signaled by the condition or a timeout is reached. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em cond} & The \#\+Eina\+\_\+\+Condition upon which the thread waits. \\
\hline
\mbox{\tt in}  & {\em t} & The maximum amount of time to wait, in seconds.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function makes a thread block until either a signal is sent to it via {\ttfamily cond} or {\ttfamily t} seconds have passed.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga149f387d5f18c469c365147ffbd4dc2c}{eina\+\_\+condition\+\_\+wait()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_ga26597941ef6777d759ad4934d3f1655e}{\index{Lock@{Lock}!eina\+\_\+condition\+\_\+broadcast@{eina\+\_\+condition\+\_\+broadcast}}
\index{eina\+\_\+condition\+\_\+broadcast@{eina\+\_\+condition\+\_\+broadcast}!Lock@{Lock}}
\subsubsection[{eina\+\_\+condition\+\_\+broadcast}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+condition\+\_\+broadcast (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Condition $\ast$}]{cond}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga26597941ef6777d759ad4934d3f1655e}


Signal all threads waiting for a condition. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em cond} & The \#\+Eina\+\_\+\+Condition that signals all its waiting threads.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function sends a signal to all the threads waiting on the condition {\ttfamily cond}. If you know for sure that there is only one thread waiting, use \hyperlink{group__Eina__Lock__Group_ga42cfdc4920e74fd7ba99527a6a99cd7d}{eina\+\_\+condition\+\_\+signal()} instead to gain a little optimization.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga42cfdc4920e74fd7ba99527a6a99cd7d}{eina\+\_\+condition\+\_\+signal()} 
\end{DoxySeeAlso}


Referenced by ecore\+\_\+thread\+\_\+main\+\_\+loop\+\_\+end(), eio\+\_\+memory\+\_\+burst\+\_\+limit\+\_\+set(), and efl\+::eina\+::condition\+\_\+variable\+::notify\+\_\+all().

\hypertarget{group__Eina__Lock__Group_ga42cfdc4920e74fd7ba99527a6a99cd7d}{\index{Lock@{Lock}!eina\+\_\+condition\+\_\+signal@{eina\+\_\+condition\+\_\+signal}}
\index{eina\+\_\+condition\+\_\+signal@{eina\+\_\+condition\+\_\+signal}!Lock@{Lock}}
\subsubsection[{eina\+\_\+condition\+\_\+signal}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+condition\+\_\+signal (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Condition $\ast$}]{cond}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga42cfdc4920e74fd7ba99527a6a99cd7d}


Signal a thread waiting for a condition. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em cond} & The \#\+Eina\+\_\+\+Condition that signals its waiting thread.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function sends a signal to a thread waiting on the condition {\ttfamily cond}. If you do not know for sure that there is only one thread waiting, use \hyperlink{group__Eina__Lock__Group_ga26597941ef6777d759ad4934d3f1655e}{eina\+\_\+condition\+\_\+broadcast()} instead.

\begin{DoxyNote}{Note}
If there is more than one thread waiting on this condition, one of them is signalled, but which one is undefined.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga26597941ef6777d759ad4934d3f1655e}{eina\+\_\+condition\+\_\+broadcast()} 
\end{DoxySeeAlso}
\begin{Desc}
\item[Examples\+: ]\par
\hyperlink{ecore_thread_example_8c-example}{ecore\+\_\+thread\+\_\+example.\+c}.\end{Desc}


Referenced by efl\+::eina\+::condition\+\_\+variable\+::notify\+\_\+one().

\hypertarget{group__Eina__Lock__Group_gafe7bfa849c19aa4738d1918219c2ebb5}{\index{Lock@{Lock}!eina\+\_\+rwlock\+\_\+new@{eina\+\_\+rwlock\+\_\+new}}
\index{eina\+\_\+rwlock\+\_\+new@{eina\+\_\+rwlock\+\_\+new}!Lock@{Lock}}
\subsubsection[{eina\+\_\+rwlock\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+rwlock\+\_\+new (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+R\+W\+Lock $\ast$}]{mutex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gafe7bfa849c19aa4738d1918219c2ebb5}


Initializes a new \#\+Eina\+\_\+\+R\+W\+Lock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mutex} & The \#\+Eina\+\_\+\+R\+W\+Lock to be initialized.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function initializes an \#\+Eina\+\_\+\+R\+W\+Lock with appropriate values. These values are platform dependent as is the structure of the \#\+Eina\+\_\+\+R\+W\+Lock itself.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_gac0b244d4fec104f70a1a6157356c43f2}{eina\+\_\+rwlock\+\_\+free()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_gac0b244d4fec104f70a1a6157356c43f2}{\index{Lock@{Lock}!eina\+\_\+rwlock\+\_\+free@{eina\+\_\+rwlock\+\_\+free}}
\index{eina\+\_\+rwlock\+\_\+free@{eina\+\_\+rwlock\+\_\+free}!Lock@{Lock}}
\subsubsection[{eina\+\_\+rwlock\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}static void eina\+\_\+rwlock\+\_\+free (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+R\+W\+Lock $\ast$}]{mutex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gac0b244d4fec104f70a1a6157356c43f2}


Deallocates an \#\+Eina\+\_\+\+R\+W\+Lock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mutex} & The \#\+Eina\+\_\+\+R\+W\+Lock structure to be deallocated.\\
\hline
\end{DoxyParams}
This function deallocates an \#\+Eina\+\_\+\+R\+W\+Lock and does any platform dependent cleanup that is required.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_gafe7bfa849c19aa4738d1918219c2ebb5}{eina\+\_\+rwlock\+\_\+new()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_ga4bfe2c4dabf66d02481e36168d409cd9}{\index{Lock@{Lock}!eina\+\_\+rwlock\+\_\+take\+\_\+read@{eina\+\_\+rwlock\+\_\+take\+\_\+read}}
\index{eina\+\_\+rwlock\+\_\+take\+\_\+read@{eina\+\_\+rwlock\+\_\+take\+\_\+read}!Lock@{Lock}}
\subsubsection[{eina\+\_\+rwlock\+\_\+take\+\_\+read}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Lock\+\_\+\+Result} eina\+\_\+rwlock\+\_\+take\+\_\+read (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+R\+W\+Lock $\ast$}]{mutex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga4bfe2c4dabf66d02481e36168d409cd9}


Attempts to take a read lock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mutex} & The \#\+Eina\+\_\+\+R\+W\+Lock to take.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D} on success, \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a8b4d357ca18a463b01f789b24c8eb3b9}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L} on failure.
\end{DoxyReturn}
This function attempts to gain a read lock on the indicated \#\+Eina\+\_\+\+R\+W\+Lock. If the \#\+Eina\+\_\+\+R\+W\+Lock is write locked, this call can be blocked until the lock is released.

\begin{DoxyNote}{Note}
This function never return \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a42ea61e3245e1b9f1db5ea63615e6e67}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+D\+E\+A\+D\+L\+O\+C\+K}.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_gab3d34ffb8950e66b820a4de5def7bcd4}{eina\+\_\+rwlock\+\_\+release()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_gae9fa682cffd225320e1c07fe644f034e}{\index{Lock@{Lock}!eina\+\_\+rwlock\+\_\+take\+\_\+write@{eina\+\_\+rwlock\+\_\+take\+\_\+write}}
\index{eina\+\_\+rwlock\+\_\+take\+\_\+write@{eina\+\_\+rwlock\+\_\+take\+\_\+write}!Lock@{Lock}}
\subsubsection[{eina\+\_\+rwlock\+\_\+take\+\_\+write}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Lock\+\_\+\+Result} eina\+\_\+rwlock\+\_\+take\+\_\+write (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+R\+W\+Lock $\ast$}]{mutex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gae9fa682cffd225320e1c07fe644f034e}


Attempts to take a write lock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mutex} & The \#\+Eina\+\_\+\+R\+W\+Lock to take.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D} on success, \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a8b4d357ca18a463b01f789b24c8eb3b9}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L} on failure.
\end{DoxyReturn}
This function attempts to gain a write lock on the indicated \#\+Eina\+\_\+\+R\+W\+Lock. If the \#\+Eina\+\_\+\+R\+W\+Lock is locked for reading or writing, this call can be blocked until the lock is released.

\begin{DoxyNote}{Note}
This function never return \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a42ea61e3245e1b9f1db5ea63615e6e67}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+D\+E\+A\+D\+L\+O\+C\+K}.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_gab3d34ffb8950e66b820a4de5def7bcd4}{eina\+\_\+rwlock\+\_\+release()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_gab3d34ffb8950e66b820a4de5def7bcd4}{\index{Lock@{Lock}!eina\+\_\+rwlock\+\_\+release@{eina\+\_\+rwlock\+\_\+release}}
\index{eina\+\_\+rwlock\+\_\+release@{eina\+\_\+rwlock\+\_\+release}!Lock@{Lock}}
\subsubsection[{eina\+\_\+rwlock\+\_\+release}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Lock\+\_\+\+Result} eina\+\_\+rwlock\+\_\+release (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+R\+W\+Lock $\ast$}]{mutex}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gab3d34ffb8950e66b820a4de5def7bcd4}


Releases a lock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em mutex} & The \#\+Eina\+\_\+\+R\+W\+Lock to release.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D} on success. If it fails, \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a8b4d357ca18a463b01f789b24c8eb3b9}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L} is returned.
\end{DoxyReturn}
This function releases the lock on the indicated \#\+Eina\+\_\+\+R\+W\+Lock.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga4bfe2c4dabf66d02481e36168d409cd9}{eina\+\_\+rwlock\+\_\+take\+\_\+read()} 

\hyperlink{group__Eina__Lock__Group_gae9fa682cffd225320e1c07fe644f034e}{eina\+\_\+rwlock\+\_\+take\+\_\+write()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_ga300882739bb49270e52a62164a05276e}{\index{Lock@{Lock}!eina\+\_\+tls\+\_\+new@{eina\+\_\+tls\+\_\+new}}
\index{eina\+\_\+tls\+\_\+new@{eina\+\_\+tls\+\_\+new}!Lock@{Lock}}
\subsubsection[{eina\+\_\+tls\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+tls\+\_\+new (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+T\+L\+S $\ast$}]{key}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga300882739bb49270e52a62164a05276e}


Initializes a new \#\+Eina\+\_\+\+T\+L\+S, or thread level storage, to store thread specific data. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em key} & The \#\+Eina\+\_\+\+T\+L\+S to be initialized.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function initializes an \#\+Eina\+\_\+\+T\+L\+S with {\ttfamily key} but does not set a callback to deallocate {\ttfamily key} when the thread exits. The implementation is platform dependent as is the structure of the \#\+Eina\+\_\+\+T\+L\+S itself.

\begin{DoxyNote}{Note}
use \hyperlink{group__Eina__Lock__Group_gae128d753144bc09bdfc9e23b05f7ad90}{eina\+\_\+tls\+\_\+cb\+\_\+new()} instead to set a callback for deallocating {\ttfamily key}.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_gae128d753144bc09bdfc9e23b05f7ad90}{eina\+\_\+tls\+\_\+cb\+\_\+new()} 

\hyperlink{group__Eina__Lock__Group_ga6f9d5d1a0929b9cc5f1559fca41c9c1a}{eina\+\_\+tls\+\_\+free()} 
\end{DoxySeeAlso}


Referenced by evas\+\_\+gl\+\_\+new().

\hypertarget{group__Eina__Lock__Group_gae128d753144bc09bdfc9e23b05f7ad90}{\index{Lock@{Lock}!eina\+\_\+tls\+\_\+cb\+\_\+new@{eina\+\_\+tls\+\_\+cb\+\_\+new}}
\index{eina\+\_\+tls\+\_\+cb\+\_\+new@{eina\+\_\+tls\+\_\+cb\+\_\+new}!Lock@{Lock}}
\subsubsection[{eina\+\_\+tls\+\_\+cb\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+tls\+\_\+cb\+\_\+new (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+T\+L\+S $\ast$}]{key, }
\item[{{\bf Eina\+\_\+\+T\+L\+S\+\_\+\+Delete\+\_\+\+Cb}}]{delete\+\_\+cb}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gae128d753144bc09bdfc9e23b05f7ad90}


Initializes a new \#\+Eina\+\_\+\+T\+L\+S, or thread level storage, to store thread specific data. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em key} & The \#\+Eina\+\_\+\+T\+L\+S to be initialized. \\
\hline
\mbox{\tt in}  & {\em delete\+\_\+cb} & A pointer to a function that deallocates {\ttfamily key}.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function initializes an \#\+Eina\+\_\+\+T\+L\+S with {\ttfamily key} and sets a callback to deallocate {\ttfamily key} when the thread exits. The implementation is platform dependent as is the structure of the \#\+Eina\+\_\+\+T\+L\+S itself.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga300882739bb49270e52a62164a05276e}{eina\+\_\+tls\+\_\+new()} 

\hyperlink{group__Eina__Lock__Group_ga6f9d5d1a0929b9cc5f1559fca41c9c1a}{eina\+\_\+tls\+\_\+free()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_ga6f9d5d1a0929b9cc5f1559fca41c9c1a}{\index{Lock@{Lock}!eina\+\_\+tls\+\_\+free@{eina\+\_\+tls\+\_\+free}}
\index{eina\+\_\+tls\+\_\+free@{eina\+\_\+tls\+\_\+free}!Lock@{Lock}}
\subsubsection[{eina\+\_\+tls\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}static void eina\+\_\+tls\+\_\+free (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+T\+L\+S}]{key}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga6f9d5d1a0929b9cc5f1559fca41c9c1a}


Frees an allocated \#\+Eina\+\_\+\+T\+L\+S. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em key} & The \#\+Eina\+\_\+\+T\+L\+S to be freed.\\
\hline
\end{DoxyParams}
This function frees the \#\+Eina\+\_\+\+T\+L\+S {\ttfamily key}. The implementation is platform dependent.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga300882739bb49270e52a62164a05276e}{eina\+\_\+tls\+\_\+new()} 

\hyperlink{group__Eina__Lock__Group_gae128d753144bc09bdfc9e23b05f7ad90}{eina\+\_\+tls\+\_\+cb\+\_\+new()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_ga90d151fea86045136cefee074924f369}{\index{Lock@{Lock}!eina\+\_\+tls\+\_\+get@{eina\+\_\+tls\+\_\+get}}
\index{eina\+\_\+tls\+\_\+get@{eina\+\_\+tls\+\_\+get}!Lock@{Lock}}
\subsubsection[{eina\+\_\+tls\+\_\+get}]{\setlength{\rightskip}{0pt plus 5cm}static void$\ast$ eina\+\_\+tls\+\_\+get (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+T\+L\+S}]{key}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga90d151fea86045136cefee074924f369}


Gets the value in \#\+Eina\+\_\+\+T\+L\+S for this thread. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em key} & The \#\+Eina\+\_\+\+T\+L\+S to be retrieved.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A pointer to the data associated with {\ttfamily key}.
\end{DoxyReturn}
This function gets a pointer to the data associated with \#\+Eina\+\_\+\+T\+L\+S {\ttfamily key} for this thread. The implementation is platform dependent.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_gaf8c9890f52c058aa8cab1da3a109c26a}{eina\+\_\+tls\+\_\+set()} 
\end{DoxySeeAlso}


Referenced by eina\+\_\+error\+\_\+get().

\hypertarget{group__Eina__Lock__Group_gaf8c9890f52c058aa8cab1da3a109c26a}{\index{Lock@{Lock}!eina\+\_\+tls\+\_\+set@{eina\+\_\+tls\+\_\+set}}
\index{eina\+\_\+tls\+\_\+set@{eina\+\_\+tls\+\_\+set}!Lock@{Lock}}
\subsubsection[{eina\+\_\+tls\+\_\+set}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+tls\+\_\+set (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+T\+L\+S}]{key, }
\item[{const void $\ast$}]{data}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gaf8c9890f52c058aa8cab1da3a109c26a}


Sets the value in Eina\+\_\+\+T\+L\+S for this thread. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em key} & The \#\+Eina\+\_\+\+T\+L\+S to be set. \\
\hline
\mbox{\tt in}  & {\em data} & A pointer to the data to be stored.\\
\hline
\end{DoxyParams}
This function sets the value associated with {\ttfamily key} to the pointer to the data {\ttfamily data}. The implementation is platform dependent.

\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga90d151fea86045136cefee074924f369}{eina\+\_\+tls\+\_\+get()} 
\end{DoxySeeAlso}


Referenced by eina\+\_\+error\+\_\+set().

\hypertarget{group__Eina__Lock__Group_ga093fddb63d97504084f49dd36df65fd0}{\index{Lock@{Lock}!eina\+\_\+semaphore\+\_\+new@{eina\+\_\+semaphore\+\_\+new}}
\index{eina\+\_\+semaphore\+\_\+new@{eina\+\_\+semaphore\+\_\+new}!Lock@{Lock}}
\subsubsection[{eina\+\_\+semaphore\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+semaphore\+\_\+new (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Semaphore $\ast$}]{sem, }
\item[{int}]{count\+\_\+init}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga093fddb63d97504084f49dd36df65fd0}


Initializes a new \#\+Eina\+\_\+\+Semaphore. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em sem} & The \#\+Eina\+\_\+\+Semaphore to be initialized. \\
\hline
\mbox{\tt in}  & {\em count\+\_\+init} & Behavior is platofrm specific. See above.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function initializes an unnamed \#\+Eina\+\_\+\+Semaphore with appropriate values. These values are platform dependent.

\begin{DoxyNote}{Note}
Be aware that the behavior of the parameter {\ttfamily count\+\_\+init} differs by platform. $\ast$ \begin{DoxyItemize}
\item P\+O\+S\+I\+X\+: Indicates whether this semaphore can be shared by between processes. Greater than 0 == shared. \item Win32\+: Indicates the initial count of threads waiting on this semaphore.\end{DoxyItemize}


Semaphores are not avialable on the Win\+C\+E platform.
\end{DoxyNote}
\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga3ed968965c79524a43f6efea20459d49}{eina\+\_\+semaphore\+\_\+free()} 
\end{DoxySeeAlso}


Referenced by eina\+\_\+thread\+\_\+queue\+\_\+new().

\hypertarget{group__Eina__Lock__Group_ga3ed968965c79524a43f6efea20459d49}{\index{Lock@{Lock}!eina\+\_\+semaphore\+\_\+free@{eina\+\_\+semaphore\+\_\+free}}
\index{eina\+\_\+semaphore\+\_\+free@{eina\+\_\+semaphore\+\_\+free}!Lock@{Lock}}
\subsubsection[{eina\+\_\+semaphore\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+semaphore\+\_\+free (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Semaphore $\ast$}]{sem}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga3ed968965c79524a43f6efea20459d49}


Frees an allocated \#\+Eina\+\_\+\+Semaphore. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em sem} & The \#\+Eina\+\_\+\+Semaphore to be freed.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function frees the \#\+Eina\+\_\+\+Semaphore {\ttfamily sem}. The implementation is platform dependent.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga093fddb63d97504084f49dd36df65fd0}{eina\+\_\+semaphore\+\_\+new()} 
\end{DoxySeeAlso}


Referenced by eina\+\_\+thread\+\_\+queue\+\_\+free().

\hypertarget{group__Eina__Lock__Group_ga4b1a668ea5e49bb309f9b8c2b983b83c}{\index{Lock@{Lock}!eina\+\_\+semaphore\+\_\+lock@{eina\+\_\+semaphore\+\_\+lock}}
\index{eina\+\_\+semaphore\+\_\+lock@{eina\+\_\+semaphore\+\_\+lock}!Lock@{Lock}}
\subsubsection[{eina\+\_\+semaphore\+\_\+lock}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+semaphore\+\_\+lock (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Semaphore $\ast$}]{sem}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga4b1a668ea5e49bb309f9b8c2b983b83c}


Gets a lock on an \#\+Eina\+\_\+\+Semaphore. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em sem} & The \#\+Eina\+\_\+\+Semaphore to lock.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function locks the \#\+Eina\+\_\+\+Semaphore {\ttfamily sem}. The implementation is platform dependent.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_gaf0b5612096cedc1d8a80d0fe43c42c43}{eina\+\_\+semaphore\+\_\+release()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_gaf0b5612096cedc1d8a80d0fe43c42c43}{\index{Lock@{Lock}!eina\+\_\+semaphore\+\_\+release@{eina\+\_\+semaphore\+\_\+release}}
\index{eina\+\_\+semaphore\+\_\+release@{eina\+\_\+semaphore\+\_\+release}!Lock@{Lock}}
\subsubsection[{eina\+\_\+semaphore\+\_\+release}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+semaphore\+\_\+release (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Semaphore $\ast$}]{sem, }
\item[{int}]{count\+\_\+release}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gaf0b5612096cedc1d8a80d0fe43c42c43}


Releases a lock on an \#\+Eina\+\_\+\+Semaphore. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em sem} & The \#\+Eina\+\_\+\+Semaphore to release. \\
\hline
\mbox{\tt in}  & {\em count\+\_\+release} & Not used.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function releases a lock on the \#\+Eina\+\_\+\+Semaphore {\ttfamily sem}. The implementation is platform dependent.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga4b1a668ea5e49bb309f9b8c2b983b83c}{eina\+\_\+semaphore\+\_\+lock()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_ga86dd1d3f5b8ae9ac27de7976910a5bb2}{\index{Lock@{Lock}!eina\+\_\+barrier\+\_\+new@{eina\+\_\+barrier\+\_\+new}}
\index{eina\+\_\+barrier\+\_\+new@{eina\+\_\+barrier\+\_\+new}!Lock@{Lock}}
\subsubsection[{eina\+\_\+barrier\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+barrier\+\_\+new (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Barrier $\ast$}]{barrier, }
\item[{int}]{needed}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga86dd1d3f5b8ae9ac27de7976910a5bb2}


Initializes a new \#\+Eina\+\_\+\+Barrier. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em barrier} & The \#\+Eina\+\_\+\+Barrier to be initialized. \\
\hline
\mbox{\tt in}  & {\em needed} & The number of thread waits that causes this barrier to be reset.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function initializes a new \#\+Eina\+\_\+\+Barrier. It sets the {\ttfamily needed} flag to the value of {\ttfamily needed}, sets the barrier's {\ttfamily count} member to 0 and creates new \#\+Eina\+\_\+\+Lock and \#\+Eina\+\_\+\+Condition objects for the barrier.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_gafe6f7125b084e0b54f3b43e9289b18a0}{eina\+\_\+barrier\+\_\+free()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_gafe6f7125b084e0b54f3b43e9289b18a0}{\index{Lock@{Lock}!eina\+\_\+barrier\+\_\+free@{eina\+\_\+barrier\+\_\+free}}
\index{eina\+\_\+barrier\+\_\+free@{eina\+\_\+barrier\+\_\+free}!Lock@{Lock}}
\subsubsection[{eina\+\_\+barrier\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}static void eina\+\_\+barrier\+\_\+free (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Barrier $\ast$}]{barrier}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gafe6f7125b084e0b54f3b43e9289b18a0}


Frees an allocated \#\+Eina\+\_\+\+Barrier. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em barrier} & The \#\+Eina\+\_\+\+Barrier to be freed.\\
\hline
\end{DoxyParams}
This function frees the \#\+Eina\+\_\+\+Barrier {\ttfamily barrier}.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga86dd1d3f5b8ae9ac27de7976910a5bb2}{eina\+\_\+barrier\+\_\+new()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_gab3a1febe7dc4e0a2f62270dc2602209e}{\index{Lock@{Lock}!eina\+\_\+barrier\+\_\+wait@{eina\+\_\+barrier\+\_\+wait}}
\index{eina\+\_\+barrier\+\_\+wait@{eina\+\_\+barrier\+\_\+wait}!Lock@{Lock}}
\subsubsection[{eina\+\_\+barrier\+\_\+wait}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+barrier\+\_\+wait (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Barrier $\ast$}]{barrier}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gab3a1febe7dc4e0a2f62270dc2602209e}


Increments the count of threads that are waiting on {\ttfamily barrier}. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em barrier} & The \#\+Eina\+\_\+\+Barrier to be incremented.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, else \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
When the count of threads reaches the {\ttfamily needed} value for the barrier, all waiting threads are notified via \hyperlink{group__Eina__Lock__Group_ga26597941ef6777d759ad4934d3f1655e}{eina\+\_\+condition\+\_\+broadcast()}. \hypertarget{group__Eina__Lock__Group_ga5f4b36220ae88623031cb0e9bf5de290}{\index{Lock@{Lock}!eina\+\_\+spinlock\+\_\+new@{eina\+\_\+spinlock\+\_\+new}}
\index{eina\+\_\+spinlock\+\_\+new@{eina\+\_\+spinlock\+\_\+new}!Lock@{Lock}}
\subsubsection[{eina\+\_\+spinlock\+\_\+new}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Bool} eina\+\_\+spinlock\+\_\+new (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Spinlock $\ast$}]{spinlock}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga5f4b36220ae88623031cb0e9bf5de290}


Initializes a new \#\+Eina\+\_\+\+Spinlock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em spinlock} & The \#\+Eina\+\_\+\+Spinlock to be initialized.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{E\+I\+N\+A\+\_\+\+T\+R\+U\+E} on success, \hyperlink{group__Eina__Types__Group_ga1feb115f8e9913e806e090d9bd5a7301}{E\+I\+N\+A\+\_\+\+F\+A\+L\+S\+E} otherwise.
\end{DoxyReturn}
This function initializes a new \#\+Eina\+\_\+\+Spinlock, if spinlocks are available. If spinlocks are not avialable, it creates a new \#\+Eina\+\_\+\+Lock.

\begin{DoxyNote}{Note}
Spinlocks are only implemented on the P\+O\+S\+I\+X platform and are only available if \#\+E\+I\+N\+A\+\_\+\+H\+A\+V\+E\+\_\+\+P\+O\+S\+I\+X\+\_\+\+S\+P\+I\+N\+L\+O\+C\+K is defined. you get a new \#\+Eina\+\_\+\+Lock on All other platforms.
\end{DoxyNote}
see \hyperlink{group__Eina__Lock__Group_gac2593032eadc7b1e03c0980f2dedb7ca}{eina\+\_\+spinlock\+\_\+free()} 

Referenced by eina\+\_\+thread\+\_\+queue\+\_\+new(), and eio\+\_\+init().

\hypertarget{group__Eina__Lock__Group_gaf9556624e5c6db1a66c20615c523efb5}{\index{Lock@{Lock}!eina\+\_\+spinlock\+\_\+take@{eina\+\_\+spinlock\+\_\+take}}
\index{eina\+\_\+spinlock\+\_\+take@{eina\+\_\+spinlock\+\_\+take}!Lock@{Lock}}
\subsubsection[{eina\+\_\+spinlock\+\_\+take}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Lock\+\_\+\+Result} eina\+\_\+spinlock\+\_\+take (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Spinlock $\ast$}]{spinlock}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gaf9556624e5c6db1a66c20615c523efb5}


Attempts to take a spinlock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em spinlock} & The \#\+Eina\+\_\+\+Spinlock to take.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D} on success. If the operation fails because a deadlock condition exists, it returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a42ea61e3245e1b9f1db5ea63615e6e67}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+D\+E\+A\+D\+L\+O\+C\+K}. If some other condition causes the take to fail, \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a8b4d357ca18a463b01f789b24c8eb3b9}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L} is returned.
\end{DoxyReturn}
This function attempts to gain a lock on the indicated \#\+Eina\+\_\+\+Spinlock. If the underlying \#\+Eina\+\_\+\+Spinlock is locked already, this call can be blocked until the lock is released. This is appropriate in many cases, but consider using \hyperlink{group__Eina__Lock__Group_ga8e3592cdc708ac984f0caabc236d3f2e}{eina\+\_\+spinlock\+\_\+take\+\_\+try()} if you don't need to block.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga8e3592cdc708ac984f0caabc236d3f2e}{eina\+\_\+spinlock\+\_\+take\+\_\+try()} 

\hyperlink{group__Eina__Lock__Group_ga7143ee35b9894e80578753485284256c}{eina\+\_\+spinlock\+\_\+release()} 
\end{DoxySeeAlso}


Referenced by eet\+\_\+dictionary\+\_\+string\+\_\+check(), eina\+\_\+stringshare\+\_\+add\+\_\+length(), eina\+\_\+stringshare\+\_\+del(), eina\+\_\+stringshare\+\_\+ref(), eina\+\_\+thread\+\_\+queue\+\_\+pending\+\_\+get(), eina\+\_\+thread\+\_\+queue\+\_\+poll(), eina\+\_\+thread\+\_\+queue\+\_\+send(), eina\+\_\+thread\+\_\+queue\+\_\+wait(), and evas\+\_\+async\+\_\+events\+\_\+put().

\hypertarget{group__Eina__Lock__Group_ga8e3592cdc708ac984f0caabc236d3f2e}{\index{Lock@{Lock}!eina\+\_\+spinlock\+\_\+take\+\_\+try@{eina\+\_\+spinlock\+\_\+take\+\_\+try}}
\index{eina\+\_\+spinlock\+\_\+take\+\_\+try@{eina\+\_\+spinlock\+\_\+take\+\_\+try}!Lock@{Lock}}
\subsubsection[{eina\+\_\+spinlock\+\_\+take\+\_\+try}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Lock\+\_\+\+Result} eina\+\_\+spinlock\+\_\+take\+\_\+try (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Spinlock $\ast$}]{spinlock}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga8e3592cdc708ac984f0caabc236d3f2e}


Attempts to take a spinlock if possible. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em spinlock} & The \#\+Eina\+\_\+\+Spinlock to take.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D} on success. If the operation fails because a deadlock condition exists, it returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a42ea61e3245e1b9f1db5ea63615e6e67}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+D\+E\+A\+D\+L\+O\+C\+K}. If some other condition causes the take to fail, \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a8b4d357ca18a463b01f789b24c8eb3b9}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L} is returned.
\end{DoxyReturn}
This function attempts to gain a lock on the indicated \#\+Eina\+\_\+\+Spinlock. Identical to \hyperlink{group__Eina__Lock__Group_ga2ad27b83cf8562a41fe67557d8d2d753}{eina\+\_\+lock\+\_\+take()}, but returns immediately if the lock is already taken.

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_ga8e3592cdc708ac984f0caabc236d3f2e}{eina\+\_\+spinlock\+\_\+take\+\_\+try()} 

\hyperlink{group__Eina__Lock__Group_ga7143ee35b9894e80578753485284256c}{eina\+\_\+spinlock\+\_\+release()} 
\end{DoxySeeAlso}
\hypertarget{group__Eina__Lock__Group_ga7143ee35b9894e80578753485284256c}{\index{Lock@{Lock}!eina\+\_\+spinlock\+\_\+release@{eina\+\_\+spinlock\+\_\+release}}
\index{eina\+\_\+spinlock\+\_\+release@{eina\+\_\+spinlock\+\_\+release}!Lock@{Lock}}
\subsubsection[{eina\+\_\+spinlock\+\_\+release}]{\setlength{\rightskip}{0pt plus 5cm}static {\bf Eina\+\_\+\+Lock\+\_\+\+Result} eina\+\_\+spinlock\+\_\+release (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Spinlock $\ast$}]{spinlock}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_ga7143ee35b9894e80578753485284256c}


Releases a spinlock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em spinlock} & The \#\+Eina\+\_\+\+Spinlock to release.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729aebeef2702bf7645b094e48bc79705b99}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+S\+U\+C\+C\+E\+E\+D} on success, \hyperlink{group__Eina__Lock__Group_ggacba5cc92b99189a86e3620c92836e729a8b4d357ca18a463b01f789b24c8eb3b9}{E\+I\+N\+A\+\_\+\+L\+O\+C\+K\+\_\+\+F\+A\+I\+L} otherwise.
\end{DoxyReturn}
This function will release the lock on the indicated \#\+Eina\+\_\+\+Spinlock. If successful, and {\ttfamily E\+I\+N\+A\+\_\+\+H\+A\+V\+E\+\_\+\+D\+E\+B\+U\+G\+\_\+\+T\+H\+R\+E\+A\+D\+S} is defined, {\ttfamily mutex} is updated and information about the locking process is removed (e.\+g. thread number and backtrace for P\+O\+S\+I\+X).

\begin{DoxySeeAlso}{See also}
\hyperlink{group__Eina__Lock__Group_gaf9556624e5c6db1a66c20615c523efb5}{eina\+\_\+spinlock\+\_\+take()} 

\hyperlink{group__Eina__Lock__Group_ga8e3592cdc708ac984f0caabc236d3f2e}{eina\+\_\+spinlock\+\_\+take\+\_\+try()} 
\end{DoxySeeAlso}


Referenced by eet\+\_\+dictionary\+\_\+string\+\_\+check(), eina\+\_\+stringshare\+\_\+add\+\_\+length(), eina\+\_\+stringshare\+\_\+del(), eina\+\_\+stringshare\+\_\+ref(), eina\+\_\+thread\+\_\+queue\+\_\+pending\+\_\+get(), eina\+\_\+thread\+\_\+queue\+\_\+poll(), eina\+\_\+thread\+\_\+queue\+\_\+send(), eina\+\_\+thread\+\_\+queue\+\_\+wait(), and evas\+\_\+async\+\_\+events\+\_\+put().

\hypertarget{group__Eina__Lock__Group_gac2593032eadc7b1e03c0980f2dedb7ca}{\index{Lock@{Lock}!eina\+\_\+spinlock\+\_\+free@{eina\+\_\+spinlock\+\_\+free}}
\index{eina\+\_\+spinlock\+\_\+free@{eina\+\_\+spinlock\+\_\+free}!Lock@{Lock}}
\subsubsection[{eina\+\_\+spinlock\+\_\+free}]{\setlength{\rightskip}{0pt plus 5cm}static void eina\+\_\+spinlock\+\_\+free (
\begin{DoxyParamCaption}
\item[{Eina\+\_\+\+Spinlock $\ast$}]{spinlock}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}}\label{group__Eina__Lock__Group_gac2593032eadc7b1e03c0980f2dedb7ca}


Deallocates an \#\+Eina\+\_\+\+Spinlock. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\tt in}  & {\em spinlock} & The \#\+Eina\+\_\+\+Spinlock to be deallocated.\\
\hline
\end{DoxyParams}
This function deallocates an \#\+Eina\+\_\+\+Spinlock and does any platform dependent cleanup that is required. 

Referenced by eina\+\_\+thread\+\_\+queue\+\_\+free(), and eio\+\_\+shutdown().

