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