[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: a recursive lock prototype
From: |
Thomas Bushnell, BSG |
Subject: |
Re: a recursive lock prototype |
Date: |
05 Jul 2001 08:57:15 -0700 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Marcus Brinkmann <brinkmd@master.debian.org> writes:
> We agreed, in an inspiring coordinated coding effort, on the following
> implementation (thanks to Johannes, Neal, Moshe and Rene):
No, that still has a race condition as follows. We begin in the fully
unlocked state.
THREAD 1 THREAD 2
Start recursive_lock
Read RL->locking_thread
Context Switch
Start recursive_lock, function finishes
Context Switch
Check RL->locking_thread
it seems to match, and the lock
incorrectly succeeds.
You need some kind of guard around this structure!
- a recursive lock prototype, moshez, 2001/07/04
- Re: a recursive lock prototype, Thomas Bushnell, BSG, 2001/07/04
- Re: a recursive lock prototype, Niels Möller, 2001/07/05
- Re: a recursive lock prototype, Marcus Brinkmann, 2001/07/05
- Re: a recursive lock prototype,
Thomas Bushnell, BSG <=
- Re: a recursive lock prototype, Marcus Brinkmann, 2001/07/06
- Re: a recursive lock prototype, Thomas Bushnell, BSG, 2001/07/06
- Re: a recursive lock prototype, Marcus Brinkmann, 2001/07/07
- Re: a recursive lock prototype, Thomas Bushnell, BSG, 2001/07/08
- Re: a recursive lock prototype, Marcus Brinkmann, 2001/07/09
- Re: a recursive lock prototype, Thomas Bushnell, BSG, 2001/07/10
- Re: a recursive lock prototype, Thomas Bushnell, BSG, 2001/07/05
- Re: a recursive lock prototype, Igor Khavkine, 2001/07/05
- Re: a recursive lock prototype, Roland McGrath, 2001/07/05