From c00e0ec3fd8a1eb3adda36c753767796c57351ec Mon Sep 17 00:00:00 2001 From: Carlos Daniel Ruvalcaba Valenzuela Date: Sat, 6 Oct 2007 02:55:36 -0700 Subject: [PATCH] Maked minor changes to Semaphore interface --- include/libfmail/semaphore.h | 2 +- src/posix-sem.cpp | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/libfmail/semaphore.h b/include/libfmail/semaphore.h index 7b620d4..e8c8b8c 100644 --- a/include/libfmail/semaphore.h +++ b/include/libfmail/semaphore.h @@ -32,6 +32,6 @@ public: int TryWait(); int Wait(); int Post(); - int getValue(); + int getValue(int *val); }; diff --git a/src/posix-sem.cpp b/src/posix-sem.cpp index 8c3b269..22aae84 100644 --- a/src/posix-sem.cpp +++ b/src/posix-sem.cpp @@ -75,9 +75,6 @@ int Semaphore::Post(){ return sem_post(os_sem->sem); } -int Semaphore::getValue(){ - int ret; - sem_getvalue(os_sem->sem, &ret); - - return ret; +int Semaphore::getValue(int *val){ + return sem_getvalue(os_sem->sem, val); } -- 2.11.4.GIT