s3: Avoid starving locks when many processes die at the same time
authorVolker Lendecke <vl@samba.org>
Tue, 16 Feb 2010 11:28:53 +0000 (12:28 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 1 Apr 2010 07:39:18 +0000 (09:39 +0200)
commitfc4aa05714fb8c87e27f97d5bba7cbe040ba2f81
treee6925e5ab12ffbd5a49ebe04c72ab533bd5807a8
parentbf348712cf2fa98c65e22393c1d6bc3edb5f1e10
s3: Avoid starving locks when many processes die at the same time

In g_lock_unlock we have a little race between the process_exists and
messaging_send call: We only send to 5 waiters now, they all might have died
between us checking their existence and sending the message. This change makes
g_lock_lock retry at least once every minute.
(cherry picked from commit be919d6faed198cdc29322a4d9491946c0b044b3)
(cherry picked from commit c5babceaa95fd163f785e1dfe5521b93402e06a3)
source3/lib/g_lock.c