Re: fine grained locking and traversing linked lists

From: Giorgos Keramidas <keramida_at_linux.gr>
Date: Sat, 4 Sep 2004 00:07:25 +0300
On 2004-09-03 11:57, Maksim Yevmenkin <maksim.yevmenkin_at_savvis.net> wrote:
>
> so, i've written a "spherical cow" that shows fine grained locking
> when traversing linked lists (see below). basically, for double linked
> list, in order to safely manipulate by object "y" one must hold three
> locks: object "y" lock, object "x = y->previous" lock and object "z =
> y->next" lock.
>
> so, the $1 million question is: am i missing something? or this will work?

See ``the dining philosophers problem'' at Google.
Received on Fri Sep 03 2004 - 19:09:30 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:10 UTC