In CLRLifoSemaphore, start the underlying semaphore with 0 for the initial signal...
authorKoundinya Veluri <kouvel@users.noreply.github.com>
Fri, 15 Mar 2019 16:12:27 +0000 (09:12 -0700)
committerStephen Toub <stoub@microsoft.com>
Fri, 15 Mar 2019 16:12:27 +0000 (12:12 -0400)
commitb1284352a118e7271024f190d2830a769d61ff69
tree5385b70bf9255ed776cd2ed05ef4ff40b86690e4
parent6ed2db0ce59f3e12aabea1cf8eceade53d14523a
In CLRLifoSemaphore, start the underlying semaphore with 0 for the initial signal count (dotnet/coreclr#22632)

- Port of a fix from https://github.com/dotnet/corert/pull/6955
- The underlying semaphore is only used to wake up waiters, initially there are no waiters and the signal count should be zero. This was already the case on Windows, this fixes the Unix side. The actual initial signal count is tracked in the upper layer counts.
- The initial signal count passed in is zero anyway in the places where it's used, so it makes no difference for now, just some cleanup

Commit migrated from https://github.com/dotnet/coreclr/commit/9c4d496071c2ffdc5a8793835694d1a8ac267522
src/coreclr/src/vm/synch.cpp