Re: [Qemu-devel] [PATCH 5/8] tcg: Clarify "thread safaty" check in tb_add_jump()

2016-03-24 Thread Sergey Fedorov
On 24/03/16 14:31, Paolo Bonzini wrote: > On 24/03/2016 11:39, sergey.fedo...@linaro.org wrote: >> +/* FIXME: This test provides only some probablistic "thread safety" for >> + * user-mode emulation; appropriate synchronization/locking scheme >> should >> + * be implemented. >> +

Re: [Qemu-devel] [PATCH 5/8] tcg: Clarify "thread safaty" check in tb_add_jump()

2016-03-24 Thread Sergey Fedorov
On 24/03/16 15:23, Artyom Tarasenko wrote: > s/safaty/safety/ ? Oops, silly typo :) Thanks, Sergey

Re: [Qemu-devel] [PATCH 5/8] tcg: Clarify "thread safaty" check in tb_add_jump()

2016-03-24 Thread Artyom Tarasenko
s/safaty/safety/ ? On Thu, Mar 24, 2016 at 11:39 AM, wrote: > From: Sergey Fedorov > > The check does not give an absolute guarantee of thread safety because > there still may be a race condition between two threads which both have > just read

Re: [Qemu-devel] [PATCH 5/8] tcg: Clarify "thread safaty" check in tb_add_jump()

2016-03-24 Thread Paolo Bonzini
On 24/03/2016 11:39, sergey.fedo...@linaro.org wrote: > +/* FIXME: This test provides only some probablistic "thread safety" for > + * user-mode emulation; appropriate synchronization/locking scheme should > + * be implemented. > + */ There is appropriate locking. This code:

[Qemu-devel] [PATCH 5/8] tcg: Clarify "thread safaty" check in tb_add_jump()

2016-03-24 Thread sergey . fedorov
From: Sergey Fedorov The check does not give an absolute guarantee of thread safety because there still may be a race condition between two threads which both have just read zero from jmp_list_next[n] and proceed with list modification. Clarify this in the comment to