]> git.saurik.com Git - wxWidgets.git/commitdiff
updated mutex and semaphore docs to reflect the new API (patch 593994)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Aug 2002 13:25:21 +0000 (13:25 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 20 Aug 2002 13:25:21 +0000 (13:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/mutex.tex
docs/latex/wx/semaphor.tex

index 348ae108c419bf3900586afeb27f1d264f3d903e..b4347bd1dec6e1d3f47dab769529d2fff275f88a 100644 (file)
@@ -88,12 +88,6 @@ Default constructor.
 
 Destroys the wxMutex object.
 
-\membersection{wxMutex::IsLocked}\label{wxmutexislocked}
-
-\constfunc{bool}{IsLocked}{\void}
-
-Returns TRUE if the mutex is locked, FALSE otherwise.
-
 \membersection{wxMutex::Lock}\label{wxmutexlock}
 
 \func{wxMutexError}{Lock}{\void}
index 335a399597540a2df3f43d1b0ac32b2ccf9d7ce9..88190caa8b84cdc44f364545020b3439bec79287 100644 (file)
@@ -57,28 +57,78 @@ Destructor is not virtual, don't use this class polymorphically.
 
 \membersection{wxSemaphore::Post}\label{wxsemaphorepost}
 
-\func{void}{Post}{\void}
+\func{wxSemaError }{Post}{\void}
+
+Increments the semaphore count and signals one of the waiting
+threads in an atomic way. Returns wxSEMA_OVERFLOW if the count
+would increase the counter past the maximum.
+
+\wxheading{Return value}
+
+One of:
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf wxSEMA\_NO\_ERROR}}{There was no error.}
+\twocolitem{{\bf wxSEMA\_INVALID}}{Semaphore hasn't been initialized successfully.}
+\twocolitem{{\bf wxSEMA\_OVERFLOW}}{Post() would increase counter past the max.}
+\twocolitem{{\bf wxSEMA\_MISC\_ERROR}}{Miscellaneous error.}
+\end{twocollist}
 
-Increments the semaphore count and signals one of the waiting threads in an
-atomic way.
 
 \membersection{wxSemaphore::TryWait}\label{wxsemaphoretrywait}
 
-\func{bool}{TryWait}{\void}
+\func{wxSemaError }{TryWait}{\void}
+
+Same as \helpref{Wait()}{wxsemaphorewait}, but returns immediately.
+
+\wxheading{Return value}
+
+One of:
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf wxSEMA\_NO\_ERROR}}{There was no error.}
+\twocolitem{{\bf wxSEMA\_INVALID}}{Semaphore hasn't been initialized successfully.}
+\twocolitem{{\bf wxSEMA\_BUSY}}{Returned by TryWait() if Wait() would block, i.e. the count is zero.}
+\twocolitem{{\bf wxSEMA\_MISC\_ERROR}}{Miscellaneous error.}
+\end{twocollist}
 
-Same as \helpref{Wait()}{wxsemaphorewait}, but does not block, returns
-{\tt TRUE} if the semaphore was successfully acquired and {\tt FALSE} if the
-count is zero and it couldn't be done.
 
 \membersection{wxSemaphore::Wait}\label{wxsemaphorewait}
 
-\func{void}{Wait}{\void}
+\func{wxSemaError }{Wait}{\void}
 
 Wait indefinitely until the semaphore count becomes strictly positive
 and then decrement it and return.
 
-\func{bool}{Wait}{\param{unsigned long }{timeout\_millis}}
+\wxheading{Return value}
+
+One of:
+
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf wxSEMA\_NO\_ERROR}}{There was no error.}
+\twocolitem{{\bf wxSEMA\_INVALID}}{Semaphore hasn't been initialized successfully.}
+\twocolitem{{\bf wxSEMA\_MISC\_ERROR}}{Miscellaneous error.}
+\end{twocollist}
+
+\membersection{wxSemaphore::WaitTimeout}\label{wxsemaphorewaittimeout}
+
+\func{wxSemaError }{WaitTimeout}{\param{unsigned
+long}{timeout\_millis}}
+
+Same as \helpref{Wait()}{wxsemaphorewait}, but with a timeout
+limit.
+
+\wxheading{Return value}
 
-Same as the version above, but with a timeout limit: returns {\tt TRUE} if the
-semaphore was acquired and {\tt FALSE} if the timeout has elapsed
+One of:
 
+\twocolwidtha{7cm}
+\begin{twocollist}\itemsep=0pt
+\twocolitem{{\bf wxSEMA\_NO\_ERROR}}{There was no error.}
+\twocolitem{{\bf wxSEMA\_INVALID}}{Semaphore hasn't been initialized successfully.}
+\twocolitem{{\bf wxSEMA\_TIMEOUT}}{Timeout occurred without receiving semaphore.}
+\twocolitem{{\bf wxSEMA\_MISC\_ERROR}}{Miscellaneous error.}
+\end{twocollist}