X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Funix%2Fsemaphore.cpp;h=6a4bacf9defddb911244ba44ced8fd82121e6d97;hb=122846f0881673770d88eff7d925ecf25c01b62e;hp=81492585a52636d55f3934f07fa5e1da1c5a1ce1;hpb=609c9a508cfdc7b42c46c4f21d17639204165a00;p=libs%2Fcore.git diff --git a/source/core/unix/semaphore.cpp b/source/core/unix/semaphore.cpp index 8149258..6a4bacf 100644 --- a/source/core/unix/semaphore.cpp +++ b/source/core/unix/semaphore.cpp @@ -14,8 +14,8 @@ struct Semaphore::Private { Mutex mutex; pthread_cond_t cond; - unsigned limit; - unsigned count; + unsigned limit = 1; + unsigned count = 0; }; @@ -24,7 +24,6 @@ Semaphore::Semaphore(unsigned limit): { pthread_cond_init(&priv->cond, 0); priv->limit = limit; - priv->count = 0; } Semaphore::~Semaphore()