Woof!
On Wed, 01 Jul 2009 15:55:49 -0400, Dale Worley <[email protected]> wrote:
> There are two common implementations of critical sections in sipXecs:
> OsBSem semaphore;
> ...
> {
> OsLock lock(semaphore);
> <critical section>;
> }
> ...
>and
>
> OsMutex semaphore;
> ...
> semaphore.acquire();
> <critical section>;
> semaphore.release();
>Is one preferable to the other?
I much prefer the first one, as there is no way to exit the block without
releasing the semaphore (the magic of C++ and auto variables)
--Woof!
_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/