home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue4 / SDL / gcc346 / !SDL / man / SDL_SemPost.3 < prev    next >
Encoding:
Text File  |  2006-09-20  |  1.9 KB  |  58 lines

  1. <!-- manual page source format generated by PolyglotMan v3.0.8+X.Org, -->
  2. <!-- available at http://polyglotman.sourceforge.net/ -->
  3.  
  4. <html>
  5. <head>
  6. <title>"SDL_SemPost"("3") manual page</title>
  7. </head>
  8. <body bgcolor='#efefef' text='black' link='blue' vlink='#551A8B' alink='red'>
  9. <a href='#toc'>Table of Contents</a><p>
  10.  
  11. <h2><a name='sect0' href='#toc0'>Name</a></h2>
  12. SDL_SemPost- Unlock a semaphore. 
  13. <h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
  14. <p>
  15. <b>#include "SDL.h" #include "SDL_thread.h"
  16. <p>
  17. </b><b>int <b>SDL_SemPost</b></b>(<b>SDL_sem *sem</b>); 
  18. <h2><a name='sect2' href='#toc2'>Description</a></h2>
  19. <p>
  20. <b>SDL_SemPost</b> unlocks the semaphore
  21. pointed to by <b>sem</b> and atomically increments the semaphores value. Threads
  22. that were blocking on the semaphore may be scheduled after this call succeeds.
  23. <p>
  24. <b>SDL_SemPost</b> should be called after a semaphore is locked by a successful
  25. call to <i>SDL_SemWait</i>, <i>SDL_SemTryWait</i> or <i>SDL_SemWaitTimeout</i>. 
  26. <h2><a name='sect3' href='#toc3'>Return Value</a></h2>
  27. <p>
  28. Returns
  29. <b>0</b> if successful or <b>-1</b> if there was an error (leaving the semaphore unchanged).
  30.  
  31. <h2><a name='sect4' href='#toc4'>Examples</a></h2>
  32. <p>
  33. <p>
  34. <br>
  35. <pre>CWSDL_SemPost(my_sem);
  36. </pre><p>
  37.  
  38. <h2><a name='sect5' href='#toc5'>See Also</a></h2>
  39. <p>
  40. <i><b>SDL_CreateSemaphore</b></i>, <i><b>SDL_DestroySemaphore</b></i>, <i><b>SDL_SemWait</b></i>, <i><b>SDL_SemTryWait</b></i>,
  41. <i><b>SDL_SemWaitTimeout</b></i>, <i><b>SDL_SemValue</b></i> 
  42. <!--
  43.   
  44.  <p>
  45.  
  46. <hr><p>
  47. <a name='toc'><b>Table of Contents</b></a><p>
  48. <ul>
  49. <li><a name='toc0' href='#sect0'>Name</a></li>
  50. <li><a name='toc1' href='#sect1'>Synopsis</a></li>
  51. <li><a name='toc2' href='#sect2'>Description</a></li>
  52. <li><a name='toc3' href='#sect3'>Return Value</a></li>
  53. <li><a name='toc4' href='#sect4'>Examples</a></li>
  54. <li><a name='toc5' href='#sect5'>See Also</a></li>
  55. </ul>
  56. </body>
  57. </html>
  58.