X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Fcore%2Funix%2Fsemaphore.cpp;fp=source%2Fcore%2Funix%2Fsemaphore.cpp;h=6a4bacf9defddb911244ba44ced8fd82121e6d97;hp=81492585a52636d55f3934f07fa5e1da1c5a1ce1;hb=122846f0881673770d88eff7d925ecf25c01b62e;hpb=b116e161e377da0e4e52f07745ecb2d22f962ae9 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()