title: FreeRTOS Semaphore
body: <p>Here is an extract of the FreeRTOS api-reference <a href="http://www.freertos.org/a00122.html" rel="nofollow">http://www.freertos.org/a00122.html</a> regarding the xSemaphoreTake() function:</p>
  
  <pre><code>// See if we can obtain the semaphore. If the semaphore is not available
  // wait 10 ticks to see if it becomes free.
  if( xSemaphoreTake( xSemaphore, ( portTickType ) 10 ) == pdTRUE )
  {
  // We were able to obtain the semaphore and can now access the
  // shared resource.
  </code></pre>
  
  <p>My question is: Do i already have the semaphore here or do i have to call
  <code>xSemaphoreTake( xSemaphore, (portTickType) 10 )</code> explicit like:</p>
  
  <pre><code>// We have finished accessing the shared resource. Release the
  // semaphore.
  xSemaphoreGive( xSemaphore );
  }
  </code></pre>