Re: [389-devel] Revised: Ticket 509 - lock-free access to be-be_suffixlock

2012-12-10 Thread Ludwig Krispenz
And I think be_addsuffix is not safe. If two threads try to add a suffix, both can get the same current count, the both set the new suffix be-be_suffix[count]= slapi_sdn_dup(suffix); and then both increment count. the increment is atomic, but the assignment could be done to the wrong index.

Re: [389-devel] Revised: Ticket 509 - lock-free access to be-be_suffixlock

2012-12-10 Thread Mark Reynolds
On 12/10/2012 10:57 AM, Ludwig Krispenz wrote: And I think be_addsuffix is not safe. If two threads try to add a suffix, both can get the same current count, the both set the new suffix be-be_suffix[count]= slapi_sdn_dup(suffix); and then both increment count. the increment is atomic, but

Re: [389-devel] Revised: Ticket 509 - lock-free access to be-be_suffixlock

2012-12-10 Thread Muditha Dissanayaka
lets start it using CUDA On Mon, Dec 10, 2012 at 9:48 PM, Mark Reynolds marey...@redhat.com wrote: On 12/10/2012 10:57 AM, Ludwig Krispenz wrote: And I think be_addsuffix is not safe. If two threads try to add a suffix, both can get the same current count, the both set the new suffix