lkml.org 
[lkml]   [1999]   [Dec]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: deadlock avoidance?
Date
Wednesday, December 08, 1999 1:05 AM
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote :
> > See at this implementation ( optimization = 0.0 ) :
> Correctness ditto 8)
>
> > ++lock->count; \
>
> These need to use atomic operations - dec and not zero etc
>

Hi Alan,

++lock->count;

is executed only "if (lock->pid == getpid())" == the task already own
the lock.
Cheers,
Davide.

--
"Debian, the Freedom in Freedom."



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site