1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3<title>oscl_semaphore.h Source File</title> 4<link href="doxygen.css" rel="stylesheet" type="text/css"> 5</head><body> 6<!-- Generated by Doxygen 1.2.18 --> 7<center> 8<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="globals.html">Globals</a> </center> 9<hr><h1>oscl_semaphore.h</h1><a href="oscl__semaphore_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">// -*- c++ -*-</span> 1000002 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> 1100003 1200004 <span class="comment">// O S C L _ S E M A P H O R E</span> 1300005 1400006 <span class="comment">// = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =</span> 1500007 1600014 <span class="comment">// Definition file for OSCL Semaphore</span> 1700015 <span class="preprocessor">#ifndef OSCL_SEMAPHORE_H_INCLUDED</span> 1800016 <span class="preprocessor"></span><span class="preprocessor">#define OSCL_SEMAPHORE_H_INCLUDED</span> 1900017 <span class="preprocessor"></span> 2000018 <span class="preprocessor">#ifndef OSCLCONFIG_PROC_H_INCLUDED</span> 2100019 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="osclconfig__proc_8h.html">osclconfig_proc.h</a>"</span> 2200020 <span class="preprocessor">#endif</span> 2300021 <span class="preprocessor"></span> 2400022 <span class="preprocessor">#ifndef OSCL_THREAD_H_INCLUDED</span> 2500023 <span class="preprocessor"></span><span class="preprocessor">#include "<a class="code" href="oscl__thread_8h.html">oscl_thread.h</a>"</span> 2600024 <span class="preprocessor">#endif</span> 2700025 <span class="preprocessor"></span> 2800026 29<a name="l00030"></a><a class="code" href="classOsclSemaphore.html">00030</a> <span class="keyword">class </span><a class="code" href="classOsclSemaphore.html">OsclSemaphore</a> 3000031 { 3100032 <span class="keyword">public</span>: 3200033 3300037 OSCL_IMPORT_REF <a class="code" href="classOsclSemaphore.html#a0">OsclSemaphore</a>(); 3400038 3500042 OSCL_IMPORT_REF <a class="code" href="classOsclSemaphore.html#a1">~OsclSemaphore</a>(); 3600043 3700052 OSCL_IMPORT_REF <a class="code" href="classOsclProcStatus.html#s35">OsclProcStatus::eOsclProcError</a> <a class="code" href="classOsclSemaphore.html#a2">Create</a>(uint32 initVal = 0); 3800053 3900062 OSCL_IMPORT_REF <a class="code" href="classOsclProcStatus.html#s35">OsclProcStatus::eOsclProcError</a> <a class="code" href="classOsclSemaphore.html#a3">Close</a>(); 4000063 4100072 OSCL_IMPORT_REF <a class="code" href="classOsclProcStatus.html#s35">OsclProcStatus::eOsclProcError</a> <a class="code" href="classOsclSemaphore.html#a4">Wait</a>(); 4200073 4300085 OSCL_IMPORT_REF <a class="code" href="classOsclProcStatus.html#s35">OsclProcStatus::eOsclProcError</a> <a class="code" href="classOsclSemaphore.html#a4">Wait</a>(uint32 timeout_msec); 4400086 4500099 OSCL_IMPORT_REF <a class="code" href="classOsclProcStatus.html#s35">OsclProcStatus::eOsclProcError</a> <a class="code" href="classOsclSemaphore.html#a6">TryWait</a>(); 4600100 4700109 OSCL_IMPORT_REF <a class="code" href="classOsclProcStatus.html#s35">OsclProcStatus::eOsclProcError</a> <a class="code" href="classOsclSemaphore.html#a7">Signal</a>(); 4800110 4900111 <span class="keyword">private</span>: 5000112 5100113 5200114 5300115 <span class="keywordtype">bool</span> bCreated; 5400116 <span class="comment">//for pthreads implementations without sem timedwait support.</span> 5500117 TOsclMutexObject ObjMutex; 5600118 TOsclConditionObject ObjCondition; 5700119 uint32 iCount; 5800120 5900121 6000122 }; 6100123 6200124 6300125 6400126 6500127 6600128 <span class="preprocessor">#endif // END OF File</span> 6700129 <span class="preprocessor"></span> 68</pre></div><hr size="1"><img src="pvlogo_small.jpg"><address style="align: right;"><small>OSCL API</small> 69<address style="align: left;"><small>Posting Version: OPENCORE_20090310 </small> 70</small></address> 71</body> 72</html> 73