Skip to content
Snippets Groups Projects
Commit 15356905 authored by warren%netscape.com's avatar warren%netscape.com
Browse files

Made Notify and Wait methods return nsresult.

parent 88d6a3a4
No related branches found
No related tags found
No related merge requests found
...@@ -140,16 +140,19 @@ public: ...@@ -140,16 +140,19 @@ public:
PR_CExitMonitor(mLockObject); PR_CExitMonitor(mLockObject);
} }
PRStatus Wait(PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT) { nsresult Wait(PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT) {
return PR_CWait(mLockObject, interval); return PR_CWait(mLockObject, interval) == PR_SUCCESS
? NS_OK : NS_ERROR_FAILURE;
} }
PRStatus Notify() { nsresult Notify() {
return PR_CNotify(mLockObject); return PR_CNotify(mLockObject) == PR_SUCCESS
? NS_OK : NS_ERROR_FAILURE;
} }
PRStatus NotifyAll() { nsresult NotifyAll() {
return PR_CNotifyAll(mLockObject); return PR_CNotifyAll(mLockObject) == PR_SUCCESS
? NS_OK : NS_ERROR_FAILURE;
} }
private: private:
......
...@@ -140,16 +140,19 @@ public: ...@@ -140,16 +140,19 @@ public:
PR_CExitMonitor(mLockObject); PR_CExitMonitor(mLockObject);
} }
PRStatus Wait(PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT) { nsresult Wait(PRIntervalTime interval = PR_INTERVAL_NO_TIMEOUT) {
return PR_CWait(mLockObject, interval); return PR_CWait(mLockObject, interval) == PR_SUCCESS
? NS_OK : NS_ERROR_FAILURE;
} }
PRStatus Notify() { nsresult Notify() {
return PR_CNotify(mLockObject); return PR_CNotify(mLockObject) == PR_SUCCESS
? NS_OK : NS_ERROR_FAILURE;
} }
PRStatus NotifyAll() { nsresult NotifyAll() {
return PR_CNotifyAll(mLockObject); return PR_CNotifyAll(mLockObject) == PR_SUCCESS
? NS_OK : NS_ERROR_FAILURE;
} }
private: private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment