tcp: Replace custom WaitList with ConditionVariable.
commitda8fbe0e5974bef73324b4297e7cc471b942b679
authorMichael Lotz <mmlr@mlotz.ch>
Sun, 2 Aug 2015 13:10:06 +0000 (2 15:10 +0200)
committerMichael Lotz <mmlr@mlotz.ch>
Sun, 2 Aug 2015 21:21:10 +0000 (2 23:21 +0200)
treed3e4c1c8a4d9c669aa29c9fc149e78616d4e0177
parent2fdea65c3a0b5f8680eee251c794c231ee507ce3
tcp: Replace custom WaitList with ConditionVariable.

The WaitList implementation had a race condition between checking for
the condition and acquiering the semaphore. If a thread was rescheduled
at that point, the signal could be missed due to the use of
release_sem_etc() with the B_RELEASE_ALL flag while the thread was not
yet waiting for the semaphore. The transfer would subsequently stall.
src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp
src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.h