Messages in this thread | | | From | (Davide Libenzi) | Subject | Re: deadlock avoidance? | Date | Wed, 8 Dec 1999 01:50:22 +0100 |
| |
Wednesday, December 08, 1999 1:32 AM Davide Libenzi <dlibenzi@maticad.it> wrote : > Wouldn't lock->pid need to be atomic? > > On x86 this shouldn't be an issue since atomic_read has no magic but on > other architectures, lock->pid setting and reading may race. >
All pid and count modify fall inside 1) a nested lock ( ie. the task already own the lock : ++lock->count ) 2) a lock acquired : lock->pid = getpid() and ++lock->count
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/
| |